We can create a dialog with custom alert dialog with our xml in android. But for making simple alerts we can make custom alerts through code itself. Here is a simple function for this. Here I am having a Listview and an edittext with two buttons in the alertBox. Please leave your valuable comments on this post.
Here is a simple example showing alert in android cocos2D. For this I am using an example from my previous android cocos2D tutorial.. So please read that tutorial before reading this because the I am using the classes and files from it. I am only changing the Gamelayer.java file to show an Alert Dialog when the sprite move… Read More »
Hello everyone, Here is a simple example showing how to change the theme of default AlertDialog in android. Check this post before for understanding how to use styles. http://www.coderzheaven.com/2012/04/17/inherit-styles-extend-styles-android/ To start first create a fresh project named AlertTest. In the AlertTestDemo.java file copy this code Now create a file named “styles.xml” inside the res/values folder and copy this… Read More »
For implementing a ListView, we first create a xml which contains a ListView named list.xml Next we create a Dialog Object and inflate the above xml and when the listItem is clicked then a Alert Dialog windows comes The java file is listed below The alert window look like this When the Item is selected then
Hi, In most situations we have to use progress bar dialogs, Alert View Dialogs and Our own custom Dialogues in our applications. In most situations the built in dialogs may be enough but in certain other situations we have to build our own dialogs for better user experience. But still there is problem people don’t know how to… Read More »