Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-10-26 14:49:29 +01:00
commit 681cda712f
2 changed files with 16 additions and 8 deletions

View file

@ -47,7 +47,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/poi_dialog_name" android:hint="@string/poi_dialog_name"
android:imeOptions="actionSend" android:imeOptions="actionNext"
android:inputType="text" android:inputType="text"
tools:text="@string/lorem_ipsum"/> tools:text="@string/lorem_ipsum"/>

View file

@ -189,12 +189,11 @@ public class EditPoiDialogFragment extends DialogFragment {
Uri.parse("https://wiki.openstreetmap.org/wiki/Map_Features"))); Uri.parse("https://wiki.openstreetmap.org/wiki/Map_Features")));
} }
}); });
onlineDocumentationButton.setImageDrawable(
getMyApplication().getIconsCache() final int colorId = isLightTheme ? R.color.inactive_item_orange : R.color.dash_search_icon_dark;
.getPaintedContentIcon(R.drawable.ic_action_help, final int color = getResources().getColor(colorId);
getResources().getColor( onlineDocumentationButton.setImageDrawable(getMyApplication().getIconsCache()
isLightTheme ? R.color.inactive_item_orange .getPaintedContentIcon(R.drawable.ic_action_help, color));
: R.color.dash_search_icon_dark)));
final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton); final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
poiTypeButton.setOnClickListener(new View.OnClickListener() { poiTypeButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -268,6 +267,14 @@ public class EditPoiDialogFragment extends DialogFragment {
return view; return view;
} }
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
return dialog;
}
private void save() { private void save() {
if (TextUtils.isEmpty(poiTypeEditText.getText())) { if (TextUtils.isEmpty(poiTypeEditText.getText())) {
poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type)); poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type));
@ -355,7 +362,7 @@ public class EditPoiDialogFragment extends DialogFragment {
public static EditPoiDialogFragment createAddPoiInstance(double latitude, double longitude, public static EditPoiDialogFragment createAddPoiInstance(double latitude, double longitude,
OsmandApplication application) { OsmandApplication application) {
Node node = new Node(latitude, longitude, -1); Node node = new Node(latitude, longitude, -1);
Amenity amenity; Amenity amenity;
amenity = new Amenity(); amenity = new Amenity();
@ -600,6 +607,7 @@ public class EditPoiDialogFragment extends DialogFragment {
return handled; return handled;
} }
}; };
public interface OnFragmentActivatedListener { public interface OnFragmentActivatedListener {
void onFragmentActivated(); void onFragmentActivated();
} }