비디오 타이틀과 태그를 표시하는 대화 상자를 만들고 싶습니다. 텍스트 아래에보기, 편집 및 삭제 버튼을 추가하고 이러한 요소를 같은 크기로 만듭니다. 누구든지 .xml 레이아웃 파일을 수정하여 LinearView 내부의 요소를 동일한 크기로 만드는 방법을 알고 있습니까?안드로이드 : LinearLayout 내부의 모든 요소를 같은 크기로 만드는 방법?
현재의 레이아웃 파일은 다음과 같습니다 : 누군가가 붙여 넣은 파일 내용을 수정하여 솔루션을 보여줄 수 있다면 감사하겠습니다
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtTitle" android:text="[Title]" >
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtTags"
android:text="[Tags]" >
</TextView>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnPlay"
android:text="View">
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnEdit"
android:text="Edit">
</Button>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnDelete"
android:text="Delete">
</Button>
</LinearLayout>
</LinearLayout>
.
감사합니다.
_REALLY_ 싶으면 android : stretchColumns = "0,1,2"와 함께 TableLayout을 사용할 수 있습니다. –
굉장한 ... 그래서 우리가 너비를 0px로 설정하면 가중치가 설정을 무시하게됩니까? 왜 그래야만하지? – noob
이것은 완벽하게 작동했습니다. – Proverbio