@@ -969,12 +969,13 @@ else if (i == mIndex)
969
969
970
970
// Draw pointer with active color to wrap out active icon
971
971
if (mCornersRadius == 0 ) mIconsCanvas .drawRect (mPointerBounds , mIconPointerPaint );
972
- else mIconsCanvas .drawRoundRect (mPointerBounds , mCornersRadius , mCornersRadius , mIconPointerPaint );
972
+ else
973
+ mIconsCanvas .drawRoundRect (mPointerBounds , mCornersRadius , mCornersRadius , mIconPointerPaint );
973
974
974
975
// Draw general bitmap
975
976
canvas .drawBitmap (mBitmap , 0.0f , 0.0f , null );
976
977
// Draw icons bitmap on top
977
- canvas .drawBitmap ( mIconsBitmap , 0.0f , pointerBadgeMargin , null );
978
+ canvas .drawBitmap (mIconsBitmap , 0.0f , pointerBadgeMargin , null );
978
979
979
980
// If is not badged, exit
980
981
if (!mIsBadged ) return ;
@@ -1068,7 +1069,7 @@ private void updateCurrentModel(
1068
1069
model .mIconMatrix .postScale (
1069
1070
model .mInactiveIconScale + matrixScale , model .mInactiveIconScale + matrixScale ,
1070
1071
matrixCenterX , matrixCenterY + (mIsTitled && mTitleMode == TitleMode .ACTIVE ?
1071
- mTitleMargin * 0.5f * interpolation : 0.0f )
1072
+ mTitleMargin * 0.5f * interpolation : 0.0f )
1072
1073
);
1073
1074
1074
1075
mModelTitlePaint .setTextSize (mModelTitleSize * textScale );
@@ -1097,7 +1098,7 @@ private void updateLastModel(
1097
1098
model .mInactiveIconScale + model .mActiveIconScaleBy - matrixLastScale ,
1098
1099
model .mInactiveIconScale + model .mActiveIconScaleBy - matrixLastScale ,
1099
1100
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 )
1101
1102
);
1102
1103
1103
1104
mModelTitlePaint .setTextSize (mModelTitleSize * textLastScale );
@@ -1241,17 +1242,21 @@ public static class Model {
1241
1242
public Model (final Drawable icon , final int color ) {
1242
1243
mColor = color ;
1243
1244
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 );
1249
1253
icon .setBounds (0 , 0 , canvas .getWidth (), canvas .getHeight ());
1250
1254
icon .draw (canvas );
1251
1255
}
1252
1256
} else {
1253
1257
mIcon = Bitmap .createBitmap (1 , 1 , Bitmap .Config .RGB_565 );
1254
1258
}
1259
+
1255
1260
mBadgeAnimator .addListener (new Animator .AnimatorListener () {
1256
1261
1257
1262
@ Override
0 commit comments