Loading src/com/android/launcher3/shortcuts/DeepShortcutView.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.views.BubbleTextHolder; /** * A {@link android.widget.FrameLayout} that contains a {@link DeepShortcutView}. * This lets us animate the DeepShortcutView (icon and text) separately from the background. */ public class DeepShortcutView extends FrameLayout { public class DeepShortcutView extends FrameLayout implements BubbleTextHolder { private static final Point sTempPoint = new Point(); Loading Loading @@ -64,6 +65,7 @@ public class DeepShortcutView extends FrameLayout { mIconView = findViewById(R.id.icon); } @Override public BubbleTextView getBubbleText() { return mBubbleText; } Loading src/com/android/launcher3/views/BubbleTextHolder.java 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3.views; import com.android.launcher3.BubbleTextView; /** * Views that contain {@link BubbleTextView} should implement this interface. */ public interface BubbleTextHolder { BubbleTextView getBubbleText(); } src/com/android/launcher3/views/FloatingIconView.java +2 −2 Original line number Diff line number Diff line Loading @@ -210,8 +210,8 @@ public class FloatingIconView extends FrameLayout implements public static void getLocationBoundsForView(Launcher launcher, View v, boolean isOpening, RectF outRect, Rect outViewBounds) { boolean ignoreTransform = !isOpening; if (v instanceof DeepShortcutView) { v = ((DeepShortcutView) v).getBubbleText(); if (v instanceof BubbleTextHolder) { v = ((BubbleTextHolder) v).getBubbleText(); ignoreTransform = false; } else if (v.getParent() instanceof DeepShortcutView) { v = ((DeepShortcutView) v.getParent()).getIconView(); Loading Loading
src/com/android/launcher3/shortcuts/DeepShortcutView.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.views.BubbleTextHolder; /** * A {@link android.widget.FrameLayout} that contains a {@link DeepShortcutView}. * This lets us animate the DeepShortcutView (icon and text) separately from the background. */ public class DeepShortcutView extends FrameLayout { public class DeepShortcutView extends FrameLayout implements BubbleTextHolder { private static final Point sTempPoint = new Point(); Loading Loading @@ -64,6 +65,7 @@ public class DeepShortcutView extends FrameLayout { mIconView = findViewById(R.id.icon); } @Override public BubbleTextView getBubbleText() { return mBubbleText; } Loading
src/com/android/launcher3/views/BubbleTextHolder.java 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3.views; import com.android.launcher3.BubbleTextView; /** * Views that contain {@link BubbleTextView} should implement this interface. */ public interface BubbleTextHolder { BubbleTextView getBubbleText(); }
src/com/android/launcher3/views/FloatingIconView.java +2 −2 Original line number Diff line number Diff line Loading @@ -210,8 +210,8 @@ public class FloatingIconView extends FrameLayout implements public static void getLocationBoundsForView(Launcher launcher, View v, boolean isOpening, RectF outRect, Rect outViewBounds) { boolean ignoreTransform = !isOpening; if (v instanceof DeepShortcutView) { v = ((DeepShortcutView) v).getBubbleText(); if (v instanceof BubbleTextHolder) { v = ((BubbleTextHolder) v).getBubbleText(); ignoreTransform = false; } else if (v.getParent() instanceof DeepShortcutView) { v = ((DeepShortcutView) v.getParent()).getIconView(); Loading