Animated Loader or Animated Progress Dialog android code.

Overview

AnimatedLoadingIndicator

LoadingIndicator

This is a simple but effective animated Loading Indicator which can easily ready to use integrated few lines of code.

Android SDK version Support:

  • Minimum SDK version is: 15
  • Maximum SDK version is: 29

Demo

AnimatedLoadingIndicator

Android Gradle

LoadingIndicator library Installation

// Add it in your root build.gradle at the end of repositories:
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
// Add AnimatedLoadingIndicator dependency
dependencies {
	        implementation 'com.github.yash786agg:AnimatedLoadingIndicator:v1.3'
	}

Code to add in your project file for Kotlin User

// Adding Progress Dialog

val progressDialog = Dialog(this)
progressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
progressDialog.setContentView(R.layout.custom_dialog_progress)

/* Custom setting to change TextView text,Color and Text Size according to your Preference*/

val progressTv = progressDialog.findViewById(R.id.progress_tv) as TextView
progressTv.text = resources.getString(R.string.loading) 
progressTv.setTextColor(ContextCompat.getColor(this, R.color.colorAccent))
progressTv.textSize = 19F

progressDialog.window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
progressDialog.setCancelable(false)
progressDialog.show()

// Dismiss Progress Dialog

progressDialog.dismiss()
   or
progressDialog.cancel()

Code to add in your project file for Java User

// Adding Progress Dialog

Dialog progressDialog = new Dialog(this);
progressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
progressDialog.setContentView(R.layout.custom_dialog_progress);

/* Custom setting to change TextView text,Color and Text Size according to your Preference*/

TextView progressTv = progressDialog.findViewById(R.id.progress_tv);
progressTv.setText(getResources().getString(R.string.loading));
progressTv.setTextColor(ContextCompat.getColor(this, R.color.colorAccent));
progressTv.setTextSize(19F);
if(progressDialog.getWindow() != null)
    progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));        

progressDialog.setCancelable(false);
progressDialog.show();

// Dismiss Progress Dialog

progressDialog.dismiss();
   or
progressDialog.cancel();

Prerequisites

  • Android Studio 3.4
  • Gradle version 3.4.2
  • Android Device with USB Debugging Enabled

Built With

Thanks for reading this repo. Be sure to click ★ below to recommend this repo if you found it helpful. It means a lot to me.

For more about programming, follow me on Medium

Also, Let’s become friends on Linkedin

You might also like...
Android animated recording view
Android animated recording view

AnimatedRecordingView Android animated recording view .中文版 Preview Gradle compile 'com.haozhang.libary:android-animated-recording-view:1.0' How to use

This a demo application with animated SVG animation of Smiley
This a demo application with animated SVG animation of Smiley

Animated-Smiley-Rating Animated Customer feedback and rating UI 📃 License Copyright 2021 Aiman Muzafar Licensed under the Apache License, Version 2.0

🍭🚀💗  Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more
🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

Animated-splash-screen - Animate your Splash Screen using  Lottie files.
Animated-splash-screen - Animate your Splash Screen using Lottie files.

Animated Splash Screen This small project shows how you can add animation into your android projects or create beautiful looking Splash Screen or Laun

Backarrow-animation-example - Animate back arrow to close button in Compose using animated drawables
Backarrow-animation-example - Animate back arrow to close button in Compose using animated drawables

Animate Back Arrow to Close Icon in Compose This is a simple demo for animated v

Custom-view-animated-file-downloader - Custom Views, Animations, Broadcast Receivers, Notifications
Custom-view-animated-file-downloader - Custom Views, Animations, Broadcast Receivers, Notifications

