의 중심에서 목록보기 나는 다음과 같은 레이아웃 (Android 4.4
)가 있습니다. 내가 뭘 놓치고 있니?안드로이드 상대 레이아웃
의 ListView 항목 레이아웃 :
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/icon"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="fitXY"/>
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+id/label"
android:layout_marginTop="40dp"
android:textStyle="bold"
android:background="@color/list_background"
/>
</LinearLayout>
편집 : 나는 wrap_content하기 목록보기 폭을 설정하더라도
, 그것은 차이를 만들지 않습니다.
외부 뷰를 LinearLayout으로 변경해도 도움이되지 않습니다.
그 대신 –
사용 LinearLayout을 중심으로 할 수있는 방법이 없기 때문에 이미 부모의 폭을 일치 –
@Rod_Algonquin이 목록보기 항목 레이아웃 – Jake