Cordova splash screen change spinner color on android

主宰稳场 提交于 2019-12-01 04:43:50

customspinner.xml

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"
    android:toDegrees="360">
    <shape android:shape="ring" android:innerRadiusRatio="3"
        android:thicknessRatio="8" android:useLevel="false">
        <size android:width="76dip" android:height="76dip" />
        <gradient android:type="sweep" android:useLevel="false"
            android:startColor="yourcolor" 
            android:endColor="yourcolor"
            android:angle="0"
             />
    </shape>
</rotate> 

Save in drawable folder.

Then add this in your java code

progressBar.setIndeterminateDrawable(R.drawable.customspinner);
                          or
progressBar.setBackground(R.drawable.customspinner);

add this line in your project config.xml file .

<preference name="TopActivityIndicator" value="white"/>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!