Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Text Under Icons #424

Closed
josefkorbel opened this issue Aug 22, 2016 · 10 comments
Closed

Disable Text Under Icons #424

josefkorbel opened this issue Aug 22, 2016 · 10 comments

Comments

@josefkorbel
Copy link

Hello guys, can anyone tell me how to set bottombar to "only icon mode" ? I have the icons moved up, like the text was there, but i want to use only icons, having empty text there is not enought for it apparently, thanks in advance !

@sayoojvalsan-demandmedia

I have the same issue.

@Mayur-007
Copy link

same problem..

@alizarei95
Copy link

same for me

@oradkovsky
Copy link

Actually this library does support icon-only mode, though may be it's not straightforward. If you look into code, you'll notice that TextView's style (your label below icon) is: BB_BottomBarItem_TitleStyle (do not mix with text appearance - that's different). So you can override it like this:

<style name="BB_BottomBarItem_TitleStyle" parent="BB_BottomBarItem_TitleStyle"> <item name="android:visibility">gone</item> </style>

One last bit to do is to change container gravity (container is what hosts tab views like imageview, textview etc)

for (int i = 0; i < mBottomBar.getTabCount(); i++) { mBottomBar.getTabAtPosition(i).setGravity(Gravity.CENTER_VERTICAL); }

The above works for default BottomBar settings (likely for other settings as well, but I wasn't testing).

@josefkorbel
Copy link
Author

Wow, it actully work somehow, thanks @oradkovsky

@akrupych-remit
Copy link

akrupych-remit commented Oct 10, 2016

@roughike Please set the gravity to "center" in tab layouts. Also, would be nice to allow title hiding with xml attribute.

@liovincis
Copy link

Ok that seems to work, but the problem is now the icons are too small, is there a way to increase the icon size since there is more space available with the text removed?

@Shamsul1
Copy link

my issue is total opposite. i don't see any text under icons.

@sagarc91
Copy link

app:bb_titleTextAppearance="@dimen/bottom_text"

just override this with bottom_text=0dp

@roughike
Copy link
Owner

A duplicate of #373, so closing this one.

Expect to see this with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants