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 Simple Android App (2014) Improving Our Code Dynamically Changing the Background Color

Keivan Norouzi
Keivan Norouzi
4,513 Points

On my virtual device, the screen of relativeLayout (main screen) does not stretch full screen.

Hi,

When I run my code, on the virtual device, the app (relativeLayout) does not appear as full screen, although it looks OK on the xml design section. Could anybody help me with this please? Thanks

Ben Deitch
Ben Deitch
Treehouse Teacher

Could you post the layout file?

Keivan Norouzi
Keivan Norouzi
4,513 Points

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".FunFactsActivity" android:background="#c25975" android:id="@+id/RelativeLayout1" android:clickable="false">

1 Answer

Ben Deitch
STAFF
Ben Deitch
Treehouse Teacher

Hmm there doesn't seem to be anything wrong with that. Maybe post your FunFactsActivity as well. Also, in what way does it not look full screen?

Keivan Norouzi
Keivan Norouzi
4,513 Points

I think I found where was the issue . In the styles.xml, the style was set to Theme.Holo.Dialog.Light.NoActionBar instead of Theme.Holo.Light.NoActionBar .

Thank you so much anyway :)