mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Adding a custom view for DragHandle
> Separating page indicator and drag handle > Page indicator always draws irrespactive of oriantation > Drag handle is responsible for accessibility interactions > Adding assissibility actions for DragHandle Bug: 72500733 Change-Id: I9030337456964af1bdf77f1c01956452321f9229
This commit is contained in:
@@ -18,8 +18,9 @@ package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.LauncherAnimUtils.DRAWABLE_ALPHA;
|
||||
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
|
||||
import static com.android.launcher3.LauncherState.HOTSEAT_EXTRA;
|
||||
import static com.android.launcher3.LauncherState.DRAG_HANDLE_INDICATOR;
|
||||
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
|
||||
import static com.android.launcher3.LauncherState.HOTSEAT_SEARCH_BOX;
|
||||
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
|
||||
|
||||
import android.view.View;
|
||||
@@ -81,16 +82,19 @@ public class WorkspaceStateTransitionAnimation {
|
||||
|
||||
int elements = state.getVisibleElements(mLauncher);
|
||||
float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
|
||||
float hotseatExtraAlpha = (elements & HOTSEAT_EXTRA) != 0 ? 1 : 0;
|
||||
propertySetter.setViewAlpha(mLauncher.getHotseat().getLayout(), hotseatIconsAlpha,
|
||||
pageAlphaProvider.interpolator);
|
||||
for (View hotseatExtraContent : UiFactory.getHotseatExtraContent(mLauncher.getHotseat())) {
|
||||
propertySetter.setViewAlpha(hotseatExtraContent, hotseatExtraAlpha,
|
||||
pageAlphaProvider.interpolator);
|
||||
}
|
||||
propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(),
|
||||
hotseatIconsAlpha, pageAlphaProvider.interpolator);
|
||||
|
||||
propertySetter.setViewAlpha(mLauncher.getHotseatSearchBox(),
|
||||
(elements & HOTSEAT_SEARCH_BOX) != 0 ? 1 : 0,
|
||||
pageAlphaProvider.interpolator);
|
||||
|
||||
propertySetter.setViewAlpha(mLauncher.getDragHandleIndicator(),
|
||||
(elements & DRAG_HANDLE_INDICATOR) != 0 ? 1 : 0,
|
||||
pageAlphaProvider.interpolator);
|
||||
|
||||
// Set scrim
|
||||
propertySetter.setFloat(ViewScrim.get(mWorkspace), ViewScrim.PROGRESS,
|
||||
state.hasScrim ? 1 : 0, Interpolators.LINEAR);
|
||||
|
||||
Reference in New Issue
Block a user