[7 Sep 2012 | 23 Comments | 55,681 views]

Project Description

  • This Android example shows how to parse a simple XML containing employee details using SAX parser and display the result in Spinner.
  • This example stores XML file in project’s assets folder and opens the file as InputStream

Read more…

[4 Sep 2012 | No Comment | 1,742 views]

List of countries as per the ISO 3166-1. Get the countries.csv file from here.

Output:
004 – AF, AFG, Afghanistan
008 – AL, ALB, Albania
010 – AQ, ATA, Antarctica
012 – DZ, DZA, Algeria
016 – AS, Read more…

[4 Sep 2012 | 14 Comments | 132,418 views]

Project Description

  • In the previous Android ListView examples, we created ListView with single selection mode.
  • In this example, we will create a ListView with multiple selection mode with button click event. On button click event, we retrieve the selected list

Read more…

[3 Sep 2012 | One Comment | 16,190 views]

Project Description

  • This Android tutorial shows how to use ListView in ListActivity. ListActivity has a default layout that consists of a single ListView object. If the layout contains only ListView, then it is not required to assign a layout

Read more…

[3 Sep 2012 | One Comment | 51,491 views]

Project Description

  • In the previous Android ListView example, we created ListView in XML and populated its items using android:entries attribute on list view element which points to the <string-array> defined by external resource in res/values/strings.xml.
  • In this example,

Read more…

[3 Sep 2012 | 6 Comments | 75,124 views]

Project Description

  • In this Android tutorial, we will create an example to create ListView in XML layout file.
  • To load the entries we use android:entries attribute on list view element which points to the <string-array> defined by external resource in

Read more…

[20 Aug 2012 | 7 Comments | 27,290 views]

Post/Redirect/Get (PRG) Pattern

Post/Redirect/Get (PRG) is a web development design pattern that prevents some duplicate form submissions, creating a more intuitive interface for users.

When a user attempts to refresh the server response on a form submitted through an HTTP Read more…

[20 Aug 2012 | 6 Comments | 15,444 views]

Project Description

  • In the previous Servlet example, we configured datasource in Apache Tomcat and used JNDI look up.
  • This Servlet example explains how to configure datasource in Apache Tomcat and inject it in Servlet using @Resource annotation.
  • For

Read more…

[8 Aug 2012 | 7 Comments | 27,297 views]

Project Description

  • In the previous Android example here, we created multiple activities and passed data between activities using Bundle and Intent.
  • In this Android tutorial, we will create an example to send complex object from one activity to another.

Read more…

[6 Aug 2012 | 11 Comments | 60,628 views]

Project Description

  • In this Android tutorial, we will create an example to send data from one activity to another. This example creates two activities (FormActivity and DisplayActivity) each doing the following functions,
    • FormActivity – this is the main activity which

Read more…