Android-ParallaxHeaderViewPager icon indicating copy to clipboard operation
Android-ParallaxHeaderViewPager copied to clipboard

Android.R.id.home returns null

Open ulohani90 opened this issue 9 years ago • 2 comments

I am using the same logic but getActionBarIcon() returns null. Actually android.R.id.home as a imageview is returning null.

@TargetApi(Build.VERSION_CODES.HONEYCOMB) private ImageView getActionBarIconView() {

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        return (ImageView) findViewById(android.R.id.home);

    }

    return (ImageView) findViewById(android.support.v7.appcompat.R.id.home);
}

Help me please!!!!

ulohani90 avatar Mar 10 '15 10:03 ulohani90

Please post the stacktrace!

jivrajss avatar Apr 06 '15 08:04 jivrajss

I had this one too, just use v19 appcompat in your dependencies

dependencies {
    compile 'com.android.support:appcompat-v7:19.0.0'
}

vfede avatar May 06 '15 11:05 vfede