本文整理了Java中android.app.Activity.isInPictureInPictureMode()
方法的一些代码示例,展示了Activity.isInPictureInPictureMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.isInPictureInPictureMode()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:isInPictureInPictureMode
暂无
代码示例来源:origin: iqiyi/Neptune
@RequiresApi(api = Build.VERSION_CODES.N)
@Override
public boolean isInPictureInPictureMode() {
return mOriginActivity.isInPictureInPictureMode();
}
代码示例来源:origin: milosmns/silly-android
/**
* Checks whether the given activity is in PIP mode (picture-in-picture).
*/
public static boolean isInPictureInPictureMode(@Nullable final Activity activity) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && activity != null && activity.isInPictureInPictureMode();
}
代码示例来源:origin: cemrich/zapp
/**
* This function can be used with any API level and will return
* false if the multi window feature is not supported.
*
* @param activity to get access to multi window api
* @return true if activity is currently displayed in multi window mode
*/
@TargetApi(24)
public static boolean isInsideMultiWindow(Activity activity) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N &&
(activity.isInMultiWindowMode() || activity.isInPictureInPictureMode());
}
代码示例来源:origin: zendesk/belvedere
@Override
public boolean shouldShowFullScreen() {
// Show full screen image stream if the app is in multi window or picture in picture mode
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
if (activity.isInMultiWindowMode() || activity.isInPictureInPictureMode()) {
return true;
}
}
// If there's a hardware keyboard attached show the picker in full screen mode
final boolean hasHardwareKeyboard =
activity.getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS;
if (hasHardwareKeyboard) {
return true;
}
// If there's an accessibility service enabled, show in full screen mode
// Exclude AccessibilityServiceInfo.FEEDBACK_GENRICE this is used by password mangers.
final AccessibilityManager manager = (AccessibilityManager) activity.getSystemService(Context.ACCESSIBILITY_SERVICE);
if (manager != null) {
int flags = AccessibilityServiceInfo.FEEDBACK_AUDIBLE | AccessibilityServiceInfo.FEEDBACK_SPOKEN
| AccessibilityServiceInfo.FEEDBACK_VISUAL | AccessibilityServiceInfo.FEEDBACK_BRAILLE
| AccessibilityServiceInfo.FEEDBACK_HAPTIC;
final List<AccessibilityServiceInfo> enabledAccessibilityServiceList = manager.getEnabledAccessibilityServiceList(flags);
if (enabledAccessibilityServiceList != null && enabledAccessibilityServiceList.size() > 0) {
return true;
}
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!