Add input constraints to Edit Text in Android?
问题 I have condition where it is required to enter some numeric values in the application. Cases: If user enters whole number then the max length should be 8 digits. Eg: 12345678 If users wants to enter decimal value he can only input upto 2 decimal points. Eg: 1.03, 123.95 If users enters whole 8 digits then he can also input the decimal places upto 2 decimal points. Eg: 12345678.12 So we have the following valid inputs: 1. 12345678 2. 123.45 3. 12345678.98 How can I achieve the above case