Adsence

New2

Friday, June 28, 2013

Change Background in Android Layout

In our last tutorial we have teach you how you can creat a Hellow world Project now.If you have not seen that and you did not familiar with creating a project so you can see it on Creat First Android Project.

In our this tutorial we will be telling you how you can Change a Background in Android.You have already know what is XML and what is activity.Now once have you created the project.You show go to XML layout file.You can do this by simple clicking on the tab of activity_main.xml.Following image will be displayed  at the end result.

Their is another way you can do that is show in below image








After you reach to xml.Then you have to add image in folder which you wnat to show so just drag image you want and place it in the drawable folder.There are differnt drawable folder are present.If you want High resolution back ground then put it in first Drawable.See below how you can do that
Now you have to add following code in this XML in Relative layout 
     android:background="@drawable/jac"
Where android:background is command and @drawable is the folder where image is placed and /jac is the name of the image.

Now your background has been added in adroid.

In our next tutorial we will be telling how you can button in android and also how you can change Android button background.

0 comments:

Post a Comment