klinker24 / Android-TextView-LinkBuilder

Insanely easy way to define clickable links within a TextView.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有没有设置背景色的方法,如果没有,楼主是否方便加下

900326 opened this issue · comments

Is there any way to set the background color? If not, is it convenient for you to add it?

Yes, setting the text color is discussed in the readme:

Link link = new Link("click here")
    .setTextColor(Color.parseColor("#259B24"))
    .setTextColorOfHighlightedLink(Color.parseColor("#0D3D0C"))
    .setHighlightAlpha(.4f)

You can also set the default color through your theme, which also has an example in the readme.