Poi editing screen edit text scroll.
This commit is contained in:
parent
b6b6472691
commit
502bbf046c
4 changed files with 113 additions and 91 deletions
|
@ -2,11 +2,15 @@
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:theme="?attr/new_app_theme">
|
android:theme="?attr/new_app_theme">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -109,10 +113,11 @@
|
||||||
android:text="@string/add_tag"
|
android:text="@string/add_tag"
|
||||||
android:textSize="@dimen/default_sub_text_size"
|
android:textSize="@dimen/default_sub_text_size"
|
||||||
osmand:typeface="@string/font_roboto_medium"/>
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
</LinearLayout>
|
||||||
<!--XXX due to bug in NestedScroolView-->
|
<!--XXX due to bug in NestedScroolView-->
|
||||||
<Space
|
<Space
|
||||||
|
android:id="@+id/screenFiller"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="500dp"/>
|
android:layout_height="match_parent"/>
|
||||||
</LinearLayout>
|
</FrameLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -126,8 +126,9 @@
|
||||||
|
|
||||||
<!--XXX due to bug in NestedScrollView-->
|
<!--XXX due to bug in NestedScrollView-->
|
||||||
<Space
|
<Space
|
||||||
|
android:id="@+id/screenFiller"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="500dp"
|
android:layout_height="match_parent"
|
||||||
tools:visibility="gone"/>
|
tools:visibility="visible"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Point;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
@ -9,6 +10,7 @@ import android.support.v4.app.Fragment;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.view.Display;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -54,6 +56,12 @@ public class AdvancedDataFragment extends Fragment {
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
final View view = inflater.inflate(R.layout.fragment_edit_poi_advanced, container, false);
|
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()
|
deleteDrawable = ((OsmandApplication) getActivity().getApplication()).getIconsCache()
|
||||||
.getPaintedContentIcon(R.drawable.ic_action_remove_dark,
|
.getPaintedContentIcon(R.drawable.ic_action_remove_dark,
|
||||||
getActivity().getResources().getColor(R.color.dash_search_icon_dark));
|
getActivity().getResources().getColor(R.color.dash_search_icon_dark));
|
||||||
|
@ -205,7 +213,7 @@ public class AdvancedDataFragment extends Fragment {
|
||||||
editPoiData.notifyDatasetChanged(mTagsChangedListener);
|
editPoiData.notifyDatasetChanged(mTagsChangedListener);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
final Set<String> tagKeys = new TreeSet<String>();
|
final Set<String> tagKeys = new TreeSet<>();
|
||||||
for (OSMSettings.OSMTagKey t : OSMSettings.OSMTagKey.values()) {
|
for (OSMSettings.OSMTagKey t : OSMSettings.OSMTagKey.values()) {
|
||||||
if ((t != OSMSettings.OSMTagKey.NAME) && (t != OSMSettings.OSMTagKey.OPENING_HOURS) && (t != OSMSettings.OSMTagKey.PHONE)
|
if ((t != OSMSettings.OSMTagKey.NAME) && (t != OSMSettings.OSMTagKey.OPENING_HOURS) && (t != OSMSettings.OSMTagKey.PHONE)
|
||||||
&& (t != OSMSettings.OSMTagKey.WEBSITE)) {
|
&& (t != OSMSettings.OSMTagKey.WEBSITE)) {
|
||||||
|
@ -213,7 +221,7 @@ public class AdvancedDataFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(linearLayout.getContext(),
|
ArrayAdapter<Object> adapter = new ArrayAdapter<>(linearLayout.getContext(),
|
||||||
R.layout.list_textview, tagKeys.toArray());
|
R.layout.list_textview, tagKeys.toArray());
|
||||||
tagEditText.setAdapter(adapter);
|
tagEditText.setAdapter(adapter);
|
||||||
tagEditText.setThreshold(1);
|
tagEditText.setThreshold(1);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.osmand.plus.osmedit;
|
package net.osmand.plus.osmedit;
|
||||||
|
|
||||||
|
import android.graphics.Point;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
@ -7,6 +8,7 @@ import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.view.Display;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -54,6 +56,12 @@ public class BasicDataFragment extends Fragment {
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.fragment_edit_poi_normal, container, false);
|
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();
|
IconsCache iconsCache = getMyApplication().getIconsCache();
|
||||||
int iconColor = getResources().getColor(R.color.dash_search_icon_dark);
|
int iconColor = getResources().getColor(R.color.dash_search_icon_dark);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue