Custom progress bar

    Custom progress bar


    Article summary

    • You can change the style of the progress bar that appears while loading the video when entering a broadcast.

    • Change progress bar color. (Default: white)

    ShopLive.setLoadingProgressColor(Color.RED)


    Set up an image animation progress bar

    res/drawable/progress_animation.xml

    <?xml version="1.0" encoding="utf-8"?>
    <animation-list xmlns:android="http://schemas.android.com/apk/res/android"
        android:oneshot="false">
    
        <item android:drawable="@drawable/loading1" android:duration="100" />
        <item android:drawable="@drawable/loading2" android:duration="100" />
        <item android:drawable="@drawable/loading3" android:duration="100" />
        <item android:drawable="@drawable/loading4" android:duration="100" />
        <item android:drawable="@drawable/loading5" android:duration="100" />
        <item android:drawable="@drawable/loading6" android:duration="100" />
        <item android:drawable="@drawable/loading7" android:duration="100" />
        <item android:drawable="@drawable/loading8" android:duration="100" />
    </animation-list>
    ShopLive.setLoadingAnimation(R.drawable.progress_animation)