Skip to content

Mori-hub/Lottie-Dialogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lottie Dialoges

This is kind of a dialog. This includes Lottie animations in two different sizes.

Features

  • lottie animation
  • Support all languages
  • Unlimited call fuctions
  • Easy Use
  • All Dialoges: Welcome, Exit, Warning, Info, Delete, Success
  • Easy Theme
  • Custom Dialog

Installation

Install my-project with https://jitpack.io/

  dependencies {
	          implementation 'com.github.Mori-hub:Lottie-Dialogs:1.0.0'
	}

Version

JitPack

Usage

    // Call Lib (Small or Large)
        val lottieHeader = LottieHeader(this, "large")
    // Main Way
        lottieHeader.welcome(description: String,
                    titleOfPositiveButton: String? = null,     
                    positiveButtonFunction: (() β†’ Unit)? = null )

Explain

  • ButtonFunction : Here you can add your Unit, Method or Calss. (such as Toast)
  • null : For any attributes you can put null then use defualt
  • Show Dialog: When you call any method this will show, so please ues in side OnClick.
  • Colors: A color must be a name ("yellow") or a Hex code ("#DFD3C3")

Examples

        // Welcome Dialog
        findViewById<Button>(R.id.button).setOnClickListener {
            lottieHeader.welcome("Hi, Welcome to our app! 😎")
        }
        // Exit Dialog
        findViewById<Button>(R.id.button2).setOnClickListener {
            lottieHeader.exit(
                "Goodbye, \n Do you want Exit now?",
                null, null, null, this
            )
        }
        // Rate Dialog
        findViewById<Button>(R.id.button3).setOnClickListener {
            lottieHeader.rate("Hi, Please Rate us! 😎", null, null, null)
        }
        // Information Dialog
        findViewById<Button>(R.id.button4).setOnClickListener {
             lottieHeader.info("This is an App just show Information! 😎", "info",
                { Toast.makeText(this, "Help me", Toast.LENGTH_SHORT).show() })
        }
        // Warning Dialog
        findViewById<Button>(R.id.button5).setOnClickListener {
            lottieHeader.warning("Attention, this is yellow area!", null, null, null)

        }

        // Delete Dialog
        findViewById<Button>(R.id.button6).setOnClickListener {
            lottieHeader.del("Do you want delete this file?", null, null, null)

        }

        // Success Dialog
        findViewById<Button>(R.id.button7).setOnClickListener {
            lottieHeader.success("The process is successful!", null, null, null)

        }

Sample

    // Editable Dialog
     lottieHeader.sample(
                "file.json",
                "#DFD3C3", "This is a sample you can generate as you want",
                "Got it", "Not Sure", "Help me ",
                "green", "red", "yellow", "black",
                { Toast.makeText(this, "Got", Toast.LENGTH_SHORT).show() },
                { Toast.makeText(this, "Not", Toast.LENGTH_SHORT).show() },
                { Toast.makeText(this, "Help me", Toast.LENGTH_SHORT).show() }
            )

Optinal Theme

    // You set theme for all dialoges 
    lottieHeader.dialogTheme(
            false,
            "black",
            "gray", "white",
            "#9B0000", "yellow"
        )

Screenshots

Large Mode

Small Mode

Custom Mode

Apply Black Theme

Gifs

πŸš€ About Me

I'm a full stack developer...find me in google play store

πŸ›  Skills

Java, Kotlin, CSS....

Tech Stack

Important: For Gradle 7.2 & jitpack.io Please use this way : https://stackoverflow.com/a/71603699/12272687

Update: March 2022

πŸ”— Links

portfolio linkedin twitter Google

Feedback

If you have any feedback, please reach out to us at [email protected]

License

MIT