Search in sources :

Example 6 with STAGE_POSITION_TOP_OR_LEFT

use of com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT in project android_packages_apps_Launcher3 by ProtonAOSP.

the class PortraitPagedViewHandler method getSplitPositionOptions.

@Override
public List<SplitPositionOption> getSplitPositionOptions(DeviceProfile dp) {
    List<SplitPositionOption> options = new ArrayList<>(1);
    // Add both left and right options if we're in tablet mode
    if (dp.isTablet && dp.isLandscape) {
        options.add(new SplitPositionOption(R.drawable.ic_split_right, R.string.split_screen_position_right, STAGE_POSITION_BOTTOM_OR_RIGHT, STAGE_TYPE_MAIN));
        options.add(new SplitPositionOption(R.drawable.ic_split_left, R.string.split_screen_position_left, STAGE_POSITION_TOP_OR_LEFT, STAGE_TYPE_MAIN));
    } else {
        if (dp.isSeascape()) {
            // Add left/right options
            options.add(new SplitPositionOption(R.drawable.ic_split_right, R.string.split_screen_position_right, STAGE_POSITION_BOTTOM_OR_RIGHT, STAGE_TYPE_MAIN));
        } else if (dp.isLandscape) {
            options.add(new SplitPositionOption(R.drawable.ic_split_left, R.string.split_screen_position_left, STAGE_POSITION_TOP_OR_LEFT, STAGE_TYPE_MAIN));
        } else {
            // Only add top option
            options.add(new SplitPositionOption(R.drawable.ic_split_top, R.string.split_screen_position_top, STAGE_POSITION_TOP_OR_LEFT, STAGE_TYPE_MAIN));
        }
    }
    return options;
}
Also used : SplitPositionOption(com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption) ArrayList(java.util.ArrayList)

Aggregations

SplitPositionOption (com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption)5 ArrayList (java.util.ArrayList)5 ActivityOptions (android.app.ActivityOptions)1 Handler (android.os.Handler)1 LauncherAnimationRunner (com.android.launcher3.LauncherAnimationRunner)1 RemoteAnimationFactory (com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory)1 RemoteAnimationAdapterCompat (com.android.systemui.shared.system.RemoteAnimationAdapterCompat)1 RemoteAnimationRunnerCompat (com.android.systemui.shared.system.RemoteAnimationRunnerCompat)1 RemoteTransitionCompat (com.android.systemui.shared.system.RemoteTransitionCompat)1