Override Button of AlertDialog – Android

As per the requirement of applications, sometimes we need to provide a custom feature to the buttons of AlertDialog. For instance, we may need to change the color of Positive, Negative, and/or Neutral buttons. And for the same reason, we may need to override button of AlertDialog to provide custom behavior. In this tutorial, we are going to override the buttons of AlertDialog. So, this tutorial covers following points. - Create AlertDialog - Override the Buttons of AlertDialog - Change text color of AlertDialog buttons (more…)
Read More

Create AlertDialog 2 – Android

This post is in the connection with the previous post about creating AlertDialog. In this demo application an AlertDialog is created with two buttons, i.e. OK and Cancel. There is some modifications in the MainActivity.java code of previous code. 1. AlertDialog to display information 2. To display and get confirmation from the user In order to get confirmation (yes/no situation) user should have two types of buttons, i.e. one to accept and another to reject. In this demo application those buttons are named as OK and Cancel. (more…)
Read More

Create AlertDialog – Android

Sometimes it is the requirement of the application to provide information to the user, or to get some input from the user, or to display a list of information in formatted layout. AlertDialog can be used for these and other similar purposes. For different purpose there is different process to create it. Some process is discussed here, and the rest can be derived from these as per developers requirement(s). (more…)
Read More