我很新的Android开发,并会喜欢一些帮助创建Android上的一个简单的布局。这个布局将用于列表视图。创建Android的布局
这是我要的样子: 这是我所得到的(不要笑):
文本底部行重叠的顶部,这个数字应该是右侧(图像的左侧)和不同行中的图像应该对齐。
(是的,我知道这个颜色是丑陋的。)
这里是我的xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/thelayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="6dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="@+id/widget375"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5">
<TextView
android:id="@+id/txt2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14pt"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/txt1" />
<TextView
android:id="@+id/txt3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/txt1"
android:layout_alignParentLeft="true" />
<TextView
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14pt"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
</RelativeLayout>
<ImageView
android:id="@+id/theicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
谢谢!
张贴您的布局xml。 –
什么都尝试过。张贴 –
发表您的xml文件... – rajshree