<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="2dp"
android:layout_marginLeft="10dp"
android:text="Don't worry we will never share this with anyone\nBy Clicking register you are indicating that you have read and agreed to the \n **Terms of services** and **Privacy Policy**"
android:textColor="@android:color/black"
android:textSize="8.5sp"
/>
From the above code I need to underline Terms of Services and Privacy Policy which are being highlighted bold.
I had tried using <u></u> but doesn’t worked.
Also I need to increase the font of Terms of Service, Privacy Policy only
Please do give some suggestions.
You need to define your text in
strings.xmlfile.Yes,you can define formatted html in it too.So you can try this out:
Then, in your code:
TextView foo = (TextView)findViewById(R.id.foo);foo.setText(Html.fromHtml(getString(R.string.nice_html)));Original answer.
This is the cleanest way to do it.Inshallah.