title: Cannot set text to TextView in PopupWindow
body: <p>I created a popup window to show a disclaimer in my app but I can't figure out why i cannot set text to TextView. It is an HTML string so I did this:</p>
  
  <pre><code>private void showPopup(final Activity context) {
      final PopupWindow pwindo;
      Button btnClosePopup;
  
      try {
          LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View layout = inflater.inflate(R.layout.popup_layout, (ViewGroup) findViewById(R.id.popup_element));
          pwindo = new PopupWindow(layout, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true);
          pwindo.showAtLocation(layout, Gravity.CENTER, 0, 0);
  
          TextView txt = (TextView)findViewById(R.id.txtView);
          txt.setText(Html.fromHtml(getString(R.string.tos_text)));
  
          btnClosePopup = (Button) layout.findViewById(R.id.btn_close_popup);
          btnClosePopup.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {
                  pwindo.dismiss();
              }
          });
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p><strong>popup_layout.xml</strong></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/popup_element"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#4d4d4d"
      android:orientation="vertical"
      android:padding="10sp" &gt;
  
      &lt;TextView
          android:id="@+id/txtView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="5sp"
          android:textColor="#ffffff" /&gt;
  
      &lt;Button
          android:id="@+id/btn_close_popup"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="Close" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>strings.xml</strong></p>
  
  <pre><code>&lt;string name="tos_text"&gt;&lt;![CDATA[
      &lt;p&gt;This is a html-formatted string with &lt;b&gt;bold&lt;/b&gt; and &lt;i&gt;italic&lt;/i&gt; text&lt;/p&gt;
      &lt;p&gt;This is another paragraph of the same string.&lt;/p&gt;
      ]]&gt;
  &lt;/string&gt;
  </code></pre>
  
  <p>It works only if I add <code>android:text="@string/tos_text"</code> in the XML file, but i see the raw html codes. What could be the problem?</p>