ActionBarCompat – App icon action (click) not working on 4.0 devices

I have this problem with the Android ActionBarCompat project: On emulators with Android 4.0 the click on the app icon doesn’t cause any onOptionsItemSelected event, whereas it works on all other OS versions.

Any input is greatly appreciated!

  • How to create a closed (circular) ListView?
  • Cannot find symbol class in Android Studio
  • android databinding unit test error Failed to parse data binding compiler options. Params:
  • Android 5.0 android:elevation Works for View, but not Button?
  • How to make contextual actionmode bar overlay my layout instead of “pushing” it down
  • Dagger 2 injecting multiple instances of same object type
  • Related posts:

    Adding strings localization files from a server
    Changing color of single day in calendarview, android
    This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps sh...
    Receive audio via Bluetooth in Android
    javascript max viewport height after orientation change Android & iOS
    Getting package name of application variant in gradle plugin
  • Limit the query in CursorLoader
  • What's a good library for parsing mathematical expressions in java?
  • Easiest way to launch webpage in android with an icon
  • Anything like Twitter Bootstrap for Android?
  • Preferred method of loading dependant queries with LoaderManager
  • How to specify multiple source folders in when using ant to build Android projects?
  • 2 Solutions collect form web for “ActionBarCompat – App icon action (click) not working on 4.0 devices”

    Are you seeing any touch feedback from the app icon? (Does it glow when you press it?)

    Since many activities do not use the action bar home button, in apps that target API 14+ running on Android 4.0 it is disabled by default. (This is so that users don’t try pressing it, see it glow, and wonder why nothing happened.) Apps that want to use this should call ActionBar#setHomeButtonEnabled(true).

    We should probably revise the ActionBarCompat sample to surface this more clearly. One simple way to get you up and running would be to modify and add the following:

    public void onCreate(Bundle savedInstanceState) {

    In an app where you want more control over turning this on and off you would want to make further changes.

    I had this problem as well. This code did the trick for me:

    public void onCreate(Bundle savedInstanceState) {
        if (android.os.Build.VERSION.SDK_INT >= 11) {
            //noinspection ConstantConditions
        } else {

    Some extra info: minSdkVersion="7" targetSdkVersion="18". This is the LAUNCHER activity of my project, so it has no parent activity. Using setDisplayHomeAsUpEnabled(true) in other activities worked just fine.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.