Reputation: 469
i want icon like in above image problem is that icon appears on action bar in preview but on device these icon does not visible they are like below image
here is my menu.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item android:id="@+id/action_list"
android:icon="@drawable/list"
android:title="list"
app:showAsAction="always" />
<item android:id="@+id/action_grid"
android:icon="@drawable/grid"
android:title="grid"
app:showAsAction="always" />
</menu>
here is my Manifest.xml
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest><br>
any help will be appreciable. please help me thanks.
Upvotes: 1
Views: 67
Reputation: 469
finally find answer of this problem this occur because of wrong theme slove this by using android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
theme instead of android:theme="@style/AppTheme"
.
Upvotes: 1