2
我有一个布局问题。奇怪的是,我无法在网上找到解决方案。也许这里有人想帮我? 我想显示一个这样的名单:Android:列表元素,固定布局
但所有我能得到的是这样的:
这里是我的列表项的XML代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:id="@android:id/icon" android:layout_width="22px"
android:layout_height="22px" android:layout_marginLeft="4px"
android:layout_marginRight="10px" android:layout_marginTop="4px"
android:src="@drawable/icon" />
<TextView android:id="@android:id/text1" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="4px"
android:layout_marginRight="10px" android:textSize="20px" />
<TextView android:id="@android:id/text2" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="4px"
android:layout_marginRight="10px" android:textSize="20px"
android:layout_alignParentRight="true"
android:layout_weight="0.4" />
</LinearLayout>
我会感谢您的帮助,谢谢;)
它的工作,谢谢! 我接受这个答案,如果你做@ 87element说的话);) – Moyshe