如何改变的活性的背景图像
问题描述:
喜每一个人。 我是一个入门的Android程序员,我想知道我怎样才能使一个自定义的them.for例子,我怎么可以将图像设置为活动的背景。
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.
答
放置一个图像文件中的您的Android项目的绘制
文件夹,然后在活动的XML文件
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>