title: Why does android ImageSpan show my picture twice (when setBounds exceed certain magic width)?
body: <p>Here is my code to put an ImageSpan in an EditText.</p>
  
  <pre><code>public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
      EditText et = (EditText) getActivity().findViewById(R.id.html_text);
  
      SpannableString ss = new SpannableString("ABC");
      Drawable d = getResources().getDrawable(R.drawable.ic_launcher);
  
      d.setBounds(0,0,2256,760);
  
      ImageSpan span = new ImageSpan(d, "haha", ImageSpan.ALIGN_BASELINE);
      ss.setSpan(span, 0, 3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
      et.setText(ss);
  }
  </code></pre>
  
  <p>While playing around, I noticed something strange.  My AVD is 2560x1600.  When the setBounds call with width less or equal to 2256, the picture is showing correctly.  But for width larger than 2256, the picture is shown twice.!  The magic value is the same for different pictures.  I also tried AVD with different size.  For 720x1080, the magic width is 608.  What is this magic width?  How can I make sure my picture doesn't exceed this magic width?</p>
  
  <p>BTW, here is the layout for the EditText:</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/html_text"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  </code></pre>