diff options
5 files changed, 38 insertions, 8 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java index 13f9601ee..7114f5295 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java @@ -88,7 +88,10 @@ public class UiFactory { } } - public static View getHotseatExtraContent(Hotseat hotseat) { - return hotseat.findViewById(R.id.search_container_hotseat); + public static View[] getHotseatExtraContent(Hotseat hotseat) { + return new View[] { + hotseat.findViewById(R.id.drag_indicator), + hotseat.findViewById(R.id.search_container_hotseat), + }; } } diff --git a/res/drawable/ic_drag_indicator.xml b/res/drawable/ic_drag_indicator.xml new file mode 100644 index 000000000..d50bdd3fd --- /dev/null +++ b/res/drawable/ic_drag_indicator.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 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. +--> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="2dp" + android:width="16dp" + android:viewportHeight="2.0" + android:viewportWidth="16.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M1,0h14c0.55,0,1,0.45,1,1s-0.45,1-1,1H1C0.45,2,0,1.55,0,1S0.45,0,1,0z"/> +</vector>
\ No newline at end of file diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java index 66ea4d48b..3a222c261 100644 --- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java +++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java @@ -84,8 +84,10 @@ public class WorkspaceStateTransitionAnimation { float hotseatExtraAlpha = (elements & HOTSEAT_EXTRA) != 0 ? 1 : 0; propertySetter.setViewAlpha(mLauncher.getHotseat().getLayout(), hotseatIconsAlpha, pageAlphaProvider.interpolator); - propertySetter.setViewAlpha(UiFactory.getHotseatExtraContent(mLauncher.getHotseat()), - hotseatExtraAlpha, pageAlphaProvider.interpolator); + for (View hotseatExtraContent : UiFactory.getHotseatExtraContent(mLauncher.getHotseat())) { + propertySetter.setViewAlpha(hotseatExtraContent, hotseatExtraAlpha, + pageAlphaProvider.interpolator); + } propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(), hotseatIconsAlpha, pageAlphaProvider.interpolator); diff --git a/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java b/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java index 4fc7d8a31..94ae39bb5 100644 --- a/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java +++ b/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java @@ -155,8 +155,8 @@ public class WorkspacePageIndicator extends View int lineWidth = (int) (availableWidth / mNumPagesFloat); int lineLeft = (int) (progress * (availableWidth - lineWidth)); int lineRight = lineLeft + lineWidth; - canvas.drawRect(lineLeft, canvas.getHeight() - mLineHeight, lineRight, canvas.getHeight(), - mLinePaint); + canvas.drawRoundRect(lineLeft, canvas.getHeight() / 2 - mLineHeight / 2, lineRight, + canvas.getHeight() / 2 + mLineHeight / 2, mLineHeight, mLineHeight, mLinePaint); } @Override diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java index c4b4a4585..94abcce57 100644 --- a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java +++ b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java @@ -48,7 +48,7 @@ public class UiFactory { public static void onTrimMemory(Launcher launcher, int level) { } - public static View getHotseatExtraContent(Hotseat hotseat) { - return null; + public static View[] getHotseatExtraContent(Hotseat hotseat) { + return new View[0]; } } |