Manager of progress using Lottie JSON, compatible for Java and Kotlin.

Overview

Progress Lottie IGB

Manager of progress using Lottie JSON, compatible for Java and Kotlin.

Int Top In Bottom

Important Info:

To create a raw folder:

  • Right-click the res folder.
  • Choose New.
  • Choose Android Resource Directory.
  • Name the directory raw.
  • In the Resource Types Section add raw.
  • Click ok.
  • Copy your JSON lottie in RAW folder

New options for personality:

  • Size text message
  • Style Dialog
  • Color text message
  • Add font for text

Add font for your project check documents: https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts


KOTLIN CODE

Code:

    ProgressLoadingIGB.startLoadingIGB(this){
            message = "Good Morning!" //  Center Message
            srcLottieJson = R.raw.loading_a // Tour Source JSON Lottie
            timer = 10000                   // Time of live for progress.
            hight = 500 // Optional
            width = 500 // Optional
            
        }

StartLoading Whith Simple Method:

starLoadingSimpleIGB(R.raw.pork_dance)

Remove progress:

finishLoadingIGB()

Example:

      starLoadingSimpleIGB(R.raw.pork_dance)

        Handler().postDelayed({
            finishLoadingIGB()
        }, 1500)

Use cancel button:

This method the user will active for cancel any process.

Add this implement in your class: Kotlin IProgressLoadingActions

Example:

class MainActivity : AppCompatActivity(), IProgressLoadingActions {
      
      
       fun click(view: View){

        ProgressLoadingIGB.startLoadingIGB(this){
            message = "Please Wait" //  Center Message
            sizeTextMessage = 50.0f // Size text // Optional
            fontTextMessage = your font project// Set your personal font // Optional
            srcLottieJson = R.raw.loader // Your Source JSON Lottie
            fontColorMessage = Color.GREEN
            timer = 10000               // Time of live for progress.
            hight = 700 // Optional
            width = 700 // Optional
            cancelButton = true // Optional added cancel button
            cancelButtonAlpha = 0.6f  // Optional
            cancelButtonHight = 75  // Optional
            cancelButtonWidth = 60 // Optional
            cancelButtonColor = R.color.colorAccent  // Optional
           // cancelButtonBackground = R.drawable.ic_launcher_background //OPTIONAL recommendable use vector xml

        }
    }
      override fun CancelButton() {
        val builder =
            AlertDialog.Builder(this)
        builder.setTitle("Cancel")
        builder.setMessage("Here close any process")

        builder.setPositiveButton("OK", null)

        val dialog = builder.create()
        dialog.show()
    }
}

JAVA CODE

It is recommended to use Java 8 onwards.

Code:

        ProgressLoadingJIGB.setupLoading = (setup) ->  {
            setup.srcLottieJson = R.raw.sun; // Tour Source JSON Lottie
            setup.message = "Welcome Summer!";//  Center Message
            setup.timer = 0;   // Time of live for progress.
            setup.width = 200; // Optional
            setup.hight = 200; // Optional
        };

StartLoading Whith Simple Method:

ProgressLoadingJIGB.startLoading(this);

Remove progress:

  ProgressLoadingJIGB.finishLoadingJIGB(context);

Example:

           ProgressLoadingJIGB.setupLoading = (setup) ->  {
            setup.srcLottieJson = R.raw.sun; // Tour Source JSON Lottie
            setup.message = "Welcome Summer!";//  Center Message
            setup.timer = 0;   // Time of live for progress.
            setup.width = 200; // Optional
            setup.hight = 200; // Optional
        };

        final Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                ProgressLoadingJIGB.finishLoadingJIGB(context);
            }
        }, 6000);

Use cancel button:

This method the user will active for cancel any process.

Add this implement in your class: IProgressLoadingActions

Example:

public class Main2Activity extends AppCompatActivity implements IProgressLoadingActions {
      
      
      public void clickOption(View v){

           ProgressLoadingJIGB.setupLoading = (setup) ->  {
            setup.srcLottieJson = R.raw.travel; // Your Source JSON Lottie
            setup.message = "Welcome Summer!";//  Center Message
            setup.sizeTextMessage = 16.0f;// Size text // Optional
            setup.styleDialog = Your Style; // Optional
            setup.timer = 0;   // Time of live for progress.
            setup.width = 500; // Optional
            setup.hight = 500; // Optional
            setup.cancelButton = true; // Optional
            setup.cancelButtonAlpha = 1f; // Optional
            setup.cancelButtonHight = 75; // Optional
            setup.cancelButtonWidth = 45; // Optional
           // setup.cancelButtonBackground = R.drawable.ic_launcher_background; //OPTIONAL recomendable use vector xml

        };


      }
        
    @Override
    public void CancelButton() {
        // setup the alert builder
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Cancel");
        builder.setMessage("Here close any process");

        // add a button
        builder.setPositiveButton("OK", null);

        // create and show the alert dialog
        AlertDialog dialog = builder.create();
        dialog.show();
    }
}

Gradle Dependency

  • Add the JitPack repository to your project's build.gradle file

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  • Add the dependency in your app's build.gradle file
    
    dependencies {
	        implementation 'com.github.LordSaac:ProgressLottieIGB:v1.0.2'
	}
    

Contribution

You are most welcome to contribute to this project!

iOS version:

✳️   Do you need iOS Version for you project ?, check out here: https://github.com/LordSaac/IGProgressLottie-Swift

Download more Animations:

See more animations here: https://www.lottiefiles.com/


Released July 17, 2020

Licence

Copyright 2020 Isaac G. Banda

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You might also like...
A Shopping cart library for Android that allows you add to add items to cart and retrieve at ease using JSONObjects.

Carteasy A Shopping cart library for Android that allows you add to add items to cart and retrieve at ease using JSONObjects. Quick Start Add the foll

Kotlin extensions for Moshi, Make every thing you want with Moshi in just one line.

Kotlin extensions for Moshi, Make every thing with square / Moshi in one line.

Pojson provides Kotlin DSL for building complex jsons in declarative manner.

Pojson is a kotlin library for json prototyping. It brings DSL for building JsonObjectPrototype and JsonArrayPrototype. Prototypes don't reference to any json object/array models.

SSPullToRefresh makes PullRefresh easy to use, you can provide your own custom animations or set simple gifs on refresh view. The best feature is Lottie animations in refresh view, it uses lottie animations to render high quality animations on pull refresh. 🎉💥
🚀🌆🏙 Display differences or animate progress between 2 images or Composables with overlay and customization options, zoom, pan gestures, and progress to observe properties for animating before-after progress

Compose Before-After Composables to display Images, or Composables as before and after composables to display differences or animate progress between

🚀Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )
🚀Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )

JsonToKotlinClass Hi, Welcome! This is a plugin to generate Kotlin data class from JSON string, in another word, a plugin that converts JSON string to

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

LiteHttp is a simple, intelligent and flexible HTTP framework for Android. With LiteHttp you can make HTTP request with only one line of code! It could convert a java model to the parameter and rander the response JSON as a java model intelligently.

Android network framework: LiteHttp Tags : litehttp2.x-tutorials Website : http://litesuits.com QQgroup : 42960650 , 47357508 Android网络通信为啥子选 lite-htt

A material style progress wheel compatible with 2.3
A material style progress wheel compatible with 2.3

![](https://img.shields.io/badge/Methods and size-106 | 12 KB-e91e63.svg) Material-ish Progress A material style progress wheel compatible with 2.3 Tr

A material style progress wheel compatible with 2.3
A material style progress wheel compatible with 2.3

![](https://img.shields.io/badge/Methods and size-106 | 12 KB-e91e63.svg) Material-ish Progress A material style progress wheel compatible with 2.3 Tr

A material style progress wheel compatible with 2.3
A material style progress wheel compatible with 2.3

![](https://img.shields.io/badge/Methods and size-106 | 12 KB-e91e63.svg) Material-ish Progress A material style progress wheel compatible with 2.3 Tr

Android Material Json Form Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular format.
Android Material Json Form Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular format.

Android Json Wizard Android Json Wizard is a library for creating beautiful form based wizards within your app just by defining json in a particular f

 Images grid JSON | Сетка изображений JSON
Images grid JSON | Сетка изображений JSON

Images grid JSON | Сетка изображений JSON Задача Разработать приложение: Приложение должно получать JSON-список ссылок на изображения с сервера по адр

Dynamic-UI-From-JSON - A Sample Android app to show dynamic UI generation from Json
Dynamic-UI-From-JSON - A Sample Android app to show dynamic UI generation from Json

Dynamic UI from JSON Functionality The app's functionality includes: The app gen

A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process.

Json2Java I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process. What this tool can do right

A Lottie animations marketplace powered by LottieFiles
A Lottie animations marketplace powered by LottieFiles

Lottie World A Lottie animations playground app to mess around with animations and clean architecture with MVVM. Built with ❤︎ by Wajahat Karim Video

An android library through which users can add a customized loading dialog box with Lottie Animations.
An android library through which users can add a customized loading dialog box with Lottie Animations.

CustomLottieDialogBox About CustomLottieDialogBox is an android library which facilitate developers to add customized loading Dialog-Boxes to their an

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

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

Comments
  • Still Same Issue.

    Still Same Issue.

    Its useless to add close button instead it should be auto cancelable true/false like old progress and in version 1.0.0 its not able to find method in java version i tried all your code it is not implementing IProgressLoadingActions it showing that its not found.

    opened by sharibtanweer 4
Releases(v1.0.2)
Owner
Isaac G. Banda
I 'm Software Developer specializes in apps development Android and iOS. Other experience in Web development, data Base and unity games.
Isaac G. Banda
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Google 21.7k Jan 5, 2023
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Square 8.7k Jan 2, 2023
Fast JSON parser for java projects

ig-json-parser Fast JSON parser for java projects. Getting started The easiest way to get started is to look at maven-example. For more comprehensive

Instagram 1.3k Dec 29, 2022
Customizable JSON Schema-based forms for Kotlin and Compose

Kotlin JSON Forms Customizable JSON Schema-based forms for Kotlin and Compose This project aims to reimplement JSON Forms in Kotlin for use in Compose

Copper Leaf 3 Oct 1, 2022
A lightweight Kotlin DSL to render DSL style Json to String.

A lightweight Kotlin DSL to render DSL style Json to String.

null 4 May 5, 2021
Modern JSON processor with readable Kotlin syntax.

Kq Modern cross-platform JSON processor with readable Kotlin syntax. cat ~/Desktop/bdb.ndjson | kq '.filter{it.bool("muted")}.sortedBy{it.long("size")

Daniel Demidko 6 Jan 25, 2022
xls2json - Read in Excel file (.xls, .xlsx, .xlsm) and output JSON

xls2json Read in Excel file (.xls, .xlsx, .xlsm) and output JSON. Evaluates formulas where possible. Preserve type information from Excel via JSON typ

Tammo Ippen 39 Oct 19, 2022
Simple CLI app to convert XML retrieved from a configurable URI to JSON and back

XmlToJsonUtility Simple CLI app written in Kotlin (1.5.31) on Java 11, using Spring Boot. Queries a URI (default) as an XML source. Attempts to valida

Darius Washington 2 Oct 20, 2021
ktlint JSON Lines reporter

ktlint JSON Lines reporter Usage Download the jar and run: ktlint --reporter=jsonlines,artifact=ktlint-jsonlines-reporter.jar Download Either downloa

Anton Musichin 1 Nov 24, 2021
Generate a JSON bookmarks document from a GitHub user

Github to bookmarks This little webapp will generate a JSON bookmarks document from a GitHub user. This is intended to be used with bbt. An instance i

Benoit Lubek 2 Nov 8, 2021