title: How to convert SpannedString to Spannable
body: <p>Hello I have set some text in a textview.</p>
  
  <pre><code>TextView tweet = (TextView) vi.findViewById(R.id.text);
  tweet.setText(Html.fromHtml(sb.toString()));
  </code></pre>
  
  <p>Then I need to convert the text of the <code>TextView</code> into <code>Spannble</code>. So I did this like:</p>
  
  <pre><code>Spannable s = (Spannable) tweet.getText();
  </code></pre>
  
  <p>I need to convert it <code>Spannable</code> because I passed the <code>TextView</code> into a function:</p>
  
  <pre><code>    private void stripUnderlines(TextView textView) {
              Spannable s = (Spannable) textView.getText();
              URLSpan[] spans = s.getSpans(0, s.length(), URLSpan.class);
              for (URLSpan span : spans) {
                  int start = s.getSpanStart(span);
                  int end = s.getSpanEnd(span);
                  s.removeSpan(span);
                  span = new URLSpanNoUnderline(span.getURL());
                  s.setSpan(span, start, end, 0);
              }
              textView.setText(s);
          }
  
  private class URLSpanNoUnderline extends URLSpan {
          public URLSpanNoUnderline(String url) {
              super(url);
          }
  
          @Override
          public void updateDrawState(TextPaint ds) {
              super.updateDrawState(ds);
              ds.setUnderlineText(false);
          }
      }
  </code></pre>
  
  <p>This shows no error/warning. But throwing a Runtime Error:</p>
  
  <pre><code>java.lang.ClassCastException: android.text.SpannedString cannot be cast to android.text.Spannable
  </code></pre>
  
  <p>How can I convert the SpannedStringt/text of the textview into Spannble? Or can I do the same task with SpannedString inside the function?</p>