
如何将图像和复选框放在android中的同一行中,像这样iamge可以将图像视图用于此吗?
谢谢.
解决方法:
对每一行使用线性布局并将其全部放入其中也为每个小部件使用androID:layout_toRightOf,如复选框,TextvIEw使用像这样
<relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:orIEntation="vertical"><linearLayout androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:ID="@+ID/layout1"><ImageVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/im1"/><CheckBox androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/ck1" androID:layout_toRightOf="@+ID/im1"/><TextVIEw androID:text="hi" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/txt1" androID:layout_toRightOf="@+ID/ck1"/></linearLayout><linearLayout androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:ID="@+ID/layout2" androID:layout_below="@ID/layout1"><ImageVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/im2"/><CheckBox androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/ck1" androID:layout_toRightOf="@+ID/im2"/><TextVIEw androID:text="hello" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:ID="@+ID/txt1" androID:layout_toRightOf="@+ID/ck2"/></linearLayout></relativeLayout> 总结 以上是内存溢出为你收集整理的如何将图像放在android中的复选框前面..?全部内容,希望文章能够帮你解决如何将图像放在android中的复选框前面..?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)