下のナビゲーションバーをFABに重ねようとしています。私は私のnavigationbarは次のようになりたい:FABを下のナビゲーションバーの内側で切り取らないようにする
しかし、その代わりに、それはそうのようなボタンカットオフ:私はカットオフされることからFABを防ぐにはどうすればよい
を?ここに私のXMLです:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mobgen.designsprintapp.ui.main.MainActivity">
<LinearLayout 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"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?android:attr/windowBackground"
android:backgroundTint="@color/colorPrimary"
app:itemBackground="@color/colorPrimary"
app:itemIconTint="@color/nav_item_color_state"
app:itemTextColor="@android:color/black"
app:menu="@menu/navigation" >
<android.support.design.widget.FloatingActionButton
android:id="@+id/tools"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="center"
android:layout_marginBottom="8dp"
android:elevation="6dp"
android:scaleType="center"
app:srcCompat="@drawable/play" />
</android.support.design.widget.BottomNavigationView>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
は、私はFABは、下のナビゲーションビューの境界内に完全にしたくない、それはあなたが画像上で見ることができるように、わずかにトップをオーバーラップしなければなりません。 – Tim
@Tim、それがあなたの必要条件ならば、 '' android:clipChildren = "false" '](https://developer.android.com/reference/android/view/ViewGroup.html#attr_android:clipChildren)を' BottomNavigationView '。 – azizbekian
linroid:clipChildren = "false"を直線レイアウトに適用する必要がありました – Tim