다른 선형 레이아웃 내부에 선형 레이아웃과 텍스트 뷰가 있습니다. 안쪽에서 선형 레이아웃이 표시되지만 마지막 textview가 아닌 것이 문제입니다. 왜? Textview가 표시되지 않습니다.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dp"
android:text="Scrie un cuvant" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<EditText
android:id="@+id/cuvant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/cuvant_hint"
android:inputType="text" />
<Button
android:id="@+id/cuvantbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cuvantbutton_text" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="10dp"
android:text="Sau random" />
</LinearLayout>
당신은 실제로 당신이 마지막
textview
표시되지 않는 원인이되는 사용 가능한 모든 공간을 캡처
LinearLayout
을 말하고있다 여기 봐,
귀하의 LinearLayout이 it' 때문에 마지막 텍스트 뷰에 걸쳐 일어나고에
match_parent
에서 내부LinearLayout
의layout_height
높이가 match_parent입니다. layout_weight와 같은 다른 솔루션을 사용하거나 상대 레이아웃을 사용할 수 있습니다. – Opiatefuchs