Even With setHomeButtonEnabled(true) App Icon not Clickable in Android 14 -


my code: (updated) i've added oncreateoptionsmenu , onoptionsitemselected method here :

  actionbar actionbar = getactionbar();   actionbar.sethomebuttonenabled(true);   actionbar.setdisplayhomeasupenabled(true);   @override   public boolean oncreateoptionsmenu(menu menu) {     // inflate menu; adds items action bar if present.     getmenuinflater().inflate(r.menu.login, menu);     return true;     }    @override    public boolean onoptionsitemselected(menuitem item) {    // handle item selection    switch (item.getitemid()) {        case r.id.action_createinvoice:            startactivity(new intent("com.domain.activity1"));            return true;         default:            return super.onoptionsitemselected(item);        }    } 

my manifest file:

    <uses-sdk     android:minsdkversion="14"     android:targetsdkversion="17" />      <activity android:label="@string/activity" android:name=".activity"         android:parentactivityname="com.some.activity">          <meta-data         android:name="android.support.parent_activity"         android:value="com.some.activity" />         <intent-filter>             <action android:name="com.this.activity" />             <category android:name="android.intent.category.default" />         </intent-filter>     </activity> 

with settings, app icon not clickable in android 14 emulator

override onoptionsitemselected() :

@override public boolean onoptionsitemselected(menuitem item) {     switch (item.getitemid()) {     case android.r.id.home:         // stuff here, eg: finish();         return true;     default:         return super.onoptionsitemselected(item);     } } 

for list of android's ids :http://developer.android.com/reference/android/r.id.html#home


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -