Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Custom Rotate Loading

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 340
    Comment on it

    Here I am sharing a custom progress bar to show loading.

    First of all, we need to define it in gradle file

    compile 'com.victor:lib:1.0.2'

    Then in xml file:

     <com.victor.loading.rotate.RotateLoading
                android:id="@+id/loading"
                android:layout_width="100dp"
                android:layout_height="100dp"
                app:loading_width="5dp"
                app:loading_color="#ffffff"
                android:layout_centerInParent="true"/>
        </FrameLayout>
    

    In java code:

    RotateLoading mRotateLoading;
     mRotateLoading = (RotateLoading)findViewById(R.id.loading);
    

    When we want to start loading

    mRotateLoading.start();
    

    When we want to stop loading

    mRotateLoading.stop();
    

    Just try it.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: