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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -