How to put repeat images over a gradient shape in Android? -
i have code in xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >  <gradient     android:angle="90"     android:endcolor="#222288"     android:startcolor="#9966cc" /> how can add repeated image on gradient? background layer of android project. android:
<style type="text/css"> body { background-color: #666; background-image:url(repeated_image.gif) } </style> 
ok, have answer using layer-list shape , bitmap:
<?xml version="1.0" encoding="utf-8"?> <item>     <shape         xmlns:android="http://schemas.android.com/apk/res/android"         android:shape="rectangle" >         <gradient             android:angle="90"             android:endcolor="#222288"             android:startcolor="#9966cc" />     </shape> </item> <item>     <bitmap         xmlns:android="http://schemas.android.com/apk/res/android"         android:src="@drawable/repeated_image"         android:tilemode="repeat" /> </item> 
Comments
Post a Comment