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. (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.