Skip to main content

Posts

Showing posts from July, 2018

Customized Alert Dialog box and Handling Clicklistener

Hello Geeks ,  It's time to learn new little bit new stuff about the android alert dialog box. It is not so new for the profession engineers but it can help a lot of new beginners who want to improve their knowledge and speed up their productivity. So let's start Just make a method in your utility class and start using.  here is an example //Made: By Umesh Jangid public static void askForInput (Context context , String title , String message , String positiveButtonText , String negativeButtonText , boolean showOnlyOneButton , final AlertDialogCallback<String> callback) { AlertDialog.Builder alert = new AlertDialog.Builder(context) ; alert.setTitle(title) ; alert.setIcon(R.mipmap.ic_launcher) ; alert.setMessage(message) ; alert.setPositiveButton(positiveButtonText != null ? positiveButtonText : "Ok" , new DialogInterface.OnClickListener() { public void onClick (DialogInterface dialog , int whichButton) { callbac