Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Lists and Adapters (2015) Standard ListViews Updating the Main Layout

Getting rid of ActionBar in activity_main model

The ActionBar shows up in the model of my design view. I have the correct theme in app/res/values/styles.xml:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
</style>

The ActionBar does not show up in the emulator, so that's all that matters, I guess. But having it in the design view makes it difficult to work with views.

4 Answers

You need to change the theme in the design view.

The button is here:

Click here for high res

Above should be

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
</style>

Problem formatting the code in markdown. The code I have in styles.xml is <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

Harry James
Harry James
14,780 Points

Hey Jason!

I fixed the issue with the formatting for you!

Next time, be sure to leave a line after the ```xml so that it formats correctly (I did the same as you when I first started using these forums - it's an easy mistake!). You can see the change I made in the Edit section of your post if you're interested as well!

As for the answer to your question, please take a look at Patrick Corrigan's response which should fix the problem if you haven't already set your theme. If you have and are still experiencing issues though, please post back onto these forums!

I don't know what's going on with my markdown formatting, never had a problem before. Anyway, the problem is not in my styles file. I have parent="Theme.AppCompat.Light.NoActionBar". The ActionBar does not show up in emulator, just the design view model.