Skip to content

A library which allows you to have some beautiful loading with dots, for both Java and Kotlin in XML

License

Notifications You must be signed in to change notification settings

MaxFork/Android-Loading-Dots

 
 

Repository files navigation

Android-Loading-Dots

A library which allows you to have some beautiful loading with dots, for both Java and Kotlin in XML,

If you need Jetpack Compose version of this library then click here.

Step 1. Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
        implementation 'com.github.razaghimahdi:Android-Loading-Dots:1.3.0'
}

Step 3. How to use

XML:

<com.razzaghimahdi78.dotsloading.linear.LoadingWavy
	android:id="@+id/loadingWavy"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_count="3"
	app:dots_duration="500"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.linear.LoadingFady
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_count="3"
	app:dots_duration="500"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.linear.LoadingBiggy
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_count="3"
	app:dots_duration="500"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.linear.LoadingScaly
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_count="5"
	app:dots_duration="400"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.linear.LoadingDancing
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_count="3"
	app:dots_duration="800"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.circle.LoadingCircleFady
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_duration="800"
	app:dots_size="medium" />

<com.razzaghimahdi78.dotsloading.circle.LoadingCircleRotation
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	app:dots_color="@color/colorPrimaryDark"
	app:dots_duration="800"
	app:dots_size="medium" />

Step 4. How to initial

LoadingWavy LoadingWavy=findViewById(R.id.loadingWavy);
LoadingWavy.setSize(DotSize.MEDIUM);
LoadingWavy.setDotsCount(3);
LoadingWavy.setDuration(400);
LoadingWavy.setColor(Color.parseColor("#FF3700B3"));

OR

val LoadingWavy: LoadingWavy = findViewById(R.id.loadingWavy)
LoadingWavy.setSize(DotSize.MEDIUM)
LoadingWavy.setDotsCount(3)
LoadingWavy.setDuration(400)
LoadingWavy.setColor(Color.parseColor("#FF3700B3"))

Note

There are 5 type of sizes:

public enum DotSize {
    TINY,
    SMALL,
    MEDIUM,
    BIG,
    HUGE
}
record.mp4

Developed by Mahdi Razzaghi Ghaleh

About

A library which allows you to have some beautiful loading with dots, for both Java and Kotlin in XML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%