Simple ListView in Android

Android ListView is a graphical widget in Composite category. There are a various ways options to create Android ListView. We are going to create a very simple ListView by minimum effort.

Create an android project and with default values.

Here are the code:

package com.rahinur.example.simplelistview;

import android.os.Bundle;
import android.widget.ArrayAdapter;

public class MainActivity extends ListActivity {

  protected void onCreate(Bundle savedInstanceState) {

    String[] values = { "Windows", "Linux", "Unix", "Mac", "Android",
      "iOS", "BlackBerry" };
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_1, values);


Published by

Rahinur Rahaman

Expert in Oracle Database 10g and 11g. Deep knowledge on SQL, PL/SQL and Java programming. Working at Square InformatiX Limited as Oracle Database Administrator.

One thought on “Simple ListView in Android”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>