fix context menu padding
This commit is contained in:
parent
5986ee14e7
commit
62c71096c6
2 changed files with 15 additions and 5 deletions
|
@ -122,7 +122,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/additional_info_row"
|
android:id="@+id/additional_info_row_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
@ -138,6 +138,11 @@
|
||||||
android:paddingLeft="@dimen/context_menu_padding_margin_default"
|
android:paddingLeft="@dimen/context_menu_padding_margin_default"
|
||||||
android:paddingRight="@dimen/context_menu_padding_margin_default">
|
android:paddingRight="@dimen/context_menu_padding_margin_default">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/additional_info_row"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/context_menu_line3"
|
android:id="@+id/context_menu_line3"
|
||||||
style="@style/TextAppearance.ContextMenuSubtitle"
|
style="@style/TextAppearance.ContextMenuSubtitle"
|
||||||
|
@ -194,6 +199,7 @@
|
||||||
tools:textColor="?android:textColorSecondary"/>
|
tools:textColor="?android:textColorSecondary"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1289,7 +1289,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
}
|
}
|
||||||
|
|
||||||
int line3Height = 0;
|
int line3Height = 0;
|
||||||
View line3Container = view.findViewById(R.id.additional_info_row);
|
View line3Container = view.findViewById(R.id.additional_info_row_container);
|
||||||
if (line3Container.getVisibility() == View.VISIBLE) {
|
if (line3Container.getVisibility() == View.VISIBLE) {
|
||||||
line3Height = line3Container.getMeasuredHeight();
|
line3Height = line3Container.getMeasuredHeight();
|
||||||
}
|
}
|
||||||
|
@ -1522,12 +1522,16 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
&& compassView.getVisibility() == View.INVISIBLE
|
&& compassView.getVisibility() == View.INVISIBLE
|
||||||
&& titleButtonContainer.getVisibility() == View.GONE
|
&& titleButtonContainer.getVisibility() == View.GONE
|
||||||
&& downloadButtonsContainer.getVisibility() == View.GONE
|
&& downloadButtonsContainer.getVisibility() == View.GONE
|
||||||
&& titleBottomButtonContainer.getVisibility() == View.GONE
|
&& titleBottomButtonContainer.getVisibility() == View.GONE) {
|
||||||
&& titleProgressContainer.getVisibility() == View.VISIBLE) {
|
if (titleProgressContainer.getVisibility() == View.VISIBLE) {
|
||||||
|
view.findViewById(R.id.additional_info_row_container).setVisibility(View.GONE);
|
||||||
|
}
|
||||||
view.findViewById(R.id.additional_info_row).setVisibility(View.GONE);
|
view.findViewById(R.id.additional_info_row).setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
|
view.findViewById(R.id.additional_info_row_container).setVisibility(View.VISIBLE);
|
||||||
view.findViewById(R.id.additional_info_row).setVisibility(View.VISIBLE);
|
view.findViewById(R.id.additional_info_row).setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
runLayoutListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDistanceDirection() {
|
private void updateDistanceDirection() {
|
||||||
|
|
Loading…
Reference in a new issue