I have Floating action menu and I use this library to make it 'com.github.clans:fab:1.6.1'
Now I need change my icon when I click on it. I have some icon, and when I click on menu I need to transform it to another icon(icon plus). Is it possible?
This is my xml:
<com.github.clans.fab.FloatingActionMenu
android:id="@+id/menu3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
fab:menu_icon="@drawable/ic_float_cards"
android:layout_margin="16dp"
fab:menu_animationDelayPerItem="0"
fab:menu_colorNormal="@color/event_background"
fab:menu_colorPressed="@color/fab_colorPressed"
fab:menu_colorRipple="@color/fab_colorRipple"
fab:menu_labels_maxLines="2"
fab:menu_labels_ellipsize="end">
<com.github.clans.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_dial_fill"
fab:fab_label="Пополнить"
style="@style/MenuButtonsSmall.Green" />
<com.github.clans.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_dial_pay"
fab:fab_label="Оплатить"
style="@style/MenuButtonsSmall.Yellow" />
<com.github.clans.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_dial_outcome"
fab:fab_label="Перевести"
style="@style/MenuButtonsSmall.Red" />
<com.github.clans.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_dial_income"
fab:fab_label="Запрос перевода"
style="@style/MenuButtonsSmall.DarkPink" />
<com.github.clans.fab.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_dial_send"
fab:fab_label="Сообщение"
style="@style/MenuButtonsSmall.Purple" />
</com.github.clans.fab.FloatingActionMenu>
At first icon is ic_float_cards
, but when I click it should be isic_float_cross
If you have some ideas tell me please)