私のAndroidアプリケーションに問題があります。私はスナックバーのレイアウトを修正しようとしています。それは私のBottomBarとうまく適合しないからです。投稿した写真が見える場合は、表示されてはならない2つのアイテムの間に小さなスペースがあることがわかります。XML項目が正しく一致しません
コードを表示します。 MainActivityの中にBottomBarとFrameLayoutがあります。私のスナックバーが私の断片に表示されます(その枠組みの中で)。 MainActivity.xml
:
は、あなたがこのレイアウトの問題を引き起こす可能性があるものを知っていますか:ここで<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imageview_logo"
android:layout_above="@id/bottomBar"
android:layout_alignParentStart="true">
</FrameLayout>
<com.roughike.bottombar.BottomBar
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
app:bb_tabXmlResource="@xml/bottombar_tabs"
android:layout_height="60dp"
app:bb_inActiveTabColor="@color/inActiveTabColor"
app:bb_inActiveTabAlpha="0.8"
app:bb_activeTabAlpha="1" />
Fragment.java
This is the java class that shows my Snackbar.
は、問題の絵です? ありがとうございます。
idはGoogle Bottom Toolbarライブラリを使用してください。これは役に立ちます - https://medium.com/@hitherejoe/exploring-the-android-design-support-library-bottom-navigation-drawer-548de699e8e0#.iho7rvvm9 – Shmuel