Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Layout background image and colour

what would i need to add to this so that i have a background image and a background colour for main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="330dp"
android:layout_height="600dp"
android:layout_gravity="center|center_vertical"
android:background="@drawable/background"
>
like image 262
MrJoshFisher Avatar asked Apr 16 '13 20:04

MrJoshFisher


1 Answers

You should be able to simply fill the parent and then set your background image accordingly.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
>
like image 168
Aaron McIver Avatar answered Nov 12 '22 06:11

Aaron McIver