title: Getting imageview size for Bitmap creation
body: <p>I am a programmer with a Windows background and I am new to Java and Android stuff.</p>
  <p>I want to create a widget (not an app) which displays a chart. After a long research I know I can do this with Canvas, imageviews and Bitmaps. The canvas which I paint on should be the same as the Widget Size.</p>
  <p>How do I know the widget size (or imageview size) so that I can supply it to the function?</p>
  <pre><code>Bitmap.createBitmap(width_xx, height_yy, Config.ARGB_8888);
  </code></pre>
  <p>Code Snippet:</p>
  <p>In the timer run method:</p>
  <pre><code>@Override
  public void run() {
      Bitmap bitmap = Bitmap.createBitmap(??, ??, Config.ARGB_8888);
      Canvas canvas = new Canvas(bitmap);
  
      // Create a new paint
      Paint p = new Paint();
      p.setAntiAlias(true);
      p.setStrokeWidth(1);
  
      // Draw circle
      // Here I can use the width and height to scale the circle
      canvas.drawCircle(50, 50, 7, p);
      remoteViews.setImageViewBitmap(R.id.imageView, bitmap);
  </code></pre>