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.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.razaghimahdi:Android-Loading-Dots:1.3.0'
}
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" />
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"))
There are 5 type of sizes:
public enum DotSize {
TINY,
SMALL,
MEDIUM,
BIG,
HUGE
}
record.mp4
Developed by Mahdi Razzaghi Ghaleh