1

here deleted setting action bar and inserted my icon;while compile it shows default dropdown setting;i need to replace it with my icon and should be clickable. enter image description here

enter image description here

enter image description here

Rahul
  • 404
  • 4
  • 16

2 Answers2

1

As Sanjeet Ajnabee explains, try using android:showAsAction="always" you should use app:showAsAction="always" and add xmlns:app="http://schemas.android.com/apk/res-auto" to your menu tag. Check this

Community
  • 1
  • 1
Jago
  • 155
  • 9
0

This will work fine

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

tools:context="com.example.loadimage.MainActivity" >


<item

    android:id="@+id/icon_id"

    android:orderInCategory="100"

    android:icon="@drawable/youricon"

    android:title="@string/action_settings"

    app:showAsAction="always"/>

saeed
  • 1,935
  • 1
  • 18
  • 33