摘要:
LayoutInflater 类似于findViewById 只不过前者的对象是布局,后者的对象是控件,这是我的理解。而且findViewById是View的方法,也就是说使用它必须是在要找控件的父控件下面才可以。这时候通常是用LayoutInlater的实例的findViewById方法下面给出个代码实例:package com.example.newadt.zhuqi.first;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.content 阅读全文
posted @ 2013-04-03 23:03
smallerpig
阅读(450)
评论(0)
推荐(0)
摘要:
对于多分辨率的适配,Android官方提供了一个说明文档,原文链接如下:http://developer.android.com/training/multiscreen/index.html对其做了一个翻译,方便日后参考学习。支持不同大小的屏幕一.使用“wrap_content”和“match_parent”为了确保布局文件能够灵活的适应于不同大小的屏幕,对于一些视图的宽度和高度属性的值应该使用“wrap_content”和“match_content”。如果使用“wrap_content”,视图的高度和宽度将被设置为满足视图内容的最小值,而“match_parent”(在API 8之前也称 阅读全文
posted @ 2013-04-03 11:04
smallerpig
阅读(1786)
评论(1)
推荐(0)