Java 如何从自动生成的滚动活动中删除浮动操作按钮

Java 如何从自动生成的滚动活动中删除浮动操作按钮,java,android,xml,android-studio,Java,Android,Xml,Android Studio,我在Android Studio中创建了一个滚动活动,并从设置FAB操作的活动中删除了代码,但活动xml中没有匹配的属性: <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com

我在Android Studio中创建了一个滚动活动,并从设置FAB操作的活动中删除了代码,但活动xml中没有匹配的属性:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="myactivity"
tools:showIn="@layout/activity_edit_address">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/text_margin"
    android:text="@string/large_text" />

</android.support.v4.widget.NestedScrollView>


我在Google上找到的所有东西都说要删除FAB XML属性以阻止它出现,但这似乎过时了,因为它不存在。我可以去哪里取下这个?谢谢。

当您生成一个滚动活动时,它将生成两个名为
Activity\u Scrolling.xml
content\u Scrolling.xml
的xml文件。只需从
activity\u scrolling.xml
文件中删除FAB块

删除此块:

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/fab_margin"
    app:layout_anchor="@id/app_bar"
    app:layout_anchorGravity="bottom|end"
    app:srcCompat="@android:drawable/ic_dialog_email" />

右键单击布局文件夹,然后单击在路径中查找

搜索浮动

从那里删除块,然后按Ctrl+Enter键


谢谢你,我不知道我怎么会错过这个。如果允许,将接受作为答案。