FileDocCategorySizeDatePackage
ListInVertical.javaAPI DocAndroid 5.1 API1595Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListInVertical

public class ListInVertical extends android.app.Activity
Exercises a list in a vertical linear layout

Fields Summary
private android.widget.ListView
mListView
Constructors Summary
Methods Summary
public android.widget.ListViewgetListView()

        return mListView;
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setContentView(R.layout.list_in_vertical);

        String values[] = new String[1000];
        for (int i = 0; i < 1000; i++) {
            values[i] = ((Integer) i).toString();
        }

        mListView = (ListView) findViewById(R.id.list);
        mListView.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, values));