A simple ListView, extends ListActivity


It's the simplest form of ListView, extends ListActivity. The list is displayed as a single line of plain text, using the simple Android built-in layout "android.R.layout.simple_list_item_1".

A simple ListView, extends ListActivity

package com.exercise.AndroidList;

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

public class AndroidList extends ListActivity {

String[] DayOfWeek = {"Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, DayOfWeek));
}
}



next: ListView, with icon



{ 2 comments... read them below or add one }

Unknown said...

I Really appreciate the work of Coingenesis, they are very good in Web Designing, web developing and as well as Digital marketing, they have made a awesome customized web template for my newsiest launched TVS Showroom, team unity is really outstanding they work very well, yes I can refer Coingenesis to my friend as a leading Web designing company in Delhi. They are expert in responsive design, in a first look I love the template they have made for my company.

Unknown said...

It is actually an outstanding and beneficial product of details. I am thankful that you just allocated this useful important details with us. Please remain us up to now like this. Thank you for talking about.

website development companies Bangalore | website designing Bangalore

Post a Comment