May i know how to input numeric values that starts only 8 or 9 because this edit text is for user to input their handphone numbers.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll have to use a TextWatcher to read each character that is typed in to your EditText and determine if it is valid.
So in your case just make a if statement that checks to see if the EditText is empty (and thus what they are entering will be the first character) then check to see if they entered an 8 or a 9, if so put it into the EditText, if not discard it and maybe give them a note saying that they must enter 8 or 9