라이너 레이아웃/상대적 레이아웃 내에 이미지를 배치하고 싶습니다.Android : 이미지 크기 정의
두 개의 이미지를 연속으로 유지하고 싶습니다. 두 이미지를 가로로 모두 채우도록 이미지의 너비를 정의하는 방법은 무엇입니까?
이미지 사이에 필요한 간격에 layout_margin을 사용할 수 있습니다. 하지만 그것은 부모를 채울 수 있도록 너비를 정의 할 수 없습니다.
내가 다른 딥 재판이라이너 레이아웃/상대적 레이아웃 내에 이미지를 배치하고 싶습니다.Android : 이미지 크기 정의
두 개의 이미지를 연속으로 유지하고 싶습니다. 두 이미지를 가로로 모두 채우도록 이미지의 너비를 정의하는 방법은 무엇입니까?
이미지 사이에 필요한 간격에 layout_margin을 사용할 수 있습니다. 하지만 그것은 부모를 채울 수 있도록 너비를 정의 할 수 없습니다.
내가 다른 딥 재판이시도 두 ImageViews
을 넣어 수평
로의 방향을 값 어떻게해야합니까 이런 식으로 너의 xml에
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:weightSum="2">
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView1"
android:src="@drawable/icon" android:layout_width="0dp"
android:layout_weight="1" android:scaleType="fitXY"></ImageView>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView1"
android:src="@drawable/icon" android:layout_width="0dp" android:scaleType="fitXY"
android:layout_weight="1"></ImageView>
</LinearLayout>
세트 LinearLayout
재산
android:layout_width = "fill_parent"
android:layout_height = "wrap_content"
android:layout_weight = "1"
사용
android:layout_weight="1" for parent
and android:layout_weight="0.5" for childs
+1 좋은 대답은 ... 이미지 높이 너비를주는 방법을 더 멋지게 만들어야한다. – MKJParekh
사용 안드로이드 : 사실이 질문은 나의 부분 요구했다 http://stackoverflow.com/questions/3995825/what-is-androidlayout-weight-meaning – Houcine