no actionbar

When copying projects from an Android sample project I’ve found that when the app runs there is no action bar visible. Solved this by the following.

Into the top of the activity put ab;

Into onCreate put


Create method

    private void actionBarSetup() {
            ab = getSupportActionBar();

Change Activity to AppCompatActivity.

This entry was posted in Android. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *