-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to fix StaticLayout instantiate bug on some devices.
- Loading branch information
1 parent
c5defd1
commit 9ba4e6c
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This bug still here because, in some circonstances (for e.g. when rotate the device), the
getMeasuredWidth()
method returns 0; and then, the result of the subtraction is negative leading to thejava.lang.IllegalArgumentException: Layout: -36 < 0
If you enclose the
if (tempErrorText != null) ... else if (helperText != null)
with aif (getMeasuredWidth() > 0) ...
it will work.