We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
private void setTextWatcher() { mSalaryEditText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {} /** * khi nhập từng con số nhập lương, gọi vợ và đưa lương */ @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { try { if (!charSequence.toString().isEmpty()) { int salary = Integer.parseInt(charSequence.toString()); callWifeAndGiveSalary(salary); } else { callWifeAndGiveSalary(0); } } catch (NumberFormatException e) { mSalaryEditText.setError("Lương nhiều quá, vợ không dám nhận :v"); } @Override public void afterTextChanged(Editable editable) {} } }); }
2.2K Point(s)
1.2K Point(s)
313 Point(s)
178 Point(s)
138 Point(s)
Input your email to receive reset password link, or if you remember your password, you can click