private void setTopicBarListView() { if (mPopup == null) { mPopup = new PopupMenu(getActivity(), viewMenu); } Menu menu = mPopup.getMenu(); if (mTopicBarList == null) return; for (int i = 0; i < mTopicBarList.size(); ++i) { TopicBarList.TopicbarsEntity tBar = mTopicBarList.get(i); menu.add(0, i, Menu.NONE, tBar.getTopicbarname()); } onFilterTpByBarID(0); }
private void onFilterTpByBarID(int pos) { if (mTopicBarList == null) return; if (0 <= pos && pos < mTopicBarList.size()) { bar = mTopicBarList.get(pos); if (bar == null) return; String id = bar.getTopicbarid(); fragmentTopicList.setmTopicBarId(id); fragmentTopicList.onRefresh(); } }
@OnClick(R.id.img_pub) protected void onPub() { if (bar == null) return; PubTopicActivity.startAtyForCreate(getActivity(), bar.getTopicbarid(), bar.getTopicbarname()); }