diff --git a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml index f58e76031b..4276b9e95d 100644 --- a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml +++ b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml @@ -2,117 +2,122 @@ - + android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:layout_marginLeft="14dp" + android:layout_marginRight="14dp" + android:layout_marginTop="14dp" + android:background="?attr/bg_card" + android:orientation="vertical"> - + + + + + + + + - - + android:layout_height="37dp" + android:gravity="center"> - + + + + + + + + android:layout_height="wrap_content" + android:orientation="vertical" + android:saveEnabled="false"/> - - - - - - + - - - - - - + android:layout_height="match_parent"/> + diff --git a/OsmAnd/res/layout/fragment_edit_poi_normal.xml b/OsmAnd/res/layout/fragment_edit_poi_normal.xml index 267fd0aabe..229002a227 100644 --- a/OsmAnd/res/layout/fragment_edit_poi_normal.xml +++ b/OsmAnd/res/layout/fragment_edit_poi_normal.xml @@ -4,7 +4,7 @@ xmlns:osmand="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> + android:layout_height="match_parent" + tools:visibility="visible"/> \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java index ebd221ed7f..93852a08cf 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedDataFragment.java @@ -2,6 +2,7 @@ package net.osmand.plus.osmedit; import android.app.Dialog; import android.content.DialogInterface; +import android.graphics.Point; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; @@ -9,6 +10,7 @@ import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.text.Editable; import android.text.TextWatcher; +import android.view.Display; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -54,6 +56,12 @@ public class AdvancedDataFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_edit_poi_advanced, container, false); + Display display = getActivity().getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + int height = size.y; + view.findViewById(R.id.screenFiller).setMinimumHeight(height); + deleteDrawable = ((OsmandApplication) getActivity().getApplication()).getIconsCache() .getPaintedContentIcon(R.drawable.ic_action_remove_dark, getActivity().getResources().getColor(R.color.dash_search_icon_dark)); @@ -205,7 +213,7 @@ public class AdvancedDataFragment extends Fragment { editPoiData.notifyDatasetChanged(mTagsChangedListener); } }); - final Set tagKeys = new TreeSet(); + final Set tagKeys = new TreeSet<>(); for (OSMSettings.OSMTagKey t : OSMSettings.OSMTagKey.values()) { if ((t != OSMSettings.OSMTagKey.NAME) && (t != OSMSettings.OSMTagKey.OPENING_HOURS) && (t != OSMSettings.OSMTagKey.PHONE) && (t != OSMSettings.OSMTagKey.WEBSITE)) { @@ -213,7 +221,7 @@ public class AdvancedDataFragment extends Fragment { } } - ArrayAdapter adapter = new ArrayAdapter(linearLayout.getContext(), + ArrayAdapter adapter = new ArrayAdapter<>(linearLayout.getContext(), R.layout.list_textview, tagKeys.toArray()); tagEditText.setAdapter(adapter); tagEditText.setThreshold(1); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java index 520e6cce97..f9a9212d56 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/BasicDataFragment.java @@ -1,5 +1,6 @@ package net.osmand.plus.osmedit; +import android.graphics.Point; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; @@ -7,6 +8,7 @@ import android.support.v4.app.Fragment; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; +import android.view.Display; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -54,6 +56,12 @@ public class BasicDataFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_edit_poi_normal, container, false); + Display display = getActivity().getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + int height = size.y; + view.findViewById(R.id.screenFiller).setMinimumHeight(height); + IconsCache iconsCache = getMyApplication().getIconsCache(); int iconColor = getResources().getColor(R.color.dash_search_icon_dark);