here is a function you can use to set the color of the line below the text
public void addUnderLineLink(TextView mTextView) { if (mTextView != null) { SpannableString content = new SpannableString(mTextView.getText().toString()); UnderlineSpan us=new UnderlineSpan(); TextPaint tp=new TextPaint(); tp.setColor(ContextCompat.getColor(getContext(),R.color.white)); us.updateDrawState(tp); content.setSpan(us, 0, mTextView.getText().toString().length(), 0); mTextView.setText(content); } }
source share