Cordova splash screen change spinner color on android

后端 未结 2 1258
-上瘾入骨i
-上瘾入骨i 2021-01-12 12:09

I found some solutions to change the color of the spinner on iOS:

How to show custom Splash Screen Spinner (i.e spinner with white color) in iOS phonegap app?

<
相关标签:
2条回答
  • 2021-01-12 13:06

    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);
    
    0 讨论(0)
  • 2021-01-12 13:07

    add this line in your project config.xml file .

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

    0 讨论(0)
提交回复
热议问题