示例#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);
   }
 }
示例#2
0
 @SuppressLint("NewApi")
 @Override
 public void supportInvalidateOptionsMenu() {
   if (VERSION.SDK_INT >= 11) {
     super.invalidateOptionsMenu();
   }
 }
示例#3
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   if (mConfig != null) {
     outState.putParcelable(CONFIG_KEY, mConfig);
   }
 }
示例#4
0
 @Override
 public void registerForContextMenu(View view) {
   if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
     super.registerForContextMenu(view);
   } else {
     registerForContextMenu(view, this);
   }
 }
示例#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);
   }
 }
示例#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);
     }
   }
 }
示例#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);
       }
     }
   }
 }
示例#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);
     }
   }
 }
示例#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));
   }
 }
示例#10
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   requestDecorView(null, null, -1);
   super.onPostCreate(savedInstanceState);
 }
示例#11
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   LayoutInflater.removeInstance(this);
 }
示例#12
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   forceInit(savedInstanceState);
   super.onCreate(savedInstanceState);
 }
示例#13
0
 @Override
 public void onContextMenuClosed(ContextMenu menu) {
   if (menu instanceof ContextMenuWrapper) {
     super.onContextMenuClosed(((ContextMenuWrapper) menu).unwrap());
   }
 }