fix opening keyboard after cancel button and make options selectable
This commit is contained in:
parent
1163bb9816
commit
011af9cb5c
2 changed files with 5 additions and 5 deletions
|
@ -1044,6 +1044,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
if (selectedWpt == wpt) {
|
if (selectedWpt == wpt) {
|
||||||
dismissEditingMode();
|
dismissEditingMode();
|
||||||
clearInputs();
|
clearInputs();
|
||||||
|
showKeyboard();
|
||||||
}
|
}
|
||||||
adapter.removeItem(position);
|
adapter.removeItem(position);
|
||||||
hasUnsavedChanges = true;
|
hasUnsavedChanges = true;
|
||||||
|
@ -1325,9 +1326,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
et.setText("");
|
et.setText("");
|
||||||
et.clearFocus();
|
et.clearFocus();
|
||||||
}
|
}
|
||||||
if (editTexts.size() > 0) {
|
|
||||||
showKeyboard();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getActiveIcon(@DrawableRes int resId) {
|
private Drawable getActiveIcon(@DrawableRes int resId) {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.GPXUtilities;
|
import net.osmand.plus.GPXUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
@ -68,13 +69,14 @@ public class CoordinateInputAdapter extends RecyclerView.Adapter<MapMarkerItemVi
|
||||||
holder.mainLayout.setBackgroundColor(getResolvedColor(nightTheme ? R.color.ctx_menu_bg_dark : R.color.bg_color_light));
|
holder.mainLayout.setBackgroundColor(getResolvedColor(nightTheme ? R.color.ctx_menu_bg_dark : R.color.bg_color_light));
|
||||||
holder.title.setTextColor(getResolvedColor(nightTheme ? R.color.ctx_menu_title_color_dark : R.color.color_black));
|
holder.title.setTextColor(getResolvedColor(nightTheme ? R.color.ctx_menu_title_color_dark : R.color.color_black));
|
||||||
holder.divider.setBackgroundColor(getResolvedColor(nightTheme ? R.color.route_info_divider_dark : R.color.dashboard_divider_light));
|
holder.divider.setBackgroundColor(getResolvedColor(nightTheme ? R.color.route_info_divider_dark : R.color.dashboard_divider_light));
|
||||||
holder.optionsBtn.setImageDrawable(getColoredIcon(R.drawable.ic_overflow_menu_white, R.color.icon_color));
|
|
||||||
holder.optionsBtn.setBackgroundColor(ContextCompat.getColor(app, nightTheme ? R.color.ctx_menu_bg_dark : R.color.bg_color_light));
|
|
||||||
holder.iconReorder.setVisibility(View.GONE);
|
holder.iconReorder.setVisibility(View.GONE);
|
||||||
holder.numberText.setVisibility(View.VISIBLE);
|
holder.numberText.setVisibility(View.VISIBLE);
|
||||||
holder.numberText.setText(String.valueOf(position + 1));
|
holder.numberText.setText(String.valueOf(position + 1));
|
||||||
holder.description.setVisibility(View.GONE);
|
holder.description.setVisibility(View.GONE);
|
||||||
|
holder.optionsBtn.setFocusable(false);
|
||||||
|
holder.optionsBtn.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
holder.optionsBtn.setOnClickListener(actionsListener);
|
holder.optionsBtn.setOnClickListener(actionsListener);
|
||||||
|
AndroidUtils.setDashButtonBackground(app, holder.optionsBtn, nightTheme);
|
||||||
|
|
||||||
boolean singleItem = getItemCount() == 1;
|
boolean singleItem = getItemCount() == 1;
|
||||||
boolean fistItem = position == 0;
|
boolean fistItem = position == 0;
|
||||||
|
|
Loading…
Reference in a new issue