[List11.java]

public class List11 extends ListActivity {
   
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_multiple_choice, GENRES));
       
        final ListView listView = getListView();

        listView.setItemsCanFocus(false);
        listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    }


    private static final String[] GENRES = new String[] {
        "Action", "Adventure", "Animation", "Children", "Comedy", "Documentary", "Drama",
        "Foreign", "History", "Independent", "Romance", "Sci-Fi", "Television", "Thriller"
    };
}

'old > API_Demo' 카테고리의 다른 글

Views_Lists_Slow Adapter  (0) 2010.04.27
Views_Lists_Transcript  (0) 2010.04.27
Views_Lists_Single choice list  (0) 2010.04.27
Views_Lists_Array(Overlay)  (0) 2010.04.27
Views_Lists_Photos  (0) 2010.04.27
Posted by jazzlife
,