List of usage examples for android.view ViewGroup isSelected
@ViewDebug.ExportedProperty public boolean isSelected()
From source file:de.grobox.liberario.TripsActivity.java
private void selectTrip(View view, ViewGroup vg) { // take care of cases for ActionMode is already activated if (mActionMode != null) { if (vg.isSelected()) { // disable action mode for current item mActionMode.finish();//w w w . j a va2s . c o m // exit here to not start new ActionMode return; } else { // deselect previously selected trip mSelectedTrip.setSelected(false); // disable action mode for current item mActionMode.finish(); } } // select clicked trip mSelectedTrip = vg; mSelectedTrip.setSelected(true); // active new ActionMode for clicked trip mActionMode = startActionMode(mTripActionMode); }