blob: a2acb6459fd7478cd9bb9732f9ec2c668cc7b229 [file] [log] [blame]
Winson Chungc58497e2013-09-03 17:48:37 -07001/*
2 * Copyright (C) 2010 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;
18
19import android.content.Context;
20import android.content.res.Resources;
21import android.util.AttributeSet;
22import android.view.MotionEvent;
23import android.view.View;
24import android.view.ViewDebug;
25import android.view.ViewGroup;
26
27public class AppsCustomizeCellLayout extends CellLayout implements Page {
28 public AppsCustomizeCellLayout(Context context) {
29 super(context);
30 }
31
32 @Override
33 public void removeAllViewsOnPage() {
34 removeAllViews();
35 setLayerType(LAYER_TYPE_NONE, null);
36 }
37
38 @Override
39 public void removeViewOnPageAt(int index) {
40 removeViewAt(index);
41 }
42
43 @Override
44 public int getPageChildCount() {
45 return getChildCount();
46 }
47
48 @Override
49 public View getChildOnPageAt(int i) {
50 return getChildAt(i);
51 }
52
53 @Override
54 public int indexOfChildOnPage(View v) {
55 return indexOfChild(v);
56 }
57
58 /**
59 * Clears all the key listeners for the individual icons.
60 */
61 public void resetChildrenOnKeyListeners() {
62 ShortcutAndWidgetContainer children = getShortcutsAndWidgets();
63 int childCount = children.getChildCount();
64 for (int j = 0; j < childCount; ++j) {
65 children.getChildAt(j).setOnKeyListener(null);
66 }
67 }
68}