我正在使用LinearLayout
水平放置兩個ImageView
。我有圖像放在ImageView
。現在我需要在ImageView
上的圖片上添加一個小圖片。我看過很多帖子,但都是Relativelayout
或Framelayout
。這是我用過的XML代碼段。Android:在ImageView上通過圖像顯示圖像
<LinearLayout
android:id="@+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imgmode31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:adjustViewBounds="true"
android:maxHeight="180dp"
android:maxWidth="140dp"
android:scaleType="fitXY"
android:src="@drawable/i5" >
</ImageView>
<ImageView
android:id="@+id/imgmode32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:longClickable="false"
android:maxHeight="180dp"
android:maxWidth="280dp"
android:scaleType="fitXY"
android:src="@drawable/i1" >
</ImageView>
</LinearLayout>
任何幫助將不勝感激。
-1表示醜陋的格式,但+1表示正確的答案。我會離開你在0! – Justin
@Justin感謝您指出我的格式,因爲即使我不知道我粘貼了這樣不好的格式化代碼。可能是我從我的手機中完成的。 – Siddhesh