Android 按钮在我运行应用程序时隐藏文本字段

Android 按钮在我运行应用程序时隐藏文本字段,android,android-layout,Android,Android Layout,我是android studio的初学者。我正在创建一个简单的项目,单击按钮可以更改文本字段中的文本。问题是,当我运行应用程序时,按钮覆盖了文本字段并隐藏了其中的文本。因此,我无法查看文本更改,甚至无法查看默认文本。在主xml文件中,按钮位于文本字段下方,这就是我希望它的外观。有人能提供帮助吗?布局设置有问题吗?将此行添加到按钮标签 android:layout_toEndOf = "@+id/textviewid" 现在,您的按钮将显示在文本视图下方,请尝试以下布局: 请发布你的代码片段。当

我是android studio的初学者。我正在创建一个简单的项目,单击按钮可以更改文本字段中的文本。问题是,当我运行应用程序时,按钮覆盖了文本字段并隐藏了其中的文本。因此,我无法查看文本更改,甚至无法查看默认文本。在主xml文件中,按钮位于文本字段下方,这就是我希望它的外观。有人能提供帮助吗?布局设置有问题吗?

将此行添加到按钮标签

android:layout_toEndOf = "@+id/textviewid"
现在,您的按钮将显示在文本视图下方,请尝试以下布局:


请发布你的代码片段。当你去看医生时,你是否只是告诉她你的身体受伤了,并希望她确切地知道如何帮助你?不,你告诉她你身体的哪一部分受伤,如果你出现症状,就告诉她细节。同样,我们需要更多的细节来提供帮助。有关如何提供这些详细信息的建议,请参阅。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" 
        android:layout_marginTop="10dp"/>

    <Button
        android:layout_width="100dp"
        android:layout_height="wrap_content" 
        android:layout_marginTop="25dp"
        android:text="Click!"
        android:textAllCaps="false"/>
</LinearLayout>