blob: 8521334fc752b0d867bebffee1a86f8699301e2a [file] [log] [blame]
Sunny Goyal85525172017-11-06 13:00:42 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.launcher3.uioverrides;
18
Sunny Goyal16764582017-11-06 16:00:34 -080019import android.view.View.AccessibilityDelegate;
20
Sunny Goyal85525172017-11-06 13:00:42 -080021import com.android.launcher3.Launcher;
Sunny Goyalc4fa8c32017-11-07 12:23:58 -080022import com.android.launcher3.LauncherStateManager.StateHandler;
Sunny Goyal85525172017-11-06 13:00:42 -080023import com.android.launcher3.VerticalSwipeController;
24import com.android.launcher3.util.TouchController;
25
26public class UiFactory {
27
28 public static TouchController[] createTouchControllers(Launcher launcher) {
29 return new TouchController[] {
30 new VerticalSwipeController(launcher), new PinchToOverviewListener(launcher)};
31 }
Sunny Goyal16764582017-11-06 16:00:34 -080032
33 public static AccessibilityDelegate newPageIndicatorAccessibilityDelegate() {
34 return new OverviewAccessibilityDelegate();
35 }
Sunny Goyalc4fa8c32017-11-07 12:23:58 -080036
37 public static StateHandler[] getStateHandler(Launcher launcher) {
38 return new StateHandler[] {
39 (OverviewPanel) launcher.getOverviewPanel(),
40 launcher.getAllAppsController(), launcher.getWorkspace() };
41 }
Sunny Goyal85525172017-11-06 13:00:42 -080042}