Downloader App Custom views , Drawing with Canvas, Animations (with motionlayout

Animated LazyColumn/LazyRow

Animated LazyColumn/LazyRow POC of how you can animate LazyColumn/LazyRow insertions/deletions/moving Note, this is not production ready or a library,

A program that converts an SGF-file to an animated GIF a la Hayauchi Super Igo style.
A program that converts an SGF-file to an animated GIF a la Hayauchi Super Igo style.

sgf2gif A program that converts an SGF-file to an animated GIF. The animated GIF is highly inspired by the classic game Hayauchi Super Igo for NES. Us

Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Comments
  • UnrecognizeThreadException when call dialog.dismiss() even from the mail thread

    UnrecognizeThreadException when call dialog.dismiss() even from the mail thread

    Dialog is showing properly, but when i call dismiss() from MyActivity.this.runOnUiThread() it throws exception that this thread can't touch views. @yash123482 @yash786agg

    opened by devadarsann 2
  • java.lang.ClassNotFoundException

    java.lang.ClassNotFoundException

    hi,please help me to slove this error :

    java.lang.ClassNotFoundException: com.app.aimatedprogresslib.Indicators.ProgressBallMultipleIndicator at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at com.app.aimatedprogresslib.AnimatedLoadingIndicator.setIndicator(:189) at com.app.aimatedprogresslib.AnimatedLoadingIndicator.a(:119) at com.app.aimatedprogresslib.AnimatedLoadingIndicator.(:88) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:469) at android.app.Dialog.setContentView(Dialog.java:636) at ir.pishranit.naneasal.Activities.product_Activity.g(:199) at ir.pishranit.naneasal.Activities.product_Activity.onCreate(:87) at android.app.Activity.performCreate(Activity.java:7258) at android.app.Activity.performCreate(Activity.java:7249) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2941) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3073) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:7025) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.app.aimatedprogresslib.Indicators.ProgressBallMultipleIndicator" on path: DexPathList[[zip file "/data/app/ir.pishranit.naneasal-ajT2AhLq84NbC6flTrvyPg==/base.apk"],nativeLibraryDirectories=[/data/app/ir.pishranit.naneasal-ajT2AhLq84NbC6flTrvyPg==/lib/arm, /data/app/ir.pishranit.naneasal-ajT2AhLq84NbC6flTrvyPg==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

    opened by sami-soft 0
Releases(v1.2)
Owner
Yash Agarwal
A forward-thinking developer offering more than 6 years of experience building, integrating, testing, and supporting Android applications for mobile.
Yash Agarwal
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa

FabulousFilter Show some ❤️ and star the repo to support the project This library is the implementation of filter-concept posted on MaterialUp.com. It

Krupen Ghetiya 2.6k Jan 3, 2023
Continuous speech recognition library for Android with options to use GoogleVoiceIme dialog and offline mode.

Android Speech Recognition This library lets you perform continuous voice recognition in your android app with options to either use Google Voice Ime

Maxwell Obi 75 May 21, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

LottieDialog Android Library to create Lottie animation view dialog easily with a lot of customization Why you should use Lottie Dialog You have no li

Amr Hesham 39 Oct 7, 2022
Android Library to create Lottie animation view dialog easily with a lot of customization

Android Library to create Lottie animation view dialog easily with a lot of customization

Amr Hesham 39 Oct 7, 2022
Allows the easy creation of animated transition effects when the state of Android UI has changed

android-transition Android-Transition allows the easy creation of view transitions that reacts to user inputs. The library is designed to be general e

Kai 615 Nov 14, 2022
Android ImageViews animated by Ken Burns Effect

KenBurnsView Android library that provides an extension to ImageView that creates an immersive experience by animating its drawable using the Ken Burn

Flávio Faria 2.7k Jan 2, 2023
Extended Android Tab Layout with animated indicators that have continuous feedback.

Dachshund Tab Layout Introduction Boosted Android Tab Layout with custom animated indicators including "Dachshund" animation inspired by this. Sample

Andrii 859 Nov 10, 2022
A simple animated step view for Android

StepView A simple animated step view for Android. Backward and forward animations is supported. Usage Add jcenter() to repositories block in your grad

Bogdan Kornev 833 Dec 30, 2022
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Igor Lashkov 318 Dec 7, 2022
How to improve the user experience using animated icons with vector drawables on Android

Android Animated Icons How to improve the user experience using animated icons with vector drawables on Android English version https://medium.com/@an

André Mion 116 Nov 25, 2022