i using appcompat action bar , want change icon of searchview use in action bar. searched couldn't find solution.
i have tried setting icon in style :
<item name="homeasupindicator">@drawable/mybackbutton</item>
but want set 1 programmatically when user selects search view. ideas on how can it?
to customize searchview "up" icon, can use style attribute:
collapseicon="@drawable/ic_discard_icon" in toolbar layout:
<android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:collapseicon="@drawable/ic_discard_icon"/> or can move attribute toolbar style. wish.
Comments
Post a Comment