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

Remove texts from tabs in FixedMode #373

Closed
alizarei95 opened this issue Jul 21, 2016 · 3 comments
Closed

Remove texts from tabs in FixedMode #373

alizarei95 opened this issue Jul 21, 2016 · 3 comments
Milestone

Comments

@alizarei95
Copy link

how can i remove tab titles in FixedMode ?
removing title attribute in menu file makes empty space in bottom of icons and icons gets smaller size , any idea ?
capture

@alizarei95
Copy link
Author

@roughike thank you for this library , can you help me in this case ?

@Drakot
Copy link

Drakot commented Jul 27, 2016

+1

@david-trujillo
Copy link

david-trujillo commented Aug 1, 2016

Add this after mBottomBar.setItems() and mBottomBar.useFixedMode();
mBottomBar is the BottomBar; Change for the name of your var

View viewTab = mBottomBar.getBar();
View parentView = (View) viewTab.getParent();
ViewGroup mItemContainer = (ViewGroup) parentView.findViewById(com.roughike.bottombar.R.id.bb_bottom_bar_item_container);

for (int i = 0; i < mItemContainer.getChildCount(); i++) {
        View viewItem = mItemContainer.getChildAt(i);
        //TITLE
        TextView titleTab = (TextView) viewItem.findViewById(com.roughike.bottombar.R.id.bb_bottom_bar_title);
        titleTab.setVisibility(View.GONE);
        //ICON
        AppCompatImageView icon = (AppCompatImageView) viewItem.findViewById(com.roughike.bottombar.R.id.bb_bottom_bar_icon);
        icon.setY(6);
        //hack for fix the color set in setActiveTabColor
        icon.setColorFilter(titleTab.getCurrentTextColor());
}


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

No branches or pull requests

4 participants