title: how to get the bitmap from cusom imageview class?
body: <p>i want the get the whole bimap map of custom class... i getting the null...i try to every way i don't getting the write answer..</p>
  
  <p><code>Bitmap b = mBoardTile.getDrawing();</code> i used it but get the null value..</p>
  
  <p>i m also used view cache like..</p>
  
  <pre><code>      Bitmap b = null;
      try {
          mBoardTile.setDrawingCacheEnabled(true);
          mBoardTile.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
          mBoardTile.layout(0, 0, mBoardTile.getMeasuredWidth(), mBoardTile.getMeasuredHeight());
          mBoardTile.buildDrawingCache(true);
          b = mBoardTile.getDrawingCache();
      } catch (Exception e) {
          e.printStackTrace();
      }`
  </code></pre>
  
  <p>but again get the null value..</p>
  
  <p>the custom class is below..</p>
  
  <pre><code>public class BoardTile extends ImageView {
   Context mContext;
   int posx, posy;
   ArrayList&lt;Datavo&gt; mArrayListDta;
  
  float width, height, newx, newy;
  ArrayList&lt;Datavo&gt; mArrayListNew;
  
  public BoardTile(Context context) {
      super(context);
      this.mContext = context;
      mArrayListNew = new ArrayList&lt;Datavo&gt;();
  }
  
  @Override
  protected void onDraw(Canvas canvas) {
      for (int i = 0; i &lt; mArrayListNew.size(); i++) {
          Datavo mDatavo = mArrayListNew.get(i);
  
                  Bitmap mOriginalBitmap = mDatavo.getmBitmap();
                  // Scale to target size
                  mOriginalBitmap = Bitmap.createScaledBitmap(mOriginalBitmap, mDatavo.getWidth_new(), mDatavo.getHeight_new()/2, true);
  
     //                   Canvas mCanvas = new Canvas(mOriginalBitmap);
                  canvas.drawBitmap(mOriginalBitmap, 0, 0, null);
      }
  
  }
  
  public void getData(ArrayList&lt;Datavo&gt; mArrayList) {
  
      this.mArrayListDta = mArrayList;
      for (int i = 0; i &lt; mArrayListDta.size(); i++) {
  
          newx = 480 * mArrayListDta.get(i).getxCordi() / mArrayListDta.get(i).getWidth();
          newy = 800 * mArrayListDta.get(i).getyCordi() / mArrayListDta.get(i).getHeight();
  
          width = newx * mArrayListDta.get(i).getWidth() / mArrayListDta.get(i).getxCordi();
          height = newy * mArrayListDta.get(i).getHeight() / mArrayListDta.get(i).getyCordi();
  
          Datavo mDatavo = new Datavo();
          mDatavo.setxCordi_new((int) newx);
          mDatavo.setyCordi_new((int) newy);
          mDatavo.setWidth_new((int) width);
          mDatavo.setHeight_new((int) height);
          mDatavo.setmBitmap(mArrayListDta.get(i).getmBitmap());
          mArrayListNew.add(mDatavo);
  
      }
  }
  }
  </code></pre>