Textview没有显示

Geo*_*iuc 4 android android-layout

我在另一个linearlayout中有一个linearlayout和一个textview.显示内部的linearlayout,但问题是最后的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>
Run Code Online (Sandbox Code Playgroud)

看看这里,

在此输入图像描述

Chr*_*her 9

您的LinearLayout具有height-attribute fill_parent.更改为wrap_content.