1. package com.android.contactlist;
  2.  
  3. import android.app.ListActivity;
  4. import android.os.Bundle;
  5. import android.widget.ArrayAdapter;
  6.  
  7. public class showfriends extends ListActivity {
  8. /** Called when the activity is first created. */
  9. @Override
  10. public void onCreate(Bundle icicle) {
  11. super.onCreate(icicle);
  12. // Create an array of Strings, that will be put to our ListActivity
  13. String[] mStrings = new String[]{"Thomas Malmberg", "Alexandra Törn", "Nicklas Storm", "Anna Överås", "Ajden Nedzipovski"};
  14.  
  15. // Create an ArrayAdapter, that will actually make the Strings above appear in the ListView
  16. this.setListAdapter(new ArrayAdapter<String>(this,
  17. android.R.layout.simple_list_item_1, mStrings));
  18. }
  19. }