Exemplo n.º 1
0
 @Override
 public void onPause() {
   super.onPause();
   if (_activity == null) // workaround for emulator bug (Issue 2423)
   return;
   anywheresoftware.b4a.Msgbox.dismiss(true);
   BA.LogInfo(
       "** Activity (register) Pause, UserClosed = " + activityBA.activity.isFinishing() + " **");
   processBA.raiseEvent2(
       _activity, true, "activity_pause", false, activityBA.activity.isFinishing());
   processBA.setActivityPaused(true);
   mostCurrent = null;
   if (!activityBA.activity.isFinishing()) previousOne = new WeakReference<Activity>(this);
   anywheresoftware.b4a.Msgbox.isDismissing = false;
 }
Exemplo n.º 2
0
  private void afterFirstLayout() {
    if (this != mostCurrent) return;
    activityBA =
        new BA(
            this, layout, processBA, "metube.mncplaymedia.com", "metube.mncplaymedia.com.register");

    processBA.sharedProcessBA.activityBA = new java.lang.ref.WeakReference<BA>(activityBA);
    anywheresoftware.b4a.objects.ViewWrapper.lastId = 0;
    _activity = new ActivityWrapper(activityBA, "activity");
    anywheresoftware.b4a.Msgbox.isDismissing = false;
    if (BA.isShellModeRuntimeCheck(processBA)) {
      if (isFirst) processBA.raiseEvent2(null, true, "SHELL", false);
      processBA.raiseEvent2(
          null,
          true,
          "CREATE",
          true,
          "metube.mncplaymedia.com.register",
          processBA,
          activityBA,
          _activity,
          anywheresoftware.b4a.keywords.Common.Density,
          mostCurrent);
      _activity.reinitializeForShell(activityBA, "activity");
    }
    initializeProcessGlobals();
    initializeGlobals();

    BA.LogInfo("** Activity (register) Create, isFirst = " + isFirst + " **");
    processBA.raiseEvent2(null, true, "activity_create", false, isFirst);
    isFirst = false;
    if (this != mostCurrent) return;
    processBA.setActivityPaused(false);
    BA.LogInfo("** Activity (register) Resume **");
    processBA.raiseEvent(null, "activity_resume");
    if (android.os.Build.VERSION.SDK_INT >= 11) {
      try {
        android.app.Activity.class.getMethod("invalidateOptionsMenu").invoke(this, (Object[]) null);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
Exemplo n.º 3
0
 public void run() {
   if (mostCurrent == null || mostCurrent != activity.get()) return;
   processBA.setActivityPaused(false);
   BA.LogInfo("** Activity (register) Resume **");
   processBA.raiseEvent(mostCurrent._activity, "activity_resume", (Object[]) null);
 }