Exemplo n.º 1
0
 @Override
 @SuppressLint("NewApi")
 public void superStartActivity(Intent intent, int requestCode, Bundle options) {
   if (VERSION.SDK_INT >= 16) {
     super.startActivityForResult(intent, requestCode, options);
   } else {
     super.startActivityForResult(intent, requestCode);
   }
 }
Exemplo n.º 2
0
 @SuppressLint("NewApi")
 @Override
 public void supportInvalidateOptionsMenu() {
   if (VERSION.SDK_INT >= 11) {
     super.invalidateOptionsMenu();
   }
 }
Exemplo n.º 3
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   if (mConfig != null) {
     outState.putParcelable(CONFIG_KEY, mConfig);
   }
 }
Exemplo n.º 4
0
 @Override
 public void registerForContextMenu(View view) {
   if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
     super.registerForContextMenu(view);
   } else {
     registerForContextMenu(view, this);
   }
 }
Exemplo n.º 5
0
 @Override
 public final void onContextMenuClosed(android.view.Menu menu) {
   if (menu instanceof android.view.ContextMenu) {
     onContextMenuClosed(new ContextMenuWrapper((android.view.ContextMenu) menu));
   } else {
     super.onContextMenuClosed(menu);
   }
 }
Exemplo n.º 6
0
 @Override
 public void unregisterForContextMenu(View view) {
   if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
     super.unregisterForContextMenu(view);
   } else {
     if (mContextMenuListeners != null) {
       mContextMenuListeners.remove(view);
     }
   }
 }
Exemplo n.º 7
0
 @Override
 public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
   final android.view.ContextMenu nativeMenu;
   if (menu instanceof ContextMenuWrapper) {
     nativeMenu = ((ContextMenuWrapper) menu).unwrap();
     super.onCreateContextMenu(nativeMenu, view, menuInfo);
     if (view instanceof ContextMenuCallbackGetter) {
       final OnCreateContextMenuListener l =
           ((ContextMenuCallbackGetter) view).getOnCreateContextMenuListener();
       if (l != null) {
         l.onCreateContextMenu(nativeMenu, view, menuInfo);
       }
     }
   }
 }
Exemplo n.º 8
0
 @Override
 public void onWindowFocusChanged(boolean hasFocus) {
   super.onWindowFocusChanged(hasFocus);
   synchronized (mOnWindowFocusChangeListeners) {
     Iterator<WeakReference<OnWindowFocusChangeListener>> i =
         mOnWindowFocusChangeListeners.iterator();
     while (i.hasNext()) {
       WeakReference<OnWindowFocusChangeListener> reference = i.next();
       if (reference == null) {
         i.remove();
         continue;
       }
       OnWindowFocusChangeListener iListener = reference.get();
       if (iListener == null) {
         i.remove();
         continue;
       }
       iListener.onWindowFocusChanged(hasFocus);
     }
   }
 }
Exemplo n.º 9
0
 public synchronized void setTheme(int resid, boolean modifyGlobal) {
   if (resid > ThemeManager._START_RESOURCES_ID) {
     if (mLastThemeResourceId != resid) {
       mActionBarContext = null;
       mMenuInflater = null;
       super.setTheme(mLastThemeResourceId = resid);
     }
   } else {
     if ((resid & ThemeManager.COLOR_SCHEME_MASK) == 0) {
       int theme = ThemeManager.getTheme(getIntent(), false);
       if (theme == 0) {
         final android.app.Activity activity = getParent();
         if (activity != null) {
           theme = ThemeManager.getTheme(activity.getIntent(), false);
         }
       }
       theme &= ThemeManager.COLOR_SCHEME_MASK;
       if (theme != 0) {
         resid |= theme;
       }
     }
     setTheme(ThemeManager.getThemeResource(resid, modifyGlobal));
   }
 }
Exemplo n.º 10
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   requestDecorView(null, null, -1);
   super.onPostCreate(savedInstanceState);
 }
Exemplo n.º 11
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   LayoutInflater.removeInstance(this);
 }
Exemplo n.º 12
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   forceInit(savedInstanceState);
   super.onCreate(savedInstanceState);
 }
Exemplo n.º 13
0
 @Override
 public void onContextMenuClosed(ContextMenu menu) {
   if (menu instanceof ContextMenuWrapper) {
     super.onContextMenuClosed(((ContextMenuWrapper) menu).unwrap());
   }
 }