Merge pull request #41364 from m4gr3d/fix_textedit_movement_bug_3_2

Fix issue causing the textedit to move upward
This commit is contained in:
Rémi Verschelde 2020-08-21 02:25:25 +02:00 committed by GitHub
commit 2a692f41a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="text_edit_height">48dp</dimen>
</resources>

View file

@ -160,8 +160,7 @@ public abstract class Godot extends FragmentActivity implements SensorEventListe
private void setButtonPausedState(boolean paused) {
mStatePaused = paused;
int stringResourceID = paused ? R.string.text_button_resume :
R.string.text_button_pause;
int stringResourceID = paused ? R.string.text_button_resume : R.string.text_button_pause;
mPauseButton.setText(stringResourceID);
}
@ -318,7 +317,8 @@ public abstract class Godot extends FragmentActivity implements SensorEventListe
// GodotEditText layout
GodotEditText edittext = new GodotEditText(this);
edittext.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
edittext.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT,
(int)getResources().getDimension(R.dimen.text_edit_height)));
// ...add to FrameLayout
layout.addView(edittext);