andremion / CounterFab

A FloatingActionButton subclass that shows a counter badge on right top corner

Home Page:https://play.google.com/store/apps/details?id=com.andremion.counterfab.sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to custom size image full width and height inside CounterFab

NguyenVanLinh2016 opened this issue · comments

<com.andremion.counterfab.CounterFab
android:id="@+id/image_view_cart"
android:layout_width="32dp"
android:layout_height="32dp"
android:src="@drawable/shoppingcart"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/margin_8dp"
android:layout_centerVertical="true"
app:backgroundTint="@null"
android:background="@null"
android:scaleType="centerCrop"/>

The CounterFab flows the same rule of FloatingActionButton because it is a FAB.
So you can set the size using the xml attribute app:fabSize or the method setSize