Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

xml - Android - Actionbar not showing in the development preview

Actionbar not showing in the development preview but showing normally after running the app, minimum api is 15, tried to delete the them from the manifest file, didn't show the actionbar, and can't run the app anymore.

It is a completely new project (tried deleting it and recreating it and creating several other with different minimum api, still not showing in the development)

My theme is blank with a parent "parent="Theme.AppCompat.Light.DarkActionBar""

Trying to use a holo light theme, crashed and got that error "java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity."

Default activity extends actionbaractivity instead of activity, fixed now. Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you can't see the action bar AND also the status bar or buttons, it could be because the "Show Layout Decorations" options is turned off in the Layout Editor. Just check this option and everything should be displayed again. As per Android Studio 3.3:

Turning on Layout Decorations in Android Studio 3.3


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...