2012年5月15日

【Android布局】在程序中设置android:gravity 和 android:layout_Gravity属性

摘要: 在进行UI布局的时候,可能经常会用到android:gravity 和android:layout_Gravity 这两个属性。关于这两个属性的区别,网上已经有很多人进行了说明,这边再简单说一下。 (资料来自网络)LinearLayout有两个非常相似的属性:android:gravity与android:layout_gravity。他们的区别在于:android:gravity 属性是对该view中内容的限定.比如一个button 上面的text. 你可以设置该text 相对于view的靠左,靠右等位置.android:layout_gravity是用来设置该view相对与父view 的位 阅读全文

posted @ 2012-05-15 17:55 明明的天天 阅读(315) 评论(0) 推荐(0)

map里的keyset()和entryset()方法.

摘要: public class KeysetAndEntrySet { public static void main(String[] args) { Map map1 = new HashMap(); Map map2 = new TreeMap(); map1.put("name1", "Christ Bosh"); map1.put("name2","Kobe Bryant"); map1.put("name3", "Lebron James"); map1.put(&qu 阅读全文

posted @ 2012-05-15 12:02 明明的天天 阅读(611) 评论(0) 推荐(0)

AIDL 编译报can be an out parameter, so you must declare it as in, out or inout原因探究

摘要: 从Google Group上copy下面这个问题及其回答,它解释了其中的原因。问题:Gavin Bong wrote:I'm getting this error when running "ant aidl"./data/projects2008/android/iteration1/lib/src/org/android/ common/IAdUnitAvailability.aidl:5 parameter 1: 'Advert ad' can be an out parameter, so you must declare it as in, 阅读全文

posted @ 2012-05-15 11:57 明明的天天 阅读(3948) 评论(0) 推荐(0)

导航