コード例 #1
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   Window window = getWindow();
   // Eliminates color banding
   window.setFormat(PixelFormat.RGBA_8888);
 }
コード例 #2
0
  public void onAttachedToWindow() {
    int sysVersion = Integer.parseInt(android.os.Build.VERSION.SDK);
    if (sysVersion <= 8) { // 只对2.2以下的版本有效
      this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
    }

    super.onAttachedToWindow();
  }
コード例 #3
0
 @Override
 public void onAttachedToWindow() {
   // Log.e("Accompany-GUI-activity","on attached to window");
   // this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   // Log.e("Accompany-GUI-activity","on attached to window 2");
   super.onAttachedToWindow();
   // Log.e("Accompany-GUI-activity","on attached to window 3");
 }
コード例 #4
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (!mFromLiveCardVoice) {
     // When not activated by voice, we are activated by TAP from a live card.
     // Open the options menu as soon as window attaches.
     openOptionsMenu();
   }
 }
コード例 #5
0
  @Override
  public void onAttachedToWindow() {

    super.onAttachedToWindow();
    if (remotePlugin == null) {
      return;
    }
    remotePlugin.getCurrentPluginActivity().onAttachedToWindow();
  }
コード例 #6
0
 @Override
 public void onAttachedToWindow() {
   Log.d(TAG, "onAttachedToWindow");
   Log.d(
       TAG,
       "____________________________ ____________ onAttachedToWindow type: "
           + getWindow().getAttributes().type);
   //		getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   ////		getWindow().addFlags(FLAG_FULLSCREEN | FLAG_KEEP_SCREEN_ON);
   //		getWindow().addFlags(FLAG_KEEP_SCREEN_ON);
   super.onAttachedToWindow();
 }
コード例 #7
0
  @Override
  public void onAttachedToWindow() {
    super.onAttachedToWindow();

    mAbstractConsole = ConsoleManager.getMainConsole();
    if (mAbstractConsole == null) {
      mDeviceDialog = new DeviceDialog(this, mHandler.obtainMessage(ACTION_DEVICE_SELECTED));
      mDeviceDialog.show(getDecorView());
    } else if (mAbstractConsole.getState() == AbstractConsole.State.STOPPED) {
      new Thread(mAbstractConsole).start();
    } else {
      mAbstractConsole.setOnConsoleStateChangedListener(this);
    }
  }
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (mGesture != null) {
     final GestureOverlayView overlay = (GestureOverlayView) findViewById(R.id.gestures_overlay);
     overlay.post(
         new Runnable() {
           @Override
           public void run() {
             overlay.setGesture(mGesture);
             mDoneButton.setEnabled(true);
           }
         });
   }
 }
コード例 #9
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   Window window = getWindow();
   window.setFormat(PixelFormat.RGBA_8888);
 }
コード例 #10
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   openOptionsMenu();
 }
コード例 #11
0
 /** Called when the view is attached to a window. */
 @Override
 public void onAttachedToWindow() {
   // disables the home button so logging will continue
   this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
   super.onAttachedToWindow();
 }
コード例 #12
0
  /**
   * create any associated state and call init methods on an activity
   *
   * <p>call any life cycle events for the activity
   *
   * @param activity
   */
  @DSVerified
  @DSBan(DSCat.DROIDSAFE_INTERNAL)
  public static void modelActivity(android.app.Activity activity) {
    if (mApplication != null) activity.setApplication(mApplication);

    Bundle b = new Bundle();
    activity.performCreate(b, context);

    activity.onAttachedToWindow();
    activity.onWindowFocusChanged(true);

    // Call all public methods with no params
    activity.onBackPressed();
    activity.onContentChanged();
    activity.onCreateDescription();
    activity.onLowMemory();
    activity.onRetainNonConfigurationInstance();
    // do not call this automatically because it leads to a crazy long path of crap
    // activity.onSearchRequested();
    activity.onUserInteraction();

    // TODO: DOES THIS MAKE SENSE?
    // We should not change method's visiblity
    /*
    activity.onCreateDialog(0);
    activity.onCreateDialog(0, new Bundle());
    activity.onPrepareDialog(0, new Dialog(context));
    */

    /*
    //TODO: WHAT ABOUT A REAL MENU?  We moved to Activity's droidsafeOnOtherHook
    activity.onCreateOptionsMenu(null);
    activity.onPrepareOptionsMenu(null);
    activity.onCreateContextMenu(null, null, null);
    activity.onOptionsItemSelected(null);
    activity.onContextItemSelected(null);
    activity.dispatchTouchEvent(new MotionEvent());

    //activity.droidsafeOnKeyEvents();
    */
    activity.onConfigurationChanged(new Configuration());
    activity.droidsafeOnSavedInstanceState(b);

    activity.droidsafeOnResume();
    activity.droidsafeOnPause();

    ////////////////
    // Callback hooks specific for SubActivity classes
    // All subclass of Activity should implment this in the model
    // so that their callback will be called
    // Map, listview, expandblelist, etc...
    activity.droidsafeSubActivityCallbackHook();

    activity.droidsafeOnStop();

    activity.droidsafeOnRestart();

    activity.droidsafeOnDestroy();

    activity.droidsafePerformRestoreInstanceState(b);

    activity.onDetachedFromWindow();
    // Calls for MapActivity from mapping library
  }
コード例 #13
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mFullScreenScale = getMeasureScale();
 }
コード例 #14
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   //        getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
 }
コード例 #15
0
ファイル: MainActivity.java プロジェクト: treejames/coin
 // 使home物理键失效
 @Override
 public void onAttachedToWindow() {
   // this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
   super.onAttachedToWindow();
 }