Merge branch 'master' of ssh://github.com/osmandapp/Osmand
This commit is contained in:
commit
345b977996
2 changed files with 10 additions and 5 deletions
|
@ -234,6 +234,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.mapcontextmenu.editors;
|
|||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
@ -27,6 +28,7 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.BaseOsmAndFragment;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.widgets.AutoCompleteTextViewEx;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
|
@ -42,6 +44,7 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
|||
Bundle savedInstanceState) {
|
||||
|
||||
view = inflater.inflate(R.layout.point_editor_fragment, container, false);
|
||||
AndroidUtils.addStatusBarPadding21v(getActivity(), view);
|
||||
|
||||
getEditor().updateLandscapePortrait();
|
||||
getEditor().updateNightMode();
|
||||
|
@ -140,6 +143,12 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
|||
ScrollView scrollView = (ScrollView) view.findViewById(R.id.editor_scroll_view);
|
||||
scrollView.scrollTo(0, bottom);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 21 && AndroidUiHelper.isOrientationPortrait(getActivity())) {
|
||||
Rect rect = new Rect();
|
||||
getActivity().getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||
int heightDiff = getResources().getDisplayMetrics().heightPixels - rect.bottom;
|
||||
view.findViewById(R.id.buttons_container).setPadding(0, 0, 0, heightDiff);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -219,11 +228,6 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
|||
return R.color.status_bar_light;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isFullScreenAllowed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void hideKeyboard() {
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
if (inputMethodManager != null) {
|
||||
|
|
Loading…
Reference in a new issue