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 trialJai Udit Dipikar
1,791 PointsWhy is my app not fullscreen
I did the final padding change to 50dp and followed that with no action bar. However when I run my project the output on the avd isnt full screen. However the preview on android studio looks correct. What changed would I need to make?
3 Answers
Ratik Sharma
32,885 PointsYou need to use android:Theme.Holo.Light.NoActionBar in place of android:Theme.Holo.Light.Dialog.NoActionBar. Remove the 'Dialog'.
Jai Udit Dipikar
1,791 PointsThanks man, it works fine now.
Marcos Avila
1,757 PointsBeware with the version API, in the styles file we can see...
<!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. -->
So, if you edit the styles file in res/values the action bar will not dissapear. You need edit the styles file for your API level, on my case res/valuesv14.
Joe Moore
1,482 PointsThank you this helped me :)
Zulkhairee Sulaiman
216 Pointswhat do you mean 'by your API level'? i dont have valuesv14 at all
Ratik Sharma
32,885 PointsIf you're sure you did everything correctly while editing styles.xml, try cleaning or re-building your project once. Go to Build -> Clean or Rebuild project. If that doesn't help, post your styles.xml file and AndroidManifest.xml on here and I'll have a look.
Jai Udit Dipikar
1,791 PointsStyle.xml: <resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.Dialog.NoActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.jai.funfacts" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".FunFactsActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks
Kevin Haube
12,265 PointsKevin Haube
12,265 PointsIf you'd like, just a tip... experiment with the
Theme.Holo.Ligh.NoActionBar.Fullscreen
style. :) It's WONDERFUL for log-in/sign-up screens!