0

I'm having problems with my Android Application. I'm trying to fix my snackbar's layout because it doesn't fit well with my BottomBar. If you see the picture I posted, you can see there's a small space between the two items which shouldn't appear.

I'm gonna show you some code. Inside my MainActivity there's my BottomBar and a FrameLayout. My Snackbar appears on my Fragment (in that 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.

Here's a picture of the problem:

enter image description here

Do you know what could cause this layout issue? Thank you all.

Cesarsk
  • 153
  • 1
  • 2
  • 14
  • id reccomend using the Google Bottom Toolbar library. This may help - https://medium.com/@hitherejoe/exploring-the-android-design-support-library-bottom-navigation-drawer-548de699e8e0#.iho7rvvm9 – Shmuel Mar 23 '17 at 23:45

1 Answers1

0

I think the problem is the shadow of the BottomBar itself. You can fix this problem setting the property "showshadow" of the BottomBar to false in your xml file.

 <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"/>
Claff
  • 36
  • 7
  • http://stackoverflow.com/questions/42705626/passing-parameters-between-activities-fragments and http://stackoverflow.com/questions/42534685/speeding-up-autocomplete-algorithm-with-a-big-array-list and http://stackoverflow.com/questions/42534685/speeding-up-autocomplete-algorithm-with-a-big-array-list – IntelliJ Amiya Mar 24 '17 at 10:49
  • http://stackoverflow.com/questions/42696079/android-notification-triggering-on-application-startup – IntelliJ Amiya Mar 24 '17 at 10:51
  • Serial Up Voting will be revered in time .Why doing this ?? – IntelliJ Amiya Mar 24 '17 at 10:52
  • Sorry, let me understand a few things. I accept the one who solves directly my issue answering to my question. And, most of the time, my co-worker, which I don't know personally, did here, without telling me before. What is the problem if he was the one who solved my issue? If nobody answered me and helped me, and he's the one who did, why shouldn't I upvote him and accept his answer? – Cesarsk Mar 24 '17 at 11:01
  • Also, he provided multiple times a good explanation, see the one on speeding up the search bar, where also states he was working with me, so there's nothing to hide nor to take advantage of. Shouldn't I accept his answers anymore? Let me know and have a nice day. – Cesarsk Mar 24 '17 at 11:01
  • PS: @Claff , if it's a problem, don't answer me anymore, answer me privately, I'll be sorry that others can't read your answers and solve similar problems. – Cesarsk Mar 24 '17 at 11:02
  • @Cesarsk Don't take me wrongly . I am #Whistleblower – IntelliJ Amiya Mar 24 '17 at 11:04
  • I'm not, seriously. I just want to know how should I behave in those situations. I want to help here, and don't get in trouble because of it. – Cesarsk Mar 24 '17 at 11:05
  • 1
    @Cesarsk you should read https://meta.stackexchange.com/questions/98467/this-account-is-temporarily-suspended-for-voting-irregularities . Once again saying..don't take me negatively .Already checked both Git accounts – IntelliJ Amiya Mar 24 '17 at 11:06
  • Anyway thank you so much, I'll look into it. I honestly didn't know about this. Have a nice day. – Cesarsk Mar 24 '17 at 11:09