SpannableString sS = new SpannableString("本人已阅读并同意 用户协议");
ClickableSpan clickableSpan = new ClickableSpan() { @Override public void onClick(View widget) { String url = "/android_asset/HTML/Statement/index.html"; Bundle bundle = new Bundle(); bundle.putString("webPath", url); UI.showWeb(SignInctivity.this, bundle); } };
this.userAgreement = (TextView) findViewById(R.id.signIn_user_agreement); this.userAgreement.setText(sS); this.userAgreement.setMovementMethod(LinkMovementMethod.getInstance());// 捕捉链接
设置颜色是在主题里面:colorAccent颜色值
时间: 2024-10-15 02:02:07