Code2care : TechZone Apps & Tutorials

Add repeat texture background to android activity using tileMode

Step 1 : Select a repeating texture,
Repeating texture : code2care
Step 2 : Create an xml under res --> drawable having bitmap tag with android:tileMode="repeat" attribute ,
android background repeat image : code2care
<?xml version="1.0" encoding="utf-8"?>
    <bitmap xmlns:android="http://schemas.android.com/apk/res/android"
     android:src="@drawable/texture"
     android:tileMode="repeat" />
Step 3 : Now include this bitmap in the activity layout background attribute,
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/app_bg" >
</RelativeLayout>
Result :
android background repeat image : code2care
Like if you found post helpful :)







Top








Popular tags
android
x 175
eclipse
x 29
notepadplusplus
x 20
macosx
x 14
sharepoint
x 14
html
x 14
mac
x 13
androidstudio
x 11




1000+ C Programs     PHP Tutorial     JSON Tutorial     Swift Tutorial     India Pinocdes     About Us     Privacy Policy


Code2care © 2012-17