Code example for EditText

Methods: setTransformationMethod

0
        public void onCheckedChanged( final CompoundButton buttonView, final boolean isChecked ) { 
          if ( isChecked ) {
            pass.setTransformationMethod(SingleLineTransformationMethod.getInstance());
          } 
          else { 
            pass.setTransformationMethod(PasswordTransformationMethod.getInstance());
          } 
        } 
      }); 
       
      pass.setText( prefs.getString( ListActivity.PREF_PASSWORD, "" ) );
      pass.addTextChangedListener( new SetWatcher() {
        public void onTextChanged( final String s ) {
          // ListActivity.debug("pass: " + s); 
          editor.putString( ListActivity.PREF_PASSWORD, s.trim() );
          editor.commit();
        }  
      }); 
       
      final Button button = (Button) findViewById( R.id.speech_button );
      button.setOnClickListener( new OnClickListener() {