Custom Listview in Android Example

We already discussed about using ListView in the previous tutorial Android ListView. In this tutorial, let’s learn how to customize list items in ListView to display list of items in a vertical scrollable list. See flowing Steps : Add ListView in activity_main.xml Declare your list of data in ArrayList Create a Custom Adapter class which extends BaseAdapter. Override getView() method and inflate the […]

person access_time March 7, 2015launch Read More

Android ListView Example

In this tutorial, let’s learn how to use Android ListView to display list of items in a vertical scrollable list. See flowing Steps : Add ListView in activity_main.xml Declare your list of data in a String Array or ArrayList Set the data list to ArrayAdapter. Set the ArrayAdapter to the ListView.

person access_time March 6, 2015launch Read More

Double back press to Exit – Android Example

This tutorial is about exiting the application after double back press. The users tend to press the back button offen. To avoid application close when the user presses the back button accidently, we can expect the user to press the back button twice. See the following steps: Override onBackPressed method. Set a static long constant.

person access_time March 5, 2015launch Read More

Checking Internet Connection Android Example

In this tutorial we are going to show how to detect the availability of internet connection. You have to check the internet connectivity before making any HTTP calls. See flowing Steps : Add the below permissions to the AndroidManifest.xml file. <uses-permission android:name=”android.permission.INTERNET” /> for Internet access. <uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” /> to access the network state information. […]

person access_time March 4, 2015launch Read More

Progress Dialog – Android Example

Progress bars are used to show progress of a task. For example. When you are uploading or downloading something from the internet, it is better to show the progress of download/upload to the user. See the following : Use ProgressDialog to create progress bar You can set the button in AlertDialog with certain function.

person access_time March 3, 2015launch Read More 2