Shorten and center TaskMenuView for landscape

* The width of the task menu view for landscape
(both fake and real) is the same as the width
it would be in portrait.
* With the shorter width, we also center the
positioning of the TaskMenuView
* Note this is only for phone, large screen
changes TODO

Bug: 193432925
Test: Tested real/fake landscape + seascape,
view is centered. Portrait same as before.

Change-Id: Ide41e252a3c177c4a911aab544f78930fed2e76f
This commit is contained in:
Vinit Nayak
2021-09-17 16:38:31 -07:00
parent e37b51b30f
commit 9e6a642d8b
7 changed files with 59 additions and 49 deletions

View File

@@ -81,13 +81,15 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
}
@Override
public float getTaskMenuX(float x, View thumbnailView, int overScroll) {
public float getTaskMenuX(float x, View thumbnailView, int overScroll,
DeviceProfile deviceProfile) {
return x;
}
@Override
public float getTaskMenuY(float y, View thumbnailView, int overScroll) {
return y + thumbnailView.getMeasuredHeight() + overScroll;
return y + overScroll +
(thumbnailView.getMeasuredHeight() + thumbnailView.getMeasuredWidth()) / 2f;
}
@Override