私はBottomNavigationView
の上に影のカスタムビューを追加しようとしましたが、1つの問題があります。BottomNavigationビュー不思議な内部ビュー
BottomNavigationView
には、2人の間接的な子供 - BottomNavigationMenuView
とView
があります。後者のView
は1dpの幅を持ち、BottomNavigationView
の上に示されています。 それでBottomNavigationView
と私のカスタムシャドウの間に1dpのギャップができます。
このView
は何ですか、どうすれば避けられますか?ここで
レイアウトです:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/bottom_navigation" />
<View
android:id="@+id/bottom_shadow"
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_above="@+id/bottom_navigation"
android:background="@drawable/shadow" />
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:menu="@menu/navigation" />
</RelativeLayout>
P.S.私はそれを発見した、その奇妙なビューは実際にはの中にボトムナビゲーションビューとギャップがありません。だからそれは問題を作りません。ここにレイアウトインスペクタのスクリーンショットがあります。 しかし、まだ興味深いことに、このViewは何ですか?
あなたはポストを更新した –
スクリーンショットを追加することができます。 – Alexey