@Override public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, view, menuInfo); ListView list = (ListView) view; AwesomeBarTab tab = mAwesomeTabs.getAwesomeBarTabForView(view); mContextMenuSubject = tab.getSubject(menu, view, menuInfo); }
public AwesomeBarTab getAwesomeBarTabForTag(String tag) { for (AwesomeBarTab tab : mTabs) { if (tag.equals(tab.getTag())) { return tab; } } return null; }
public boolean onBackPressed() { AwesomeBarTab tab = getCurrentAwesomeBarTab(); if (tab == null) return false; return tab.onBackPressed(); }
public void destroyItem(ViewGroup group, int index, Object obj) { AwesomeBarTab tab = (AwesomeBarTab) obj; group.removeView(tab.getView()); }
public Object instantiateItem(ViewGroup group, int index) { AwesomeBarTab tab = mTabs[index]; group.addView(tab.getView()); return tab; }
public void destroy() { for (AwesomeBarTab tab : mTabs) { tab.destroy(); } }
public void setOnUrlOpenListener(OnUrlOpenListener listener) { mUrlOpenListener = listener; for (AwesomeBarTab tab : mTabs) { tab.setUrlListener(listener); } }