mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-16 17:18:21 +00:00
Show 3 button nav on phone in Taskbar (1/2)
* TODO: Landscape/seascape support,
Separate nav spacing out into
separate class/add tests
Bug: 219035565
Change-Id: I8f5c007f04ea4d6df15962772806356181d764ff
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.taskbar.TaskbarManager.isPhoneMode;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
@@ -96,7 +94,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
mControllers = controllers;
|
||||
DeviceProfile deviceProfile = mActivity.getDeviceProfile();
|
||||
Resources resources = mActivity.getResources();
|
||||
if (isPhoneMode(mActivity.getDeviceProfile())) {
|
||||
if (isPhoneGestureNavMode(mActivity.getDeviceProfile())) {
|
||||
mStashedHandleView.getLayoutParams().height =
|
||||
resources.getDimensionPixelSize(R.dimen.taskbar_size);
|
||||
mStashedHandleWidth =
|
||||
@@ -108,7 +106,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
}
|
||||
|
||||
mTaskbarStashedHandleAlpha.getProperty(ALPHA_INDEX_STASHED).setValue(
|
||||
isPhoneMode(deviceProfile) ? 1 : 0);
|
||||
isPhoneGestureNavMode(deviceProfile) ? 1 : 0);
|
||||
mTaskbarStashedHandleHintScale.updateValue(1f);
|
||||
|
||||
final int stashedTaskbarHeight = mControllers.taskbarStashController.getStashedHeight();
|
||||
@@ -136,7 +134,7 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
view.setPivotY(stashedCenterY);
|
||||
});
|
||||
initRegionSampler();
|
||||
if (isPhoneMode(deviceProfile)) {
|
||||
if (isPhoneGestureNavMode(deviceProfile)) {
|
||||
onIsStashedChanged(true);
|
||||
}
|
||||
}
|
||||
@@ -164,6 +162,10 @@ public class StashedHandleViewController implements TaskbarControllers.LoggableT
|
||||
mRegionSamplingHelper = null;
|
||||
}
|
||||
|
||||
private boolean isPhoneGestureNavMode(DeviceProfile deviceProfile) {
|
||||
return TaskbarManager.isPhoneMode(deviceProfile) && !mActivity.isThreeButtonNav();
|
||||
}
|
||||
|
||||
public MultiValueAlpha getStashedHandleAlpha() {
|
||||
return mTaskbarStashedHandleAlpha;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user