Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This should make your TextView <strong>bold</strong>, <strong>underlined</strong> and <strong><em>italic</em></strong> at the same time.</p> <p><strong>strings.xml</strong></p> <pre><code>&lt;resources&gt; &lt;string name="register"&gt;&lt;u&gt;&lt;b&gt;&lt;i&gt;Copyright&lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&lt;/string&gt; &lt;/resources&gt; </code></pre> <p>To set this String to your TextView, do this in your <strong>main.xml</strong> </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/textview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/register" /&gt; </code></pre> <p>or In <strong>JAVA</strong>, </p> <pre><code>TextView textView = new TextView(this); textView.setText(R.string.register); </code></pre> <p>Sometimes the above approach will not be helpful when you might have to use Dynamic Text. So in that case <a href="http://developer.android.com/reference/android/text/SpannableString.html" rel="noreferrer">SpannableString</a> comes into action. </p> <pre><code>String tempString="Copyright"; TextView text=(TextView)findViewById(R.id.text); SpannableString spanString = new SpannableString(tempString); spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0); spanString.setSpan(new StyleSpan(Typeface.BOLD), 0, spanString.length(), 0); spanString.setSpan(new StyleSpan(Typeface.ITALIC), 0, spanString.length(), 0); text.setText(spanString); </code></pre> <p><strong>OUTPUT</strong></p> <p><img src="https://i.stack.imgur.com/07SZg.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload