我是android的新手,请原谅我,如果我太明显了。
我的第一个问题是使用FloatingActionButton。我基本上只需要在FloatingActionButton上保存搜索,但是只有当我运行应用程序而不是在设计视图(也不是文本视图)时才会出现另一个..这是从哪里来的,我该如何删除它??
XML文件
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_marginTop="@dimen/fab_margin_top"
android:src="@drawable/ic_favorite_24dp"
android:contentDescription="@string/save_description"
android:layout_alignParentRight="true"
android:layout_alignParentStart="false"
android:layout_alignTop="@+id/tagTextInputLayout" />
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/URLTextInputLayout"
android:layout_below="@id/view"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:hint="@string/url_prompt"
android:singleLine="true"
android:layout_below="@+id/view"
android:layout_toRightOf="@+id/URLTextInputLayout"
android:layout_toEndOf="@+id/URLTextInputLayout" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tagTextInputLayout"
android:layout_below="@id/URLTextInputLayout">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/tag_prompt"
android:imeOptions="actionDone" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tagTextInputLayout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/tagged_links"
android:id="@+id/textView"
android:gravity="center_horizontal"
android:textStyle="bold"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" />
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/recyclerView"
android:layout_weight="1"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" />
</LinearLayout>