コード例 #1
0
ファイル: register.java プロジェクト: aignatd/ezMetube-B4A
  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();
      }
    }
  }
コード例 #2
0
ファイル: register.java プロジェクト: aignatd/ezMetube-B4A
 @Override
 public boolean onKeyUp(int keyCode, android.view.KeyEvent event) {
   if (onKeyUpSubExist == null) onKeyUpSubExist = processBA.subExists("activity_keyup");
   if (onKeyUpSubExist) {
     Boolean res =
         (Boolean) processBA.raiseEvent2(_activity, false, "activity_keyup", false, keyCode);
     if (res == null || res == true) return true;
   }
   return super.onKeyUp(keyCode, event);
 }
コード例 #3
0
ファイル: register.java プロジェクト: aignatd/ezMetube-B4A
 @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;
 }
コード例 #4
0
ファイル: register.java プロジェクト: aignatd/ezMetube-B4A
 private static void initializeGlobals() {
   processBA.raiseEvent2(null, true, "globals", false, (Object[]) null);
 }
コード例 #5
0
ファイル: register.java プロジェクト: aignatd/ezMetube-B4A
 public void onWindowFocusChanged(boolean hasFocus) {
   super.onWindowFocusChanged(hasFocus);
   if (processBA.subExists("activity_windowfocuschanged"))
     processBA.raiseEvent2(null, true, "activity_windowfocuschanged", false, hasFocus);
 }