10
對於linearLayout,我希望在背景中有一個漸變(平鋪)(重複)圖像。我已經有一個形狀xml設置爲背景使用梯度和平鋪圖像的Android背景
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:angle="90"
android:endColor="@color/color1"
android:startColor="@:color/color2">
</gradient>
</shape>
如何添加平鋪的bg圖像?
有一個很好的解釋,請看這個[link](http://androidblogger.blogspot.com/2009/01/how-to-have-tiled-background-cont.html)。 –
我知道如何做到這一點,我不知道的是如何把他們兩個都做到一起。 – Taranfx
好的,對不起。那麼也許這個[問題](http://stackoverflow.com/questions/4159959/android-circular-gradient-alpha-mask)可能會幫助你。我將在位圖xml中使用平鋪圖像,如我發佈的第一個鏈接中所解釋的,然後嘗試在其上添加漸變,然後在畫布上繪製像這樣的其他SO問題。希望能幫助到你。 –