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 Build a Blog Reader Android App Rebuilding from Scratch Creating the Project and ListActivity

Fernando Tancini
Fernando Tancini
6,386 Points

Hey, we changed the MainListActivity extends to "ListActivity" instead of "ActionBarActivity", right? But...

But i noticed that the actionbar disappeared when I ran the app. It doesn't happen in the video. why? And also, how can I still have actionbar when creating a ListActivity? (I'm using the newest Android Studio)

1 Answer

The ActionBar visibility is controlled by the Theme, which is in the styles.xml file under your values folder.

Setting the style to something like this will make the action bar visible

   <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">

You can use code completion (ctrl+space on windows) to look through the different themes.

Or, in Android Studio you can use the "AppTheme" button while in "Design" view of your activity's layout.