Change image of relativelayout  dynamically in Android; Change the image and
assign the resource image dynamically;
Code Snippet:
Place the relativeLayout  in the screen like; Here you can see that SRC
is used to assign the screen for Image View. Here need to assign the background
image to the Resource images;
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"  android:id="@+id/rlScreen"
android:background="@drawable/apple1" >
Change the relativeLayout  Image dynamically by;
rlScreen.setBackgroundResource(R.drawable.zip);
There zip present in the resourse file;
 
No comments:
Post a Comment