GithubHelp home page GithubHelp logo

gkemon / easy-android-loading Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 3.0 265 KB

This library is for showing loading popup in Android very simply without writing boilerplate code.

License: Apache License 2.0

Java 10.61% Kotlin 89.39%
android androidapp kotlin java loading loadingscreen loading-animations reusable-components

easy-android-loading's Introduction

Logo

Easy Loading For Android By Just A One Lined Code !!!

Maintained Maintained

Just configure a singleton loading instance once without additional boilerplate code and reuse it to show and hide from anywhere (Both Activity or Fragment) you want .


📖 Table of Contents

-----------------------------------------------------

➤ Table of Contents

-----------------------------------------------------

➤ Installation

Step 1. Add the JitPack repository to your root build.gradle at the end of repositories

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

Step 2. Add the dependency

dependencies {
  implementation 'com.github.Gkemon:Easy-Android-Loading:1.1'
}

-----------------------------------------------------

➤ Getting Started

Setup default configuration :

class MainActivity : AppCompatActivity() {
     .
     .
     .
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
	
       /* It is the mandatory configuration which is needed to be
        * declared after calling setContentView --*/
        
       LoadingPopup.getInstance(activity)
                   .defaultLovelyLoading()
                   .build()
		   
	/*OR*/	   
		   
       /* If adding background color or opacity is needed then -- */
        LoadingPopup.getInstance(activity)
                            .defaultLovelyLoading()
                            .setBackgroundColor(android.R.color.holo_red_dark)
                            .setBackgroundOpacity(myBackgroundOpacity)/*Int between 0-100*/
                            .build()
        .
	.	    
       }

Setup custom configuration :

class MainActivity : AppCompatActivity() {
     .
     .
     .
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
	
       LoadingPopup.getInstance(activity)
                .customLoading()
                .setCustomViewID(R.layout.layout_my_custom_loading)
		 /*layout resource id which holds the custom loading view. If setting up  
		  *background color is needed for the inputted layout then call it like that
		  *setCustomViewID(R.layout.layout_my_custom_loading,R.color.my_color)*/
                .doIntentionalDelay()
		/*If intentional delay is needed. Otherwise call .noIntentionalDelay()*/
                .setDelayDurationInMillSec(5000)
                .setBackgroundOpacity(myBackgroundOpacity)
                .build()

        .
	.	    
       }

Showing or Hiding Loading:


          /* For showing loading just call  --> */
           LoadingPopup.showLoadingPopUp()
  
  
          /* For hiding loading just call --> */
           LoadingPopup.hideLoadingPopUp()
  

linkedin LinkedIn   inbox Inbox

Logo credit: Alex Gorbunov

➤ License

The source code is licensed under the Apache License 2.0.

-----------------------------------------------------

easy-android-loading's People

Contributors

gkemon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

easy-android-loading's Issues

Not Working ...

I added all of the dependencies and also checked in java and kotlin project!
but, no loading is showing..

Documentation

Seems like an amazing library I would like to use it but, there is no documentation. Please do add it.

Add to Gradle Source Dependencies

I found your answer here and I want to try it, however I would like to pull it using Gradle Source Dependencies like all the other libraries.

Could you make it available?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.