import android.os.Bundle;
import android.app.Activity;
import android.app.ListActivity;
import android.content.ClipData.Item;
import android.view.Menu;
import android.widget.ArrayAdapter;
public class List extends ListActivity {
private String[] listItems = new String[] { "Apple", "Android", "Symbian", "Window" };
private ArrayAdapter< String> adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list);
adapter = new ArrayAdapter
setListAdapter(adapter);
}
}
and simple copy the XML code.
The Following are the Main layout "activity_list" file
0 Comments