kmshack / Android-ParallaxHeaderViewPager

DEPRECATED
Apache License 2.0
1.39k stars 336 forks source link

Android.R.id.home returns null #20

Open ulohani90 opened 9 years ago

ulohani90 commented 9 years ago

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!!!!

jivrajss commented 9 years ago

Please post the stacktrace!

vfede commented 9 years ago

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

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