I am following step by step instructions shared on development platform of google http://developer.android.com/training/basics/actionbar/index.html
But some how due to some reason I am not seeing ic_action_search.png on Menu bar in my simulator, though it is imported and copied on drawable-hdpi.
Listing down all options tried till now (using eclipse IDE):
- Import image ic_action_search.png
- Don't import image but copy it directly on folder
- Size of image, I have copied it directly from Android_Design_Icons.zip suggested at https://developer.android.com/design/downloads/index.html
- Recompile project by "Clean"
- Deleting res in bin folder
- Deleting R.java in gen folder
- Creating whole project altogether again
- Changing option android:showAsAction to "never", "always", "ifRoom"
- Placing .png file at right place
- Not using .jpg only .png
- Using Support library
- Using lower case to define file names
- Added following to menu tag, xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.actionbar.MainActivity"
- Added follwoing to item tag android:actionViewClass="android.widget.SearchView"
My main_activity_actions.xml looks like,
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Search, should appear as action button -->
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="never" />
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:showAsAction="never" /></menu>
.... but still I cant see search image getting loaded up in menu bar. Though settings icon shows the action_search value defined in string.xml I am not using Support Library Setup as of now, and android:minSdkVersion="11" android:targetSdkVersion="19"
I need to show this, as there is something wrong here and as i go further I still cant load any other image. Please advise