Skip to content

Commit

Permalink
Merge pull request #1808 from t-arn/multilinetextinput_gravity_fix_An…
Browse files Browse the repository at this point in the history
…droid_4f6f7ab

Fix text alignment for MultilineTextInput on Android
  • Loading branch information
freakboy3742 authored Apr 7, 2023
2 parents 85eb59c + 674710b commit 7f40400
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions android/src/toga_android/widgets/multilinetextinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ def set_placeholder(self, value):
self.native.setHint(value if value is not None else "")

def set_alignment(self, value):
# Refuse to set alignment unless widget has been added to a container.
# This is because Android EditText requires LayoutParams before
# setGravity() can be called.
if not self.native.getLayoutParams():
return
self.native.setGravity(Gravity.TOP | align(value))

def set_value(self, value):
Expand Down
1 change: 1 addition & 0 deletions changes/1808.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The text alignment of MultilineTextInput on Android has been fixed to be TOP aligned.

0 comments on commit 7f40400

Please sign in to comment.