Skip to content Skip to sidebar Skip to footer

How To Change Background Image Of An Activity

Hei every one. I'm an starter android programmer and I'd like know how can I make a custom them.for example how can I set an image for background of an activity.

Solution 1:

place an image file in the drawable folder of your android project,then in your activity's xml file

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/myId"
    android:orientation="vertical" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:background="@drawable/backgroundImage">   <!--specify the image here-->
</RelativeLayout>

Post a Comment for "How To Change Background Image Of An Activity"