本文介绍了Android的渐变为progressDrawable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有progressDrawable发生器或东西,可以帮我做这个梯度()

Is there any progressDrawable generator or something that can help me doing this gradient (http://store.picbg.net/pubpic/DB/0E/15183348237ddb0e.png) ?

我trye​​d几件事情,但没有成功,我会很高兴,如果有东西,可以缓解这一进程。

I tryed several things but without success I will be glad if there is something that can ease the process.

推荐答案

<?xml version="1.0" encoding="utf-8"?>

<item android:id="@android:id/background">
    <shape>
        <gradient
            android:angle="0"
            android:centerColor="#00000000"
            android:centerX="1"
            android:endColor="#00000000"
            android:startColor="#00000000" />
    </shape>
</item>
<item android:id="@android:id/secondaryProgress">
    <clip
        android:clipOrientation="horizontal"
        android:gravity="left" >
        <shape>
            <gradient
                android:angle="0"
                android:centerColor="#0000CC"
                android:centerX="0.75"
                android:endColor="#0000CC"
                android:startColor="#0000CC" />
        </shape>
    </clip>
</item>
<item android:id="@android:id/progress">
    <clip
        android:clipOrientation="horizontal"
        android:gravity="left" >
        <shape>
            <gradient
                android:angle="0"
                android:centerColor="#0000CC"
                android:centerX="0.75"
                android:endColor="#0000CC"
                android:startColor="#0000CC" />
        </shape>
    </clip>
</item>

这篇关于Android的渐变为progressDrawable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-10 18:54