spannable on android for textView

前端 未结 3 425
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 04:33
Tweet o = tweets.get(position);

TextView tt = (TextView) v.findViewById(R.id.toptext);
//TextView bt = (TextView) v.findViewById(R.id.bottomtext);         

EditTex         


        
3条回答
  •  渐次进展
    2020-11-30 05:02

    The easy way to create a spannable text bold and italic to set into your TextView is using the method Html.fromHtml():

    and using the html elements and

    myTextView.setText(Html.fromHtml("my text bold and italic!"));
    

    or the html elements and

       myTextView.setText(Html.fromHtml("my text bold and italic!"));
    

提交回复
热议问题