PerfectDialog

Additional

Language
Java
Version
1.0.3 (Dec 8, 2017)
Created
Nov 22, 2017
Updated
May 22, 2018
Owner
Ankit Dubey (ankitdubey021)
Contributors
Ankit Dubey (ankitdubey021)
ankit4code
2
Activity
Badge
Generate
Download
Source code

Commercial

MyAlertDialog

Releases

this is the first release of library, which contains buttons in rectangle form.

compile 'com.github.ankitdubey021:MyAlertDialog:1.0.2'

In this release, buttons are added in circular shape.

compile 'com.github.ankitdubey021:MyAlertDialog:1.0.3'

Simple Default Dialog

+ new EasyDialog.Builder(this)
                .setTitle("Exit!")
                .setSubtitle("Are you sure?")
                .isCancellable(true)
                .setCancelBtnColor("#008000")
                .setIcon(Icon.INFO)
                .setConfirmBtn("yes", new EasyDialogListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        Toast.makeText(getApplicationContext(),"done",Toast.LENGTH_LONG).show();
                    }
                })
                .setCancelBtn("no", new EasyDialogListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        Toast.makeText(getApplicationContext(),"cancelled!",Toast.LENGTH_LONG).show();
                    }
                })
                .build();

Custom Alert Dialog

+ new EasyCustomDialog.Builder(this,"Exit!")
                .setSubTitle("Are you Sure?")
                //.setHeader("Hello Guest")
                //.setIcon(getResources().getDrawable(R.drawable.ic_error_outline_black_24dp))
                //.setIcon(ContextCompat.getDrawable(this, R.drawable.animlogo))
                .setPositiveBtnText("Yes")
                .setNegativeBtnText("No")
                .onConfirm(new EasyCustomDialogListener() {
                    @Override
                    public void execute() {
                        Toast.makeText(getApplicationContext(),"Ok",Toast.LENGTH_LONG).show();
                    }
                })
                .onCancel(new EasyCustomDialogListener() {
                    @Override
                    public void execute() {
                        Toast.makeText(getApplicationContext(),"Cancel",Toast.LENGTH_LONG).show();
                    }
                })
                .build();

MIT License

Copyright (c) 2017 Ankit Dubey

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.