GithubHelp home page GithubHelp logo

ido-barnea / dialoger Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.28 MB

A simple library to help developers create alert dialogs.

License: Apache License 2.0

Kotlin 100.00%
dialog android android-library alert alert-dialog alert-dialogs androidstudio android-studio kotlin kotlin-android kotlin-library kotlin-language

dialoger's Introduction

Dialoger โฐ

A simple library to help developers create beautiful alert dialogs.

Preview ๐Ÿ“ท

How can I add this to my project? โ“

Step 1: Add the JitPack repository to your build file

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

Step 2: Add the dependency

dependencies {
  implementation 'com.github.Ido-Barnea:Dialoger:1.1.6'
}

That's it!

Quick use โฉ

val dialog = Dialoger(this, Dialoger.TYPE_LOADING)
  .setTitle("Loading...")
  .setDescription("This might take a while...")
  .setDrawable(R.drawable.loading)
  .setProgressBarColor(R.color.purple_200)
  .show()

// Dismiss the loading dialog after 5 seconds
Handler(Looper.getMainLooper()).postDelayed({
  dialog.dismiss();

  Dialoger(this, Dialoger.TYPE_MESSAGE)
    .setDialogColorTheme(R.color.purple_200)
    .setTitle("Beautiful Dialogue Title")
    .setDescription("An incredible dialogue message.")
    .setDrawable(R.drawable.my_cool_drawable)
    .setButtonText("Okay")
    .setButtonOnClickListener {
        Toast.makeText(this, "dialog button clicked", Toast.LENGTH_SHORT).show()
    }
    .show()
}, 5000);

๐Ÿ“– Current Dialog Types:

  • Message
  • Loading

dialoger's People

Contributors

ido-barnea avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.