我已經創建了一個Android應用程序,因爲我在佈局設計中遇到了問題。佈局設計中的麻煩Android
請參閱佈局在此鏈路
我的代碼:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/product_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/product" />
<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/product_image"
android:layout_alignParentRight="true"
android:text="Price"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<ImageView
android:id="@+id/user_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/userimage" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical" >
<TextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Distance"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
感謝。
發佈您的代碼。 – Raghavendra
請詳細解釋一下你面臨的問題。並請在這裏發佈您的佈局XML文件代碼。在您提供的鏈接上,只有佈局圖像在那裏。 – codevscolor
在圖像中,您可以看到產品圖像是ImageView,用戶圖像位於產品圖像和文本(120 KM ...)之間,所以如何管理這個 –