Monday, 26 October 2015

android actionlayout size image size


I have another blog for using actionlayout to customize an actionbar button (show basket size)

http://baiduhix.blogspot.co.uk/2015/10/android-display-numbers-on-action-bar.html

However, if your icon is too big, it may show a big icon on your actionbar.

There is a solution for solving this: (but doesn't really work for me)

http://stackoverflow.com/questions/23178751/set-actionbar-icon-height-to-match-actionbar-height


My solution is set icon size (not change image size, that will make your icon unclear),:

<ImageView
    android:id="@+id/hotlist_bell"
    android:src="@mipmap/basket_icon"
    android:layout_width="32dp"
    android:layout_height="32dp"


No comments:

Post a comment