@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { final XiuInfo xiuInfo = (XiuInfo) parent.getItemAtPosition(position); if (xiuInfo != null && xiuInfo.getShowType() == XiuInfo.TYPE_MODIFIABLE) { IntentUtils.goToXiuSubPage(getActivity(), xiuInfo); } }
private boolean isDuplicateName(String inputText) { for (XiuInfo xiuInfo : mXiuInfos) { if (xiuInfo.getTask_name().equals(inputText)) { return true; } } return false; }
private XiuInfo getXiuInfoByInputText(String inputText) { final XiuInfo xiuInfo = new XiuInfo(); xiuInfo.setTask_name(inputText); xiuInfo.setCreate_time(String.valueOf(System.currentTimeMillis())); xiuInfo.setTask_id(UUIDGenerator.getUUID()); xiuInfo.setShowType(XiuInfo.TYPE_MODIFIABLE); xiuInfo.setUid(GlobalDataHolder.getInstance(getActivity()).getUid()); return xiuInfo; }