@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);
 }
Exemplo n.º 2
0
 public AwesomeBarTab getAwesomeBarTabForTag(String tag) {
   for (AwesomeBarTab tab : mTabs) {
     if (tag.equals(tab.getTag())) {
       return tab;
     }
   }
   return null;
 }
Exemplo n.º 3
0
 public boolean onBackPressed() {
   AwesomeBarTab tab = getCurrentAwesomeBarTab();
   if (tab == null) return false;
   return tab.onBackPressed();
 }
Exemplo n.º 4
0
 public void destroyItem(ViewGroup group, int index, Object obj) {
   AwesomeBarTab tab = (AwesomeBarTab) obj;
   group.removeView(tab.getView());
 }
Exemplo n.º 5
0
 public Object instantiateItem(ViewGroup group, int index) {
   AwesomeBarTab tab = mTabs[index];
   group.addView(tab.getView());
   return tab;
 }
Exemplo n.º 6
0
 public void destroy() {
   for (AwesomeBarTab tab : mTabs) {
     tab.destroy();
   }
 }
Exemplo n.º 7
0
 public void setOnUrlOpenListener(OnUrlOpenListener listener) {
   mUrlOpenListener = listener;
   for (AwesomeBarTab tab : mTabs) {
     tab.setUrlListener(listener);
   }
 }