@@ -969,12 +969,13 @@ else if (i == mIndex)
969969
970970 // Draw pointer with active color to wrap out active icon
971971 if (mCornersRadius == 0 ) mIconsCanvas .drawRect (mPointerBounds , mIconPointerPaint );
972- else mIconsCanvas .drawRoundRect (mPointerBounds , mCornersRadius , mCornersRadius , mIconPointerPaint );
972+ else
973+ mIconsCanvas .drawRoundRect (mPointerBounds , mCornersRadius , mCornersRadius , mIconPointerPaint );
973974
974975 // Draw general bitmap
975976 canvas .drawBitmap (mBitmap , 0.0f , 0.0f , null );
976977 // Draw icons bitmap on top
977- canvas .drawBitmap ( mIconsBitmap , 0.0f , pointerBadgeMargin , null );
978+ canvas .drawBitmap (mIconsBitmap , 0.0f , pointerBadgeMargin , null );
978979
979980 // If is not badged, exit
980981 if (!mIsBadged ) return ;
@@ -1068,7 +1069,7 @@ private void updateCurrentModel(
10681069 model .mIconMatrix .postScale (
10691070 model .mInactiveIconScale + matrixScale , model .mInactiveIconScale + matrixScale ,
10701071 matrixCenterX , matrixCenterY + (mIsTitled && mTitleMode == TitleMode .ACTIVE ?
1071- mTitleMargin * 0.5f * interpolation : 0.0f )
1072+ mTitleMargin * 0.5f * interpolation : 0.0f )
10721073 );
10731074
10741075 mModelTitlePaint .setTextSize (mModelTitleSize * textScale );
@@ -1097,7 +1098,7 @@ private void updateLastModel(
10971098 model .mInactiveIconScale + model .mActiveIconScaleBy - matrixLastScale ,
10981099 model .mInactiveIconScale + model .mActiveIconScaleBy - matrixLastScale ,
10991100 matrixCenterX , matrixCenterY + (mIsTitled && mTitleMode == TitleMode .ACTIVE ?
1100- mTitleMargin * 0.5f - (mTitleMargin * 0.5f * lastInterpolation ) : 0.0f )
1101+ mTitleMargin * 0.5f - (mTitleMargin * 0.5f * lastInterpolation ) : 0.0f )
11011102 );
11021103
11031104 mModelTitlePaint .setTextSize (mModelTitleSize * textLastScale );
@@ -1241,17 +1242,21 @@ public static class Model {
12411242 public Model (final Drawable icon , final int color ) {
12421243 mColor = color ;
12431244 if (icon != null ) {
1244- if (icon instanceof BitmapDrawable ) {
1245- mIcon = ((BitmapDrawable ) icon ).getBitmap ();
1246- } else {
1247- mIcon = Bitmap .createBitmap (icon .getIntrinsicWidth (),icon .getIntrinsicHeight (), Bitmap .Config .ARGB_8888 );
1248- Canvas canvas = new Canvas (mIcon );
1245+ if (icon instanceof BitmapDrawable ) mIcon = ((BitmapDrawable ) icon ).getBitmap ();
1246+ else {
1247+ mIcon = Bitmap .createBitmap (
1248+ icon .getIntrinsicWidth (),
1249+ icon .getIntrinsicHeight (),
1250+ Bitmap .Config .ARGB_8888
1251+ );
1252+ final Canvas canvas = new Canvas (mIcon );
12491253 icon .setBounds (0 , 0 , canvas .getWidth (), canvas .getHeight ());
12501254 icon .draw (canvas );
12511255 }
12521256 } else {
12531257 mIcon = Bitmap .createBitmap (1 , 1 , Bitmap .Config .RGB_565 );
12541258 }
1259+
12551260 mBadgeAnimator .addListener (new Animator .AnimatorListener () {
12561261
12571262 @ Override
0 commit comments