내 이미지 버튼의 높이가 40 픽셀이지만 갤러리 높이가 훨씬 큽니다. 바로 지금, 내 이미지 버튼은 주어진 공간 전체를 차지하며 내 갤러리와 같은 높이입니다. 이 가로 배치를 유지하면서 버튼을 원래 크기로 유지할 수 있습니까?다른 높이의 차일드가있는 layout_weights가있는 LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="20dp" >
<ImageButton
android:id="@+id/left_arrow"
android:layout_weight="3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shared_arrow_left_button_selector"
android:scaleType="fitCenter" />
<Gallery
android:id="@+id/gallery"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:spacing="15dp" />
<ImageButton
android:id="@+id/right_arrow"
android:layout_weight="3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shared_arrow_right_button_selector"
android:scaleType="fitCenter" />
</LinearLayout>
LinearLayout의 시작 태그를 추가하여 이해할 수 있습니까? – Badal
또한 스크린 샷을 업데이트하고 있습니다 ... – MKJParekh