compat/src/main/java/androidx/core/view/ViewConfigurationCompat.java
public static boolean shouldShowMenuShortcutsWhenKeyboardPresent(ViewConfiguration config,
            @NonNull Context context) {
        if (android.os.Build.VERSION.SDK_INT >= 28) {
            return config.shouldShowMenuShortcutsWhenKeyboardPresent();
        }
        final Resources res = context.getResources();
        final int platformResId = res.getIdentifier(
                "config_showMenuShortcutsWhenKeyboardPresent", "bool", "android");
        return platformResId != 0 && res.getBoolean(platformResId);
    }
/**
     * Check if shortcuts should be displayed in menus.
     *
     * @return {@code True} if shortcuts should be displayed in menus.
     */
Check if shortcuts should be displayed in menus.
@return  True if shortcuts should be displayed in menus.
Check if shortcuts should be displayed in menus . @return True if shortcuts should be displayed in menus .
public static boolean shouldShowMenuShortcutsWhenKeyboardPresent(ViewConfiguration config,
            @NonNull Context context) {
        if (android.os.Build.VERSION.SDK_INT >= 28) {
            return config.shouldShowMenuShortcutsWhenKeyboardPresent();
        }
        final Resources res = context.getResources();
        final int platformResId = res.getIdentifier(
                "config_showMenuShortcutsWhenKeyboardPresent", "bool", "android");
        return platformResId != 0 && res.getBoolean(platformResId);
    }
public static boolean shouldShowMenuShortcutsWhenKeyboardPresent ( ViewConfiguration config , @ NonNull Context context ) { if ( android . os . Build . VERSION . SDK_INT >= 28 ) { return config . shouldShowMenuShortcutsWhenKeyboardPresent ( ) ; } final Resources res = context . getResources ( ) ; final int platformResId = res . getIdentifier ( "config_showMenuShortcutsWhenKeyboardPresent" , "bool" , "android" ) ; return platformResId != 0 && res . getBoolean ( platformResId ) ; }
Check if shortcuts should be displayed in menus.
Check if shortcuts should be displayed in menus .