@Override public void elementRemoved(ListEvent<CompanionFacade> e) { String type = e.getElement().getCompanionType(); int index = Collections.binarySearch(types, type, Comparators.toStringIgnoreCaseCollator()); CompanionTypeNode child = (CompanionTypeNode) getChildAt(index); child.removeCompanion(e.getElement()); }
/** * [Explain the description for this method here]. * * @param item the item * @return true, if successful * @see android.app.Activity#onOptionsItemSelected(android.view.MenuItem) */ @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case 1: String date = day + "-" + month + "-" + year; callIntent(date); return true; case 2: showDialog(DELETE_ALL_DIALOG); return true; case 3: ListEvent list = new ListEvent(); list.setSelectAll(true); Intent intent1 = new Intent(ILunarCalActivity.this, ListEvent.class); startActivity(intent1); return true; case 4: // showDialog(SYNCHRONIZE); return true; default: return super.onOptionsItemSelected(item); } }
@Override public void elementAdded(ListEvent<CompanionFacade> e) { addCompanion(e.getElement(), false); }