From 7c67e911ba4372ed8e8f45dedc714cb0da5fbc5f Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 3 Feb 2020 15:35:10 +0200 Subject: [PATCH 1/3] Fix #6669 OSM Editing screen: show Save button above keyboard. --- OsmAnd/res/layout/fragment_edit_poi.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OsmAnd/res/layout/fragment_edit_poi.xml b/OsmAnd/res/layout/fragment_edit_poi.xml index 47907d2cbc..b9b3f0e2d8 100644 --- a/OsmAnd/res/layout/fragment_edit_poi.xml +++ b/OsmAnd/res/layout/fragment_edit_poi.xml @@ -19,7 +19,7 @@ app:contentInsetLeft="72dp" app:contentInsetStart="72dp"/> - @@ -64,7 +62,6 @@ + - - - + + + Date: Tue, 25 Feb 2020 11:44:45 +0200 Subject: [PATCH 2/3] Fix #6669 OSM Editing screen: show Save button above keyboard. --- OsmAnd/res/layout/fragment_edit_poi.xml | 16 +++--- .../plus/osmedit/EditPoiDialogFragment.java | 4 +- .../osmand/plus/osmedit/EditPoiViewPager.java | 52 +++++++++++++++++++ 3 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/osmedit/EditPoiViewPager.java diff --git a/OsmAnd/res/layout/fragment_edit_poi.xml b/OsmAnd/res/layout/fragment_edit_poi.xml index b9b3f0e2d8..fdd799b7d5 100644 --- a/OsmAnd/res/layout/fragment_edit_poi.xml +++ b/OsmAnd/res/layout/fragment_edit_poi.xml @@ -19,10 +19,15 @@ app:contentInsetLeft="72dp" app:contentInsetStart="72dp"/> + + - - - - + height) height = h; + } + + if (height != 0) { + heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY); + } + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + setMeasuredDimension(getMeasuredWidth(), measureHeight(heightMeasureSpec, view)); + } + + private int measureHeight(int measureSpec, View view) { + int result = 0; + int specMode = MeasureSpec.getMode(measureSpec); + int specSize = MeasureSpec.getSize(measureSpec); + + if (specMode == MeasureSpec.EXACTLY) { + result = specSize; + } else { + if (view != null) { + result = view.getMeasuredHeight(); + } + if (specMode == MeasureSpec.AT_MOST) { + result = Math.min(result, specSize); + } + } + return result; + } +} From c02d1be6f6bec37b98e9ce0a5e384dc20a5d2351 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 25 Feb 2020 12:15:01 +0200 Subject: [PATCH 3/3] Fix formatting --- OsmAnd/res/layout/fragment_edit_poi.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/layout/fragment_edit_poi.xml b/OsmAnd/res/layout/fragment_edit_poi.xml index 4ffd4fbb3e..6a6cd6d9ad 100644 --- a/OsmAnd/res/layout/fragment_edit_poi.xml +++ b/OsmAnd/res/layout/fragment_edit_poi.xml @@ -48,8 +48,8 @@ android:importantForAutofill="noExcludeDescendants" android:layout_marginLeft="@dimen/settings_divider_margin_start" android:layout_marginRight="@dimen/content_padding" - android:layout_marginStart="@dimen/settings_divider_margin_start" - android:layout_marginEnd="@dimen/content_padding"> + android:layout_marginStart="@dimen/settings_divider_margin_start" + android:layout_marginEnd="@dimen/content_padding"> + android:layout_marginStart="24dp"> + android:drawableEnd="@drawable/ic_action_arrow_drop_down" /> @@ -152,7 +152,7 @@ android:visibility="gone" app:textAllCapsCompat="true" tools:visibility="visible" - android:layout_marginStart="@dimen/showAllButtonMarginRight" /> + android:layout_marginStart="@dimen/showAllButtonMarginRight" />