zoukankan      html  css  js  c++  java
  • 改变textView的个别字体颜色

     Spannable span = new SpannableString(getString(R.string.register_need_to_ageree));//例如:register_need_to_ageree是 注册即默认同意用户协议
            span.setSpan(new SpannedString(getString(R.string.register_need_to_ageree)), 7, 11, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
            span.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.theme_color_default)), 7, 11, Spannable
                    .SPAN_EXCLUSIVE_EXCLUSIVE);
            tvUserAgreement.setText(span);
    

      

  • 相关阅读:
    Ubuntu
    SSH
    Markdown
    Mac OS 上的一些骚操作
    Linux Bash
    JConsole
    IDEA
    Groovy
    Github
    Git
  • 原文地址:https://www.cnblogs.com/pppp2/p/5753492.html
Copyright © 2011-2022 走看看