New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-23757] Android: Fix TextField keyboard overlap #8922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight compile errors to fix and some other suggestions but on the whole great job! 👍
@@ -433,6 +436,18 @@ protected KrollDict getFocusEventObject(boolean hasFocus) | |||
@Override | |||
public boolean onEditorAction(TextView v, int actionId, KeyEvent keyEvent) | |||
{ | |||
// TIMOB-23757: https://code.google.com/p/android/issues/detail?id=182191 | |||
if (Build.VERSION.SDK_INT < 24 && (getGravity() & Gravity.LEFT) != Gravity.LEFT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change from getGravity()
to v.getGravity()
?
|
||
import android.content.Context; | ||
import android.os.Build; | ||
import android.util.AttributeSet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add import android.view.Gravity
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change spaces to tabs?
} | ||
Context context = TiApplication.getInstance().getApplicationContext(); | ||
InputMethodManager inputManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); | ||
inputManager.hideSoftInputFromWindow(tv.getWindowToken(), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change 0
to InputMethodManager.RESULT_UNCHANGED_SHOWN
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hideSoftInputFromWindow 0
is used for the flags. I'm not using the ResultReceiver
.
@garymathews After testing this I am still seeing the problem on a Nexus 6 Device running Android 6.0.1. Steps taken:
Environment |
2140339
to
31ceae2
Compare
@ssjsamir Updated PR |
FR - Passed, Test steps
Environment |
TEST CASE
JIRA Ticket