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:
Vinit Nayak
2022-08-05 10:43:29 -07:00
parent d6f79830e5
commit 8a3d05587e
9 changed files with 135 additions and 34 deletions

View File

@@ -18,6 +18,7 @@ package com.android.launcher3.taskbar;
import android.content.res.Resources;
import android.graphics.Rect;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.AnimatedFloat;
@@ -173,7 +174,15 @@ public class TaskbarDragLayerController implements TaskbarControllers.LoggableTa
* Returns how tall the background should be drawn at the bottom of the screen.
*/
public int getTaskbarBackgroundHeight() {
return mActivity.getDeviceProfile().taskbarSize;
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);
} else {
return deviceProfile.taskbarSize;
}
}
/**