BottomBar icon indicating copy to clipboard operation
BottomBar copied to clipboard

Tabs text gets cut off for unselected tabs

Open bkjbkjbnkj687698698 opened this issue 10 years ago • 13 comments

I have integrated BottomBar. The issue I am having is that the tabs text gets cut off from bottom for unselected tabs.Below is the code I am using.How can i resolve it?

... <com.roughike.bottombar.BottomBar android:id="@+id/bottomBar" android:layout_width="match_parent" android:layout_height="@dimen/dp70" android:layout_alignParentBottom="true" app:bb_tabXmlResource="@xml/bottombar_tabs" /> bottombar_tabs.xml

bkjbkjbnkj687698698 avatar Oct 13 '16 16:10 bkjbkjbnkj687698698

You have a problem with the dimensions of your image, You need to reduce the icon sizes, For MDPI it shd be 24 X 24. accordingly you can have the sizes of hdpi, mdpi, ldpi xhdpi .....

MuralikrishnaM avatar Oct 15 '16 00:10 MuralikrishnaM

I'm also seeing this...sometimes it happens, sometimes not..

mlake avatar Oct 29 '16 16:10 mlake

I've got also issues with that: screenshot: http://imgur.com/a/HUvPm

The sizes of my icons are okay. mdpi is 24 x 24px

 <com.roughike.bottombar.BottomBar
            android:id="@+id/bottomBar"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:layout_alignParentBottom="true"
            app:bb_tabXmlResource="@xml/main_menu_company" />

Byteschmiede avatar Oct 31 '16 13:10 Byteschmiede

Can confirm. Get bottom parts of letters p,y,... cut off (at 60dp height)

TillSimon avatar Nov 02 '16 15:11 TillSimon

Yep, i am facing this problem too Any solution right now?

Thanks

manhhoangxuan avatar Nov 08 '16 01:11 manhhoangxuan

Also got the same here, just randomly happened about an hour ago when I was amending the navigation drawer color in my style then it just happened. Will keep an eye out if any one has any solutions. Will continue to troubleshoot.

daveak01 avatar Nov 08 '16 23:11 daveak01

Might be worth checking this note: https://github.com/roughike/BottomBar/issues/436 of the bug guys, seems like a known issue. There is a fix in the thread that worked for me but didn't for others. The bug looks like it's going to be addressed in the next release.

daveak01 avatar Nov 08 '16 23:11 daveak01

I have the same problem , sometimes have ,sometimes not

OldjToy avatar Nov 16 '16 13:11 OldjToy

Same here. The issue happens after being redirected from a full screen activity.

xizhang avatar Nov 19 '16 16:11 xizhang

I have managed to make the textsize smaller by adding a new style resource like so:
    <style name="Text" parent="Theme.AppCompat.Light">
        <item name="android:textSize">12sp</item></style>

Then set this style to your BottomBar's xml: 
    <com.roughike.bottombar.BottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:layout_gravity="bottom"
        android:background="#00000000"
        app:bb_activeTabColor="#ffffff"
        app:bb_behavior="shy"
        app:bb_inActiveTabAlpha="0.2"
        app:bb_inActiveTabColor="#000000"
        app:bb_showShadow="false"
        app:bb_tabXmlResource="@xml/bottombar_tabs"
        app:bb_titleTextAppearance="@style/Text" />

s-nour avatar Nov 20 '16 09:11 s-nour

Thanks it's solved ! https://github.com/roughike/BottomBar/issues/589

LOG-TAG avatar Dec 04 '16 16:12 LOG-TAG

I actually found a better solution of reducing text size: <com.roughike.bottombar.BottomBar ... app:bb_titleTextAppearance="@style/BB_BottomBarItem_TitleStyle" />

In styles.xml add <style name="BB_BottomBarItem_TitleStyle"> <item name="android:maxLines">1</item> <item name="android:height">24dp</item> <item name="android:gravity">center_horizontal</item> </style>

marco-bor avatar Jan 21 '17 22:01 marco-bor

It's indeed solved in versions 2.1.0 and up.

roughike avatar Jan 22 '17 09:01 roughike