【发布时间】:2015-05-28 13:47:30
【问题描述】:
我必须创建具有一个图像和多个文本视图的布局,并且像这样进行评级,并且我已经添加了一条关于使用适配器扩展此布局的行
| Image| Name of Product |
| Desc |
| Amount |
| EMI details |
| Rating Sybmol total Rating |
所以我尝试创建这样的布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/mainLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:id="@+id/text"
android:text="Micromax Canvas Spark"
android:textColor="@android:color/black" />
</LinearLayout>
</RelativeLayout>
但我很困惑如何创建布局,请帮助我
【问题讨论】:
-
你想让他的图像在他的左边,而 textViews 在右边吗?
-
@EugeneH 是,当我在列表视图中插入时,列表视图中每一行的行
-
我不太清楚你所说的行是什么意思。
-
每个列表项之间的分隔符?
-
@EugeneH 是每个列表项中的分隔符
标签: android android-layout android-linearlayout