有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java另一个线性布局,没有出现按钮

在您的帮助下,我在第一个按钮的旁边做了另一个线性布局,但是现在在尝试在左侧添加一个新按钮后,该按钮没有出现,尽管我按照所学制作了wrap_内容,但它仍然没有出现,而第一个线性布局中的按钮工作正常,我希望您能提供帮助并感谢

这是主要问题。xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:安卓="http://schemas.安卓.com/apk/res/安卓"
安卓:layout_width="fill_parent"
安卓:layout_height="fill_parent"
安卓:gravity="right"
安卓:orientation="vertical" >

<TextView 
安卓:layout_width="fill_parent"
安卓:layout_height="wrap_content"
安卓:text="اضغط على من تريد معرفة المزيد عنه"
安卓:padding="10dp"
/>

<Button
安卓:id="@+id/buttontype1"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Start" />

<Button
安卓:id="@+id/button1"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Start" />

<Button
安卓:id="@+id/button2"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Stop"/>

<Button
安卓:id="@+id/button3"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Start" />

<Button
安卓:id="@+id/button4"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:layout_gravity="right"
安卓:text="Stop" />

<Button
安卓:id="@+id/button5"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Start" />

<Button
安卓:id="@+id/button6"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Stop"/>

<Button
安卓:id="@+id/button7"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Start" />


<Button
安卓:id="@+id/button8"
安卓:layout_width="120dp"
安卓:layout_height="wrap_content"
安卓:text="Stop"/>

<LinearLayout
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
安卓:gravity="right"
安卓:orientation="vertical" >

<Button
安卓:id="@+id/buttonkk"
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
安卓:gravity="left"
安卓:text="HII"/>

</LinearLayout>
    </LinearLayout>

共 (2) 个答案

  1. # 1 楼答案

    将所有内容放在滚动视图中