How to make Awesome looking ProgressBar in your android application

Hello guys in this post I will tell you how you can give some good look to your old looking ProgressBar. This is realy Important to look good in everything in UI so this is just a tune to UI design.

Firstly if some of my user know about this then they can read our old posts and wait we will upload more posts. This post is mainly aimed to beginers who just joined in this field and don’t know about this.

Hear is a demo of How its look and feel

Creating New Project

1. Create a new project in Android Studio from File ⇒ New Project and select Basic Activityfrom templates.or you can chose your existing project.2. Add the JitPack repository to your project level build file

allprojects {
				repositories {
					...
					maven { url "https://jitpack.io" }
				}
	}

3. Add this dependency to your app/build.gradle. And Sync the project.

android {
    dataBinding {
        enabled = true
    }
}
 
dependencies {
    //...
 
    implementation 'com.github.ybq:Android-SpinKit:1.1.0'
}

This are the initial steps to enable this awesome ProgressBar in your application. Now there are lots of ways to use this in your application.

1 way to use.

You can use the xml code to show this progressbar. Just open your activity.xml file in wihch you are thinking to pur this progressbar and just past this xml code.

<com.github.ybq.android.spinkit.SpinKitView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/spin_kit"
    style="@style/SpinKitView.Large.Circle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    app:SpinKit_Color="@color/colorAccent" />

And after that cust this in your Java file and its work fine just use it as a normal progressbar.

2nd Way to use.

If you dont want to remove your old progressbar from your xml file then dont wory you dont need to remove. Just open the java file and add this line after custing the progressbar.

This are the simplest way to give a tune to your old boring progressbar to a new look.

ProgressBar progressBar = (ProgressBar)findViewById(R.id.progress);
DoubleBounce doubleBounce = new DoubleBounce();
progressBar.setIndeterminateDrawable(doubleBounce);

Note one thing you can change color to any of this progresbar like a normal progressbar in your xml file. And in java you need to add set color method it will change the color of the progressbar.

Here are so many style you can chose from.

@style/SpinKitView
@style/SpinKitView.Circle
@style/SpinKitView.Large
@style/SpinKitView.Small
@style/SpinKitView.Small.DoubleBounce   
StylePreview
RotatingPlaneRotatingPlane
DoubleBounceDoubleBounce
WaveWave
WanderingCubesWanderingCubes
PulsePulse
ChasingDotsChasingDots
ThreeBounceThreeBounce
CircleCircle
CubeGridCubeGrid
FadingCircleFadingCircle
FoldingCubeFoldingCube
RotatingCircleRotatingCircle

Thanks for your time to read this post. If you have any problem with this you can comment down bellow I will answer your question. And also stay tune we will post one more awesome tutorial as soon we made it.

Posts created 40

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top