• 新报跑狗图/新报跑狗图唯一授权官网

  • 发布时间:2016-01-19 06:13 | 作者:yc | 来源:互联网 | 浏览:1200 次
  • 新报跑狗图/新报跑狗图唯一授权官网

    activity_main.xml的齐全代码:

    MainActivity.java里的齐全代码:

    import android.app.Activity;

    import android.os.Bundle;

    import android.text.method.HideReturnsTransformationMethod;

    import android.text.method.PasswordTransformationMethod;

    import android.widget.CheckBox;

    import android.widget.CompoundButton;

    import android.widget.CompoundButton.OnCheckedChangeListener;

    import android.widget.TextView;

    public class MainActivity extends Activity {

    private TextView editText1;

    private CheckBox checkBox1;

    @Override

    protected void onCreate(Bundle savedInstanceStawww.bodog881.comte) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);

    editText1 =(TextView) findViewById(R.id.editText1);

    checkBox1=(CheckBox) findViewById(R.id.checkBox1);

    checkBox1.setOnCheckedChangeListener(new OnCheckedChangeListener() {

    @Override

    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

    // TODO Auto-generated method stub

    if(isChecked){

    //要是选中,显现暗码

    editText1.setTransformationMethod(HideReturnsTransformationMethod.getInstance());

    }else{

    //不然躲藏暗码

    新报跑狗图/新报跑狗图唯一授权官网

    editText1.setTransformationMethod(PasswordTransformationMethod.getInsta黑彩平台nce());

    }

    }

    });

    }

    }

    关键是:

    editText1.setTransformationMethod(HideReturnsTransformationMethod.getInstance());

    editText1.setTransformationMethod(PasswordTransformationMethod.getInstance());

    感化如下:

    650) this.width=650;" src="http://img.blog.csdn.net/" alt="" />650) this.width=650;" src="http://img.blog.csdn.net/?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" />

    这篇文章出自 “没有水勒鱼” 博客,请必须保存此出处http://javaqun.blog.51cto.com//

  • 相关内容

友情链接: