Skip to content

"iconsOnly" doesn't center the icon in the view container #869

@Drakuwa

Description

@Drakuwa

I'm on version 2.3.1 and I've tried every combination of iconsOnly, adding it as a View attribute: app:bb_behavior="iconsOnly", or adding it in every tab item separately - it never works as expected, both on a Samsung Galaxy S8 and a OnePlus 5.

I have 4 tabs (I've tried tabs with and without a title) and my layout is defined as:

<com.roughike.bottombar.BottomBar
android:id="@+id/bottom_navigation_menu"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
app:bb_activeTabColor="@color/black"
app:bb_behavior="iconsOnly"
app:bb_inActiveTabAlpha="0.8"
app:bb_inActiveTabColor="@color/grey_tint_3"
app:bb_showShadow="true"
app:bb_tabXmlResource="@xml/bottom_navigation_menu" />

...and I've even tried different heights, still, the icons are top aligned. I'm using 24dp icons generated in the Asset Studio with 0 padding, and the only difference I see with and without iconsOnly is that the icons change size (larger when using iconsOnly), but still remain aligned in the top section of the view container.

The only manipulation I do on the BottomBar is adding OnTabSelect and OnTabReselect listeners...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions