diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index c644910373..409fe53919 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -399,7 +399,7 @@ dependencies { exclude group: 'com.android.support' } compile 'com.github.PhilJay:MPAndroidChart:v3.0.1' - compile ("com.github.HITGIF:TextFieldBoxes:1.3.4"){ + compile ("com.github.HITGIF:TextFieldBoxes:1.3.5"){ exclude group: 'com.android.support' } } diff --git a/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java b/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java index 6c87674b85..d2503239d9 100644 --- a/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java +++ b/OsmAnd/src/net/osmand/plus/widgets/OsmandTextFieldBoxes.java @@ -61,6 +61,7 @@ public class OsmandTextFieldBoxes extends TextFieldBoxes { if (!useOsmandKeyboard) { OsmandTextFieldBoxes.this.inputMethodManager.showSoftInput(OsmandTextFieldBoxes.this.editText, InputMethodManager.SHOW_IMPLICIT); } + performClick(); } @Override @@ -84,56 +85,7 @@ public class OsmandTextFieldBoxes extends TextFieldBoxes { this.activated = false; } - @Nullable - @Override - protected Parcelable onSaveInstanceState() { - Parcelable superState = super.onSaveInstanceState(); - SavedState savedState = new SavedState(superState); - if (editText != null) { - savedState.hasText = !editText.getText().toString().isEmpty(); - } - return savedState; - } - - @Override - protected void onRestoreInstanceState(Parcelable state) { - SavedState savedState = (SavedState) state; - super.onRestoreInstanceState(savedState.getSuperState()); - if (savedState.hasText) { - activate(true); - } - } - public ExtendedEditText getEditText() { return editText; } - - private static class SavedState extends BaseSavedState { - private boolean hasText; - - SavedState(Parcel source) { - super(source); - hasText = source.readByte() == 1; - } - - SavedState(Parcelable superState) { - super(superState); - } - - @Override - public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); - out.writeByte((byte) (hasText ? 1 : 0)); - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public SavedState createFromParcel(Parcel in) { - return new SavedState(in); - } - - public SavedState[] newArray(int size) { - return new SavedState[size]; - } - }; - } }