예제 #1
0
파일: Switch.java 프로젝트: 30962088/c11_as
 private Layout makeLayout(CharSequence text) {
   final CharSequence transformed =
       (mSwitchTransformationMethod != null)
           ? mSwitchTransformationMethod.getTransformation(text, this)
           : text;
   return new StaticLayout(
       transformed,
       mTextPaint,
       (int) FloatMath.ceil(Layout.getDesiredWidth(transformed, mTextPaint)),
       Layout.Alignment.ALIGN_NORMAL,
       1.f,
       0,
       true);
 }