Skip to content

Android.R.id.home returns null #20

Open
@ulohani90

Description

@ulohani90

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions