萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> 安卓開發 >> android的ListView的應用方法

android的ListView的應用方法

大家知道android的ListView的應用嗎?下面我們就給大家詳細介紹一下吧!

package com.android.test; 
 
import android.app.ListActivity; 
import android.os.Bundle; 
import android.widget.ArrayAdapter; 
 
public class ListViewDemo extends ListActivity { 
 static final String[] COUNTRIES = new String[]{ 
    "Americian","Belize","China","Japan","Korean","Russian" 
 }; 
        @Override 
        public void onCreate(Bundle savedInstanceState) { 
                super.onCreate(savedInstanceState); 
             setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 

copyright © 萬盛學電腦網 all rights reserved