读书人

一个关于设置imagebutton的有关问题

发布时间: 2012-04-05 12:42:40 作者: rapoo

一个关于设置imagebutton的问题
本人菜鸟,求各位大牛帮忙啊!在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>
[解决办法]
探讨

Java code

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<imagebutton
android:l……

[解决办法]
第一个问题上面的已经回到了,我回答第二个,在activity里面,定义一个ArrayAdapter,使用数组给这个ArrayAdapter赋值,把你的新建的文档放在数字的前面,这样就可以了

读书人网 >Android

热点推荐