How to determine the TextView width in a Widget?
<p>When I looked solutions:</p>

<p><a href="http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget">How to use a custom typeface in a widget</a> </p>

<p><strong>In the above problem, I use a custom font in a Widget;
The use of solution:</strong></p>

<pre><code>public Bitmap buildUpdate(String time) 
  {
    Bitmap myBitmap = Bitmap.createBitmap(160, 84, Bitmap.Config.ARGB_4444);
    Canvas myCanvas = new Canvas(myBitmap);
    Paint paint = new Paint();
    Typeface clock = Typeface.createFromAsset(this.getAssets(),"Clockopia.ttf");
    paint.setAntiAlias(true);
    paint.setSubpixelText(true);
    paint.setTypeface(clock);
    paint.setStyle(Paint.Style.FILL);
    paint.setColor(Color.WHITE);
    paint.setTextSize(65);
    paint.setTextAlign(Align.CENTER);
    myCanvas.drawText(time, 80, 60, paint);
    return myBitmap;
  }
</code></pre>

<p><strong>Question：How to determine the width and height of the bitmap generated according to the number of characters?</strong></p>
