@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.checkable_main);

    String[] array = getResources().getStringArray(R.array.jazz_artist_names);
    ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(array));

    adapter = new ArrayAdapter<String>(this, R.layout.list_item_checkable, R.id.text, arrayList);

    setListAdapter(adapter);

    DragSortListView list = getListView();
    list.setDropListener(onDrop);
    list.setRemoveListener(onRemove);
  }
Exemplo n.º 2
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.warp_main);

    DragSortListView lv = (DragSortListView) getListView();

    lv.setDropListener(onDrop);
    lv.setRemoveListener(onRemove);
    lv.setDragScrollProfile(ssProfile);

    array = getResources().getStringArray(R.array.countries);
    list = new ArrayList<String>(Arrays.asList(array));

    adapter = new ArrayAdapter<String>(this, R.layout.list_item_handle_right, R.id.text, list);
    setListAdapter(adapter);
  }