Override Button of AlertDialog – Android

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

Provide Selection from a list of options – Android

Android
This post is second in series of tutorials to create and display an AlertDialog.¬†Before starting this post, let us recap few things from previous post. To create an AlertDialog, we need AlertDialog.Builder and provide all required properties through the builder instance. Buttons are optional in AlertDialog, we can use all combinations of the buttons or we can choose not to use any button at all. AlertDialog can be created without any title. AlertDialog can be created without any message. (more…)
Read More

Create AlertDialog and Basic Usage – Android

Android
Creating and displaying an AlertDialog depends on the use-case of the application. But, the way of creating and displaying depends on the situation. There are several ways of creating it, so, this post is the first¬†in the series of tutorials to create and display an AlertDialog. In this series of tutorials, we will be learning from the basics of creating AlertDialog to add customization to it. Whether it is displaying custom view(s) on the dialog or handling the UI interaction of the dialog. All the source code will be available on GitHub and the link will be shared after completion of each post. (more…)
Read More