Skip to content

Conversation

@babramovitch
Copy link

@babramovitch babramovitch commented Jun 14, 2019

Fixing two issues with setMaxLength if you call it after the view has been initialized. (e.g. after a button press)

When you call setMaxLength it now calls onSizeChanged to update all the values. In onSizeChanged the width and height is recorded for future use if setMaxLength is called.

1 - If number is larger than the initialized number, it would crash with an out of bounds exception. E.g 4 -> 5

2 - If the number is smaller than initialized number, the view would retain the width of the initial number, and the smaller entry dashes would be displayed starting from the left and then stopping mid way through the screen.

Fixing two issues with setMaxLength if you call it after the view has been initialized.

When you call setMaxLength it now calls onSizeChanged to update all the values.  In onSizeChanged the width and height is recorded for future use if setMaxLength is called.

1 - If number is larger than the initialized number, it will crash with an out of bounds exception.  E.g 4 -> 5

2 - If the number is smaller than initialized number, the view will retain the width of the initial number, and the smaller entry dashes will be displayed starting from the left and then stopping mid way through the screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant