private Map<String, UserLabel> buildLabelIdMap(UserLabel[] labels) { Map<String, UserLabel> labelMap = new HashMap<String, UserLabel>(); if (labels != null && labels.length > 0) { for (UserLabel label : labels) { labelMap.put(label.getId(), label); } } return labelMap; }
private List<String> buildLabelIdList(UserLabel[] labels) { List<String> idList = new ArrayList<String>(); if (labels != null && labels.length > 0) { for (UserLabel label : labels) { idList.add(label.getId()); } } return idList; }
@Override public void onLabelLongClick(UserLabel label) { if (!(mMyLabelIdList.contains(label.getId()))) { UILauncher.launchLabelOptionUI(getFragmentManager(), label.toBaseLabel()); } }