This commit is contained in:
GaidamakUA 2015-10-26 15:48:48 +02:00
parent 9b53d80f3e
commit 53de9f47fe
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));
@ -600,6 +607,7 @@ public class EditPoiDialogFragment extends DialogFragment {
return handled; return handled;
} }
}; };
public interface OnFragmentActivatedListener { public interface OnFragmentActivatedListener {
void onFragmentActivated(); void onFragmentActivated();
} }