Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Evan Dix
Evan Dix
1,641 Points

My action bar wont go away!

I am making the fun facts app, and I went into my syles.xml and changed the theme from ".DarkActionBar" to ".NoActionBar". I saved the changes and even cleaned/rebuild/ restarted android. NOTHING will work?! help

Ken Alger
Ken Alger
Treehouse Teacher

Evan;

Welcome to Treehouse!

Can you post the entire style line in styles.xml? Also, what API level are you targeting in your FunFacts App? The action bar can be persnickety on various versions.

Ken

2 Answers

James Tyranski
James Tyranski
3,957 Points

First thing after I do after creating the project, is in the styles.xml I use the following:

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

I run the application on my device and the action bar is gone.

Ken Alger
Ken Alger
Treehouse Teacher

Edited for code markup

Please see this post for instructions on how to post markup.

James Tyranski
James Tyranski
3,957 Points

I'm looking back at my FunFacts app and realize my action bar is still there, even if I change my Theme in styles.xml. I posted based on a new project, so I'll see if I can figure it out and post my results.

Evan Dix
Evan Dix
1,641 Points

ok guys! i got it to go away when i run the " hello world" app in my emulator. but it is still on the screen in android studio(the activity_app.xml) where you can visually add/drag buttons onto the screen or manipulate it in code. What should i do to get the action bar off of this screen? and i am running an 19 api i believe