Click back button twice to exit the application
This is simple example how to implement double-click on back button to exit the application. There will be a message alerting you that clicking again on back button will exit.Read More →
This is simple example how to implement double-click on back button to exit the application. There will be a message alerting you that clicking again on back button will exit.Read More →
Exit Dialog for Android Application This is an example of implementing simple Exit Dialog with two options, YES, and NO. The code is simple and straight forward. All you need to do is to override onBackPressed() in your activity and add a simple AlertDialog (you can find tutorial aboutRead More →
Intro This is part three of the Navigation drawer in Android post and it will be a demonstration on how to add drop-down items on a navigation drawer without using ExpandableListView. The Exercise We will continue working on the same project that we created for part one and part two ofRead More →
This example shows how can user go to phones gallery, select a image and after that display it on screen. This example can be used in variety of scenarios, from setting profile pictures to setting backgrounds. This example is very similar to Take picture with camera and make a previewRead More →
In this example we are going to cover of basics of taking picture with you camera on your android device and show it on screen after taking it.Read More →
Intro This is part two of the Navigation drawer in Android post and it will be a demonstration on how to create a toggle button on the navigation drawer menu and add listeners to track on toggle switch events. The Exercise We will continue working on the same project thatRead More →
Intro This post is the first part of three posts series. In this post we will create a navigation drawer in an android project using Views instead of Fragments. In the second part we will see how to add a toggle button on the navigation drawer and add listeners forRead More →
This example is targeting conversion of Base64 String to Image and representing that image on screen. The advantages of using Base64 string to image is the load times, especially if you are getting the image from server. The downside of using Base64 String is that the encoded file will beRead More →
Intro In this exercise we will show you how to display text in a TextView on Button click. The Exercise In this exercise we will be using only one activity. In this activity we will create one TextView and three buttons, and set them so when button one is pressed,Read More →
Intro As we said in a previous post most applications today contain multiple screens, which means they are compiled from multiple activities. We have already created an exercise to see in action switching between two simple activities. Now we will see the process of passing data between two activities withRead More →