66import android .graphics .Paint ;
77import android .graphics .Rect ;
88import android .graphics .drawable .Drawable ;
9- import android .text .Layout ;
109import android .text .StaticLayout ;
1110import android .text .TextPaint ;
1211import android .util .DisplayMetrics ;
3029@ SuppressWarnings ("JavaDoc" )
3130public abstract class Utils {
3231
33- private static DisplayMetrics mMetrics ;
3432 public static int minimumFlingVelocity = 50 ;
3533 public static int maximumFlingVelocity = 8000 ;
3634 public final static double DEG2RAD = (Math .PI / 180.0 );
@@ -50,8 +48,6 @@ public static void init(@NonNull Context context) {
5048 ViewConfiguration viewConfiguration = ViewConfiguration .get (context );
5149 minimumFlingVelocity = viewConfiguration .getScaledMinimumFlingVelocity ();
5250 maximumFlingVelocity = viewConfiguration .getScaledMaximumFlingVelocity ();
53-
54- mMetrics = context .getResources ().getDisplayMetrics ();
5551 }
5652
5753 /**
@@ -408,22 +404,6 @@ public static void drawMultilineText(Canvas canvas, StaticLayout textLayout,
408404 paint .setTextAlign (originalTextAlign );
409405 }
410406
411- public static void drawMultilineText (Canvas c , String text ,
412- float x , float y ,
413- TextPaint paint ,
414- FSize constrainedToSize ,
415- MPPointF anchor , float angleDegrees ) {
416-
417- StaticLayout textLayout = new StaticLayout (
418- text , 0 , text .length (),
419- paint ,
420- (int ) Math .max (Math .ceil (constrainedToSize .width ), 1.f ),
421- Layout .Alignment .ALIGN_NORMAL , 1.f , 0.f , false );
422-
423-
424- drawMultilineText (c , textLayout , x , y , paint , anchor , angleDegrees );
425- }
426-
427407 /**
428408 * Returns a recyclable FSize instance.
429409 * Represents size of a rotated rectangle by degrees.
0 commit comments