Java 我正在尝试在LinearLayout的底部放置一个按钮。但是它';它不显示
我是Android新手。我正在Udacity学习Android。但这一过程由来已久,一些错误正在发生。我无法处理这些错误Java 我正在尝试在LinearLayout的底部放置一个按钮。但是它';它不显示,java,android,xml,android-layout,Java,Android,Xml,Android Layout,我是Android新手。我正在Udacity学习Android。但这一过程由来已久,一些错误正在发生。我无法处理这些错误 将数量\u文本\u视图的布局高度从匹配\u父项更改为包装内容: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" androi
将
数量\u文本\u视图
的布局高度从匹配\u父项
更改为包装内容
:
<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"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quantity" />
<TextView
android:id="@+id/quantity_text_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="0"
android:textColor="@color/black"
android:textSize="16sp" />
<Button
android:id="@+id/button_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Order" />
</LinearLayout>
或者,TextView应该占据第一个TextView之后的剩余高度
<TextView
android:id="@+id/quantity_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="0"
android:textColor="@color/black"
android:textSize="16sp" />