Code example for EditText

Methods: setInputTypesetTransformationMethod

0
            if ( isChecked ) {
              password.setInputType( InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD );
              password.setTransformationMethod( null );
            } 
            else { 
              password.setInputType( InputType.TYPE_TEXT_VARIATION_PASSWORD );
              password.setTransformationMethod(
                android.text.method.PasswordTransformationMethod.getInstance() ); 
            } 
          } 
        }); 
         
        ok.setOnClickListener( new OnClickListener() {
            public void onClick( final View buttonView ) {  
              try { 
                connectToNetwork( password.getText().toString() );
                dialog.dismiss();
              } 
              catch ( Exception ex ) {
                // guess it wasn't there anyways 
                ListActivity.info( "exception dismissing crypto dialog: " + ex );