Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- if(v == et_electricite_€){
- if(et_electricite_€.length()>=1){
- if (keyCode >= 7 && keyCode <= 16 ) {
- et_electricite.setText(String.valueOf(new BigDecimal(Double.parseDouble(et_electricite_€.getText().toString())/tarif).setScale(0, RoundingMode.HALF_UP).intValue()));
- return true;
- }
- }
- }
- return false;
- }
Add Comment
Please, Sign In to add comment