title: Android bold text in String-Array
body: <p>I need to bold some text in a String Array, where each item is being used in a ViewPager. I am using <code>getTextArray()</code> to grab the formatted text from the xml file, and cannot cast that into a <code>String</code> to be able to be used in the ViewPager.</p>
  
  <p>This is what I recently tried, but it stripped the formatting:</p>
  
  <pre><code>CharSequence[] arr = getResources().getTextArray(R.array.array);
  
  String[] arrString = new String[arr.length];
  int i=0;
  for(CharSequence ch: arr){
      arrString[i++] = ch.toString(); 
  }
  
  for (String s : arrString) {
      mArrayList.add(s);
  
  }
  </code></pre>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;string-array name="array"&gt;
          &lt;item&gt;&lt;b&gt;bold text&lt;/b&gt;|&lt;i&gt;italic text&lt;/i&gt;&lt;/item&gt;
          &lt;item&gt;Second Item&lt;/item&gt;
          &lt;item&gt;Thrid Item&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>ViewPager if relevant</strong></p>
  
  <pre><code>ViewPager mViewPager;
  ArrayList&lt;String&gt; mArrayList = new ArrayList&lt;String&gt;();
  mViewPager = (ViewPager) findViewById(R.id.pager);
  MyAdapter mAdapter = new MyAdapter(context, mArrayList);
  mViewPager.setAdapter(mAdapter);
  </code></pre>
  
  <p>I appreciate any advice, thanks</p>