本人菜鸟,求各位大牛帮忙啊!在xml中怎么设置俩个imagebutton并列一行,且各占一半啊!额。。还有个问题,在listview中添加item,比如添加文档,貌似默认的新建的在之前建的下面,怎么让新建的文档在之前建的文档上面呢?
------解决方案--------------------
- Java code
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <imagebutton android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/> <imagebutton android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"/> </LinearLayout>
------解决方案--------------------
------解决方案--------------------
第一个问题上面的已经回到了,我回答第二个,在activity里面,定义一个ArrayAdapter,使用数组给这个ArrayAdapter赋值,把你的新建的文档放在数字的前面,这样就可以了