Skip to content

Commit ab38909

Browse files
committed
Update 1.1.3
1 parent 25c7a16 commit ab38909

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
Or Gradle Maven Central:
3434

3535
```groovy
36-
compile 'com.github.devlight.navigationtabbar:library:1.1.2'
36+
compile 'com.github.devlight.navigationtabbar:library:1.1.3'
3737
```
3838

3939
Or Maven:
@@ -42,7 +42,7 @@ Or Maven:
4242
<dependency>
4343
<groupId>com.github.devlight.navigationtabbar</groupId>
4444
<artifactId>library</artifactId>
45-
<version>1.1.2</version>
45+
<version>1.1.3</version>
4646
<type>aar</type>
4747
</dependency>
4848
```

library/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply plugin: "com.jfrog.bintray"
1919
apply plugin: 'com.github.dcendents.android-maven'
2020
apply plugin: 'maven'
2121

22-
version = "1.1.2"
22+
version = "1.1.3"
2323

2424
android {
2525
compileSdkVersion 23
@@ -29,7 +29,7 @@ android {
2929
minSdkVersion 11
3030
targetSdkVersion 23
3131
versionCode 1
32-
versionName "1.1.2"
32+
versionName "1.1.3"
3333
}
3434
buildTypes {
3535
release {

library/src/main/java/com/gigamole/library/NavigationTabBar.java

+14-9
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)