Answer the question
In order to leave comments, you need to log in
How to set ActionBar when inheriting from Activity class?
In an application that supports min. API 16 Android I want to use ActionBar, but I want to inherit MainActivity from Activity class, not from ActionBarActivity. How can this be implemented? After all, as I understand it, the toolbar on API 16 will not work (
Answer the question
In order to leave comments, you need to log in
What for? Well, put the AppCompat theme with ActionBar. Please note that now instead of ActionBarActivity, you need to inherit from AppCompatActivity.
UPD: check which FragmentManager you are using. With AppCompatActivity, you need to use SupportFragmentManager. A similar problem is googled in 3 seconds.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question