Landscape 3 button nav on taskbar phone supported

* TODO: Seascape bar positioning, add tests

Change-Id: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
Merged-In: I542be2f2f682d8c8a9cdd9bb6c667c44ca167f3e
This commit is contained in:
Vinit Nayak
2022-08-11 17:33:35 -07:00
parent 126d178358
commit d6c5147524
17 changed files with 1000 additions and 134 deletions

View File

@@ -16,11 +16,13 @@
package com.android.launcher3.taskbar;
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.Rect;
import android.view.ViewTreeObserver;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.util.DimensionUtils;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.AnimatedFloat;
@@ -177,9 +179,12 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
DeviceProfile deviceProfile = mActivity.getDeviceProfile();
if (TaskbarManager.isPhoneMode(deviceProfile)) {
Resources resources = mActivity.getResources();
return mActivity.isThreeButtonNav() ?
resources.getDimensionPixelSize(R.dimen.taskbar_size) :
resources.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
Point taskbarDimensions =
DimensionUtils.getTaskbarPhoneDimensions(deviceProfile, resources,
TaskbarManager.isPhoneMode(deviceProfile));
return taskbarDimensions.y == -1 ?
deviceProfile.getDisplayInfo().currentSize.y :
taskbarDimensions.y;
} else {
return deviceProfile.taskbarSize;
}