Giter Site home page Giter Site logo

simpledialog's Introduction

SimpleDialog

⚡️A Simple,fast,Reliable library used for prompting alert dialog. ⚡️

  • Setup

Gradle dependency (recommended)

Add the following to your project level build.gradle:

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

Add this to your app build.gradle:

dependencies {
	implementation 'com.github.a7mdragab:SimpleDialog:1.0'
}
  • Documentation

To create custom dialog with minimum required properties

//Just mention the property you want to change only not all
SimpleDialog.Initialize(this,"This is Alert Dialog")
                .setAlertCallback(new SimpleDialog.AlertDialogCallback() {
                    @Override
                    public void onYesClicked() {
                        
                    }

                    @Override
                    public void onNoClicked() {

                    }

                    @Override
                    public void onCancelClicked() {

                    }
                }).Show();

To create custom dialog with full properties

//Just mention the property you want to change only not all
SimpleDialog.Initialize(this,"This is Alert Dialog")
                .setTitle("AlertDialog")
                .setCancelable(false)
                .setIcon(R.drawable.ic_menu_slideshow)
                .setNegativeButton("No")
                .setPositiveButton("Yes")
                .setCancelButton("Cancel")
                .setAlertCallback(new SimpleDialog.AlertDialogCallback() {
                    @Override
                    public void onYesClicked() {
                        Toast.makeText(MainActivity.this, "Yes Clicked", Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onNoClicked() {
                        Toast.makeText(MainActivity.this, "No Clicked", Toast.LENGTH_SHORT).show();
                    }

                    @Override
                    public void onCancelClicked() {
                        Toast.makeText(MainActivity.this, "Cancel Clicked", Toast.LENGTH_SHORT).show();
                    }
                })
                .Show();

simpledialog's People

Contributors

a7mdragab avatar

Stargazers

 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.