@Override public void onListItemClick(ListView l, View v, int position, long id) { l.setItemChecked(position, true); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { l.setItemChecked(position, true); }
final ListView list = getListView(); for ( int i=0; i< getListAdapter().getCount(); i++ ) { list.setItemChecked(i, true); }
public ListAdapterBuilder withAnyItemChecked() { checkedItemPosition = anyListIndex(); listView.setItemChecked(checkedItemPosition, true); return this; }
@Override public void onClick(DialogInterface dialog, int which, boolean isChecked) { ((AlertDialog) dialog).getListView().setItemChecked(which, isChecked); } };
@Override public void run() { if (lorem != null && lorem.isVisible()) { drawer.setItemChecked(0, true); } else if (content != null && content.isVisible()) { drawer.setItemChecked(1, true); } else { int toClear=drawer.getCheckedItemPosition(); if (toClear >= 0) { drawer.setItemChecked(toClear, false); } } } };
@Override public void onListItemClick(ListView l, View v, int position, long id) { l.setItemChecked(position, true); getContract().onCountrySelected(Country.EU.get(position)); }
@Override public boolean onItemLongClick(AdapterView<?> view, View row, int position, long id) { modeView.clearChoices(); modeView.setItemChecked(position, true); if (activeMode == null) { activeMode=host.startActionMode(this); } return(true); }
@Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL); getListView().setItemChecked(position, true); return(true); }
@Override public void onActivityCreated(Bundle state) { super.onActivityCreated(state); setListAdapter(new CountryAdapter()); if (state != null) { int position=state.getInt(STATE_CHECKED, -1); if (position > -1) { getListView().setItemChecked(position, true); } } }
@Override public void onActivityCreated(Bundle state) { super.onActivityCreated(state); setListAdapter(new CountryAdapter()); if (state != null) { int position=state.getInt(STATE_CHECKED, -1); if (position > -1) { getListView().setItemChecked(position, true); } } }
@Override public void onActivityCreated(Bundle state) { super.onActivityCreated(state); setListAdapter(new CountryAdapter()); if (state != null) { int position=state.getInt(STATE_CHECKED, -1); if (position > -1) { getListView().setItemChecked(position, true); } } }
@Override public void onListItemClick(ListView l, View v, int position, long id) { l.setItemChecked(position, true); getContract().onSensorSelected(adapter.getItem(position)); }
public void withAnyItemsChecked() { checkedItemPositions = new SparseBooleanArray(); int numberOfSelections = anyListIndex() + 1; for (int i = 0; i < numberOfSelections; i++) { checkedItemPositions.put(i, true); listView.setItemChecked(i, true); lastCheckedPosition = i; } } }
@Override public void onActivityCreated(Bundle state) { super.onActivityCreated(state); setListAdapter(new CountryAdapter()); getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); if (state != null) { int position=state.getInt(STATE_CHECKED, -1); if (position > -1) { getListView().setItemChecked(position, true); getContract().onCountrySelected(Country.EU.get(position)); } } }
void noteSessionInfo() { if (!mIsVisible) return; TerminalSession session = getCurrentTermSession(); final int indexOfSession = mTermService.getSessions().indexOf(session); showToast(toToastTitle(session), false); mListViewAdapter.notifyDataSetChanged(); final ListView lv = findViewById(R.id.left_drawer_list); lv.setItemChecked(indexOfSession, true); lv.smoothScrollToPosition(indexOfSession); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { if (getContract().isPersistentSelection()) { getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); l.setItemChecked(position, true); } else { getListView().setChoiceMode(ListView.CHOICE_MODE_NONE); } getContract().onCountrySelected(Country.EU.get(position)); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { if (getContract().isPersistentSelection()) { getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); l.setItemChecked(position, true); } else { getListView().setChoiceMode(ListView.CHOICE_MODE_NONE); } getContract().onCountrySelected(Country.EU.get(position)); }
@Override public void onListItemClick(ListView l, View v, int position, long id) { if (getContract().isPersistentSelection()) { getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); l.setItemChecked(position, true); } else { getListView().setChoiceMode(ListView.CHOICE_MODE_NONE); } getContract().onCountrySelected(Country.EU.get(position)); }
@Override public void onViewCreated(View view, Bundle state) { super.onViewCreated(view, state); adapter=new SensorListAdapter(this); getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); setListAdapter(adapter); if (state != null) { int position=state.getInt(STATE_CHECKED, -1); if (position > -1) { getListView().setItemChecked(position, true); getContract().onSensorSelected(adapter.getItem(position)); } } }