@@ -255,7 +255,7 @@ private void inflateAchievements( Achievements achievements ){
255
255
levelNumber .setText (levelUpInfoString );
256
256
Drawable drawable = getResources ().getDrawable (R .drawable .badge );
257
257
Bitmap bitmap = drawableToBitmap (drawable );
258
- BitmapDrawable bitmapImage = writeOnDrawable (bitmap , levelUpInfoString );
258
+ BitmapDrawable bitmapImage = writeOnDrawable (bitmap , Integer . toString ( levelInfo . getLevel ()) );
259
259
imageView .setImageDrawable (bitmapImage );
260
260
}
261
261
@@ -318,11 +318,11 @@ public BitmapDrawable writeOnDrawable(Bitmap bm, String text){
318
318
Paint paint = new Paint (Paint .ANTI_ALIAS_FLAG );
319
319
paint .setStyle (Paint .Style .FILL );
320
320
paint .setColor (Color .WHITE );
321
- paint .setTextSize (300 );
321
+ paint .setTextSize (Math . round ( canvas . getHeight ()/ 2 ) );
322
322
paint .setTextAlign (Paint .Align .CENTER );
323
323
Rect rectText = new Rect ();
324
324
paint .getTextBounds (text ,0 , text .length (),rectText );
325
- canvas .drawText (text , Math .round (canvas .getWidth ()/2 ),Math .round (canvas .getHeight ()/1.75 ), paint );
325
+ canvas .drawText (text , Math .round (canvas .getWidth ()/2 ),Math .round (canvas .getHeight ()/1.35 ), paint );
326
326
return new BitmapDrawable (getResources (), bitmap );
327
327
}
328
328
0 commit comments