Fix context menu landscape layout
This commit is contained in:
parent
fb105d4b30
commit
69d708f48d
1 changed files with 19 additions and 15 deletions
|
@ -605,6 +605,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
|
|
||||||
private float getToolbarAlpha(int y) {
|
private float getToolbarAlpha(int y) {
|
||||||
float a = 0;
|
float a = 0;
|
||||||
|
if (menu != null && !menu.isLandscapeLayout()) {
|
||||||
if (y < minHalfY) {
|
if (y < minHalfY) {
|
||||||
a = 1f - (y - bottomToolbarPosY) * (1f / (minHalfY - bottomToolbarPosY));
|
a = 1f - (y - bottomToolbarPosY) * (1f / (minHalfY - bottomToolbarPosY));
|
||||||
}
|
}
|
||||||
|
@ -613,6 +614,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
} else if (a > 1) {
|
} else if (a > 1) {
|
||||||
a = 1;
|
a = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,6 +625,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
|
|
||||||
private float getTopButtonAlpha(int y) {
|
private float getTopButtonAlpha(int y) {
|
||||||
float a = 0;
|
float a = 0;
|
||||||
|
if (menu != null && !menu.isLandscapeLayout()) {
|
||||||
int headerTopY = getHeaderOnlyTopY();
|
int headerTopY = getHeaderOnlyTopY();
|
||||||
if (y < headerTopY) {
|
if (y < headerTopY) {
|
||||||
a = 1f - (y - minHalfY) * (1f / (headerTopY - minHalfY));
|
a = 1f - (y - minHalfY) * (1f / (headerTopY - minHalfY));
|
||||||
|
@ -632,6 +635,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
} else if (a > 1) {
|
} else if (a > 1) {
|
||||||
a = 1;
|
a = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue