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 trialHenrique Goyano
2,651 PointsActionbar is now Toolbar... how to convert?
Actionbar is now Toolbar... how to convert?
Treehouse could upload a new project using this?
2 Answers
hubertl
8,483 PointsHi Henriques, action bar ON and OFF can be supported by theme you will use: in Android studio please go to
res/values/styles.xml Example 1 (no action bar)
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
</style>
Example 2 (with action bar)
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
To review all theme list please remove parent and simply you can start typing Theme.... or android etc. For some of the themes you will need to add dependencies to your gradle file (some are supported from the start) I noticed also that latest version of Android studio is adding it already
Gradle file:
in the latest version of Android Studio please go to:
GradleScripts/buildgradle(Module app)
and review section (below my file)
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.2'
}
In older version gradle file might be in different place (and if remember correctly it was just one gradle called buildgradle.
After you will change please find in top menu: Sync Project Gradle File - this button should on left from AVD Manager.
Thanks, Hubert