2017-03-23 4 views
0

私のAndroidアプリケーションに問題があります。私はスナックバーのレイアウトを修正しようとしています。それは私のBottomBarとうまく適合しないからです。投稿した写真が見える場合は、表示されてはならない2つのアイテムの間に小さなスペースがあることがわかります。XML項目が正しく一致しません

コードを表示します。 MainActivityの中にBottomBarとFrameLayoutがあります。私のスナックバーが私の断片に表示されます(その枠組みの中で)。 MainActivity.xml

enter image description here

は、あなたがこのレイアウトの問題を引き起こす可能性があるものを知っていますか:ここで

<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. 

は、問題の絵です? ありがとうございます。

+0

idはGoogle Bottom Toolbarライブラリを使用してください。これは役に立ちます - https://medium.com/@hitherejoe/exploring-the-android-design-support-library-bottom-navigation-drawer-548de699e8e0#.iho7rvvm9 – Shmuel

答えて

0

問題はBottomBar自体の影だと思います。この問題を解決するには、BottomBarのプロパティ "showshadow"をxmlファイルのfalseに設定します。

<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" 
    app:bb_showShadow="false"/> 
+0

http://stackoverflow.com/questions/42705626/アクティビティ間のパラメータ渡し - フラグメントとhttp://stackoverflow.com/questions/42534685/speeding-up-autocomplete-algorithm-with-a-big-array-listおよびhttp://stackoverflow.com/questions/ 42534685 /大規模な配列リストを使用した高速自動作成アルゴリズムアルゴリズム –

+0

http://stackoverflow.com/questions/42696079/android-notification-triggering-on-application-startup –

+0

Serial Up投票が賞賛されます時間内に。なぜこれを行うのですか? –

関連する問題