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

bt_icon not changing on state changed. #22

Open
desaichirag06 opened this issue Sep 3, 2019 · 1 comment
Open

bt_icon not changing on state changed. #22

desaichirag06 opened this issue Sep 3, 2019 · 1 comment

Comments

@desaichirag06
Copy link

desaichirag06 commented Sep 3, 2019

I am trying to change Icon of selected tab based on selection but not able to change it.

I am using Selector to switch the icons.
Icons do not support vector images (SVGs) below API level 23.

Use in activitymain.xml

 <com.gauravk.bubblenavigation.BubbleToggleView
                android:id="@+id/tab_home"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:bt_active="true"
                app:bt_badgeTextColor="@color/darkPurple"
                app:bt_colorActive="@color/darkPurple"
                app:bt_colorInactive="@color/light_black"
                app:bt_icon="@drawable/home_tab_selector"
                app:bt_padding="10dp"
                app:bt_shape="@drawable/background_stroke"
                app:bt_title="@string/home_tab"
                app:bt_titleSize="12dp"/>

Selector: home_tab_selector.xml

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@drawable/icon1" android:state_active="true" />
    <item android:drawable="@drawable/icon2" android:state_active="false" />

</selector>

Moreover, elevation is not working as it should. Also not getting the Shadow effect.

Is there any other way to do so? Please let me know.

Thanks.

@issacNabil
Copy link

+1

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

2 participants