android.app.Activity.onWindowFocusChanged()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(213)

本文整理了Java中android.app.Activity.onWindowFocusChanged()方法的一些代码示例,展示了Activity.onWindowFocusChanged()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.onWindowFocusChanged()方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:onWindowFocusChanged

Activity.onWindowFocusChanged介绍

暂无

代码示例

代码示例来源:origin: aporter/coursera-android

@Override
  public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (hasFocus) {
      mAnim.start();
    }
  }
}

代码示例来源:origin: robolectric/robolectric

@Override
public void onWindowFocusChanged(boolean newFocus) {
 super.onWindowFocusChanged(newFocus);
 transcript.add("finishedOnWindowFocusChanged");
}

代码示例来源:origin: robolectric/robolectric

@Override
 public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  callbacks.add("onWindowFocusChanged " + hasFocus);
 }
}

代码示例来源:origin: robolectric/robolectric

@Override
 public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  callbacks.add("onWindowFocusChanged " + hasFocus);
 }
}

代码示例来源:origin: libgdx/libgdx

@Override
public void onWindowFocusChanged (boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  useImmersiveMode(this.useImmersiveMode);
  hideStatusBar(this.hideStatusBar);
  if (hasFocus) {
    this.wasFocusChanged = 1;
    if (this.isWaitingForAudio) {
      this.audio.resume();
      this.isWaitingForAudio = false;
    }
  } else {
    this.wasFocusChanged = 0;
  }
}

代码示例来源:origin: libgdx/libgdx

@Override
public void onWindowFocusChanged (boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  useImmersiveMode(this.useImmersiveMode);
  hideStatusBar(this.hideStatusBar);
  if (hasFocus) {
    this.wasFocusChanged = 1;
    if (this.isWaitingForAudio) {
      this.audio.resume();
      this.isWaitingForAudio = false;
    }
  } else {
    this.wasFocusChanged = 0;
  }
}

代码示例来源:origin: Neamar/KISS

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  systemUiVisibilityHelper.onWindowFocusChanged(hasFocus);
  forwarderManager.onWindowFocusChanged(hasFocus);
}

代码示例来源:origin: iqiyi/Neptune

@Override
public void onWindowFocusChanged(boolean boolean0) {
  mOriginActivity.onWindowFocusChanged(boolean0);
}

代码示例来源:origin: klinker24/launcher3

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  mHasFocus = hasFocus;
  if (mLauncherCallbacks != null) {
    mLauncherCallbacks.onWindowFocusChanged(hasFocus);
  }
}

代码示例来源:origin: WiInputMethod/VE

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  if ((currentPage == 6) && hasFocus) {
    updateWindow();
  }
}

代码示例来源:origin: PangHaHa12138/Loading

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  if (hasFocus) {
    setPos();
  }
}
private void setPosWay1() {

代码示例来源:origin: Demidong/ClockView

@Override
  public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    wave.setImageRadius(head.getWidth()/2);
  }
}

代码示例来源:origin: fookwood/Launcher3

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  mHasFocus = hasFocus;
  if (mLauncherCallbacks != null) {
    mLauncherCallbacks.onWindowFocusChanged(hasFocus);
  }
}

代码示例来源:origin: enricocid/LaunchEnr

@Override
  public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (hasFocus) {
      ImmersiveUtils.toggleHideyBar(this, true);
    }
  }
}

代码示例来源:origin: li2/learning-android-open-source

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  mGame.requestFocus();
}

代码示例来源:origin: cachapa/AerialDream

@Override
public void onWindowFocusChanged(boolean hasFocus) {         
  super.onWindowFocusChanged(hasFocus);
  if (hasFocus) {
    getWindow().getDecorView().setSystemUiVisibility(
        View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
        | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        | View.SYSTEM_UI_FLAG_FULLSCREEN);
  }
}

代码示例来源:origin: PangHaHa12138/Loading

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  if (hasFocus) {
    setPos();
  }
}
private void setPosWay1() {

代码示例来源:origin: WowzaMediaSystems/gocoder-sdk-samples-android

/**
 * Enable Android's sticky immersive full-screen mode
 * See http://developer.android.com/training/system-ui/immersive.html#sticky
 */
@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  if (sFullScreenActivity && hasFocus)
    hideSystemUI();
}

代码示例来源:origin: baidu/GPT

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  super.onWindowFocusChanged(hasFocus);
  Activity target = getCurrentActivity();
  if (target != null) {
    target.onWindowFocusChanged(hasFocus);
  }
}

代码示例来源:origin: sytolk/TaxiAndroidOpen

@Override
public void onWindowFocusChanged(boolean hasFocus) {
  if (hasFocus) {
    TaxiApplication.msgResumed();
  } else {
    TaxiApplication.msgPaused();
    clearFlags();
  }
  super.onWindowFocusChanged(hasFocus);
}

相关文章

Activity类方法