Material Design Hub

Saturday, May 30, 2015

Android Confirm Dialog Library

9:30 PM

Android Confirm Dialog Library


Android Confirm Dialog Library

Description:- This Library provide a  custom animated Android confirm dialog.

Min SDK: 9 (Android 2.3–2.3.2 Gingerbread).


How to use  Confirm Dialog Android Library in eclipse :-

Step 1: Create a new Android Project

Step 2: Import  Library to your Android Application Project
     1: File->New->Other
     2: Select Android Project
     3: Select "Create Project from existing source"
     4: Click "Browse and select  Confirm Dialog Android Library, 
     5: Finish 
     6: Right-click on your project -> Properties
     7: In Android->Library section click Add
     8: select recently added project -> Ok
     9: that's it!

Download via maven:


<dependency>
    <groupId>com.github.vignesh-iopex</groupId>
    <artifactId>confirmdialog</artifactId>
    <version>1.0</version>
</dependency>

or Gradle(Android studio):


compile 'com.github.vignesh-iopex:confirmdialog:1.0'

How To Use Confirm Dialog  Library :
public class MainActivity extends Activity {
  @Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Confirm.using(this).ask("Fire missles?").onPositive("Yes", new DialogEventListener.OnClickListener() {
                           @Override public void onClick(DialogEventListener dialog, int which) {
                             launchMissles();
                           }}).onNegative("No",  new DialogEventListener.OnClickListener() {
                           @Override public void onClick(DialogEventListener dialog, int which) {
                             sendFalseAlarm();
                           }}).build().show();
  }
}

Please Join our Facebook  Group and Page

Facebook group: Android controls

Facebook page: Android Controls

Subscribe YouTube channel: Click here

SUBSCRIBE TO OUR EMAIL NEWSLETTER & RECEIVE UPDATES RIGHT IN YOUR INBOX.   Click here


If You Have Any question or Suggestions Please Feel Free to Comments .

0 comments