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 trialLance Rogers
3,372 PointsI set the them to AppTheme.NoActionBar but for some reason there is still an action bar when I run the emulator.
I have tried cleaning and rebuilding the project, searched online and still can't figure out why the action bar is still showing up. Is there something else I need to do? I have the repository on github for the project https://github.com/lancekrogers/Android-Tutorial-2
maybe I missed a step or something
4 Answers
Lance Rogers
3,372 PointsOk I fixed it. I had to delete this from activity_main.xml ```XML
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
```
and this from the onCreate method in MainActivity.java
```Java
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
```
Philip Gales
15,193 Pointstry
android:theme="@style/AppTheme"
Lance Rogers
3,372 PointsThat is what I had it set to before AppTheme.NoActionBar
Philip Gales
15,193 PointsDoes the code I provided work? Be sure to change it to that in your manifest file.
Lance Rogers
3,372 PointsNo it doesn't, and I did