0
我想要设计一个表格布局,其中包含2个垂直文本视图和一个图像视图,正好位于所附图像所示的2个文本视图的前面。带有图像对象的Android桌面布局设计
但我没有得到任何方式来设计这样的布局。
请帮助我如何使用表格布局或任何其他布局来设计它(请参阅附图中显示的设计)?谢谢。
http://www.freeimagehosting.net/1441f
我想要设计一个表格布局,其中包含2个垂直文本视图和一个图像视图,正好位于所附图像所示的2个文本视图的前面。带有图像对象的Android桌面布局设计
但我没有得到任何方式来设计这样的布局。
请帮助我如何使用表格布局或任何其他布局来设计它(请参阅附图中显示的设计)?谢谢。
http://www.freeimagehosting.net/1441f
解表的布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:layout_height="wrap_content"
android:id="@+id/tableLayout1"
android:layout_width="match_parent">
<TableRow
android:id="@+id/tableRow1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Grilled Fish with Tangerine and..." />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:text="Quantity: 5" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="3">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/icon"
android:layout_gravity="right">
</ImageView>
</LinearLayout>
</TableRow>
<View
android:layout_height="1dip"
android:background="#FFFFFF" />
</TableLayout>
</LinearLayout>
玩得开心! :)