我的浮动操作按钮无法使用抽屉。我无法点击按钮,也无法设置它的位置。我在没有抽屉的其他.xml文件中尝试了相同的代码,它运行得很好。
我也试过了<FrameLayout></FrameLayout>
,但仍然没有运气。我正在使用API 23.任何建议??
我的档案..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:context="com.example.dipen.transporter.MyPostActivity"
android:theme="@style/AppTheme">
<android.support.design.widget.FloatingActionButton
android:id="@+id/myFAB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_add_white_24dp_1x"
app:backgroundTint="@color/primaryBlue"
android:layout_gravity="bottom|right"
android:layout_marginBottom="30dp"
android:layout_marginRight="30dp"
android:layout_marginEnd="30dp"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
app:fabSize="normal"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" />
</RelativeLayout>