Fix context menu margin
This commit is contained in:
parent
7c7083d4e0
commit
654ce8fa45
1 changed files with 7 additions and 2 deletions
|
@ -889,26 +889,31 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
|
|||
}
|
||||
|
||||
int dp16 = dpToPx(16f);
|
||||
boolean has16margin = false;
|
||||
int titleButtonHeight = 0;
|
||||
View titleButtonContainer = view.findViewById(R.id.title_button_container);
|
||||
if (titleButtonContainer.getVisibility() == View.VISIBLE) {
|
||||
titleButtonHeight = titleButtonContainer.getMeasuredHeight() - dp16;
|
||||
if (titleButtonHeight < 0) {
|
||||
titleButtonHeight = 0;
|
||||
} else {
|
||||
has16margin = true;
|
||||
}
|
||||
}
|
||||
int downloadButtonsHeight = 0;
|
||||
View downloadButtonsContainer = view.findViewById(R.id.download_buttons_container);
|
||||
if (downloadButtonsContainer.getVisibility() == View.VISIBLE) {
|
||||
downloadButtonsHeight = downloadButtonsContainer.getMeasuredHeight() - dp16;
|
||||
downloadButtonsHeight = downloadButtonsContainer.getMeasuredHeight() - (has16margin ? 0 : dp16);
|
||||
if (downloadButtonsHeight < 0) {
|
||||
downloadButtonsHeight = 0;
|
||||
} else {
|
||||
has16margin = true;
|
||||
}
|
||||
}
|
||||
int titleProgressHeight = 0;
|
||||
View titleProgressContainer = view.findViewById(R.id.title_progress_container);
|
||||
if (titleProgressContainer.getVisibility() == View.VISIBLE) {
|
||||
titleProgressHeight = titleProgressContainer.getMeasuredHeight() - dp16;
|
||||
titleProgressHeight = titleProgressContainer.getMeasuredHeight() - (has16margin ? 0 : dp16);
|
||||
if (titleProgressHeight < 0) {
|
||||
titleProgressHeight = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue