2

I would like to have an EditText like that : enter image description here

With the currency (on the left or on the right, it depend of the local currency).

When the user edit the EditText, the "box" have to be only with the decimal (15), and after editing, It would be great to see "$15" or "15€".

I try a lot of way but to do that nothing is working.

1 Answers1

2

This code works fine!!

//metFirstName is a edittext variable name
     metFirstName.setOnFocusChangeListener(new View.OnFocusChangeListener()     {

        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            // TODO Auto-generated method stub
            if (!hasFocus) {
               metFirstName.setText(metFirstName.getText().toString()+"your special char");
                }
             }
    });
Rajakumar
  • 907
  • 1
  • 7
  • 17