提交 f213c602 编写于 作者: B Blankj

see 03/21 log

上级 4d22bf68
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.13.4-brightgreen.svg [aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.13.5-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode [auc]: https://github.com/Blankj/AndroidUtilCode
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg [apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
......
...@@ -41,7 +41,7 @@ If this ptoject helps you a lot, and you would like to support this ptoject's fu ...@@ -41,7 +41,7 @@ If this ptoject helps you a lot, and you would like to support this ptoject's fu
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.13.4-brightgreen.svg [aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.13.5-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode [auc]: https://github.com/Blankj/AndroidUtilCode
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg [apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
......
...@@ -56,7 +56,7 @@ dependencies { ...@@ -56,7 +56,7 @@ dependencies {
// LeakCanary // LeakCanary
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version" debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"
// implementation 'com.blankj:utilcode:1.13.4' // implementation 'com.blankj:utilcode:1.13.5'
} }
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
<!--Image 相关--> <!--Image 相关-->
<string name="image_src">Src</string> <string name="image_src">Src</string>
<string name="image_add_color">Add Color</string>
<string name="image_scale">Scale</string> <string name="image_scale">Scale</string>
<string name="image_clip">Clip</string> <string name="image_clip">Clip</string>
<string name="image_skew">Skew</string> <string name="image_skew">Skew</string>
......
...@@ -34,8 +34,8 @@ ext { ...@@ -34,8 +34,8 @@ ext {
min_sdk_version = 14 min_sdk_version = 14
target_sdk_version = 26 target_sdk_version = 26
version_code = 1_013_004 version_code = 1_013_005
version_name = '1.13.4'// E.g 1.9.72 => 1,009,072 version_name = '1.13.5'// E.g 1.9.72 => 1,009,072
// App dependencies // App dependencies
support_version = '26.1.0' support_version = '26.1.0'
......
* 18/03/20 修复 PermissionUtils 子进程的问题
* 18/03/16 新增 gradle 插件来格式化 README * 18/03/16 新增 gradle 插件来格式化 README
* 18/03/14 修复 KeyboardUtils#getContentViewInvisibleHeight,发布 1.13.4 版本 * 18/03/14 修复 KeyboardUtils#getContentViewInvisibleHeight,发布 1.13.4 版本
* 18/03/10 完善 Utils#installAppSilent 和 DeviceUtils#getMacAddress,发布 1.13.3 版本 * 18/03/10 完善 Utils#installAppSilent 和 DeviceUtils#getMacAddress,发布 1.13.3 版本
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Gradle: Gradle:
```groovy ```groovy
compile 'com.blankj:utilcode:1.13.4' compile 'com.blankj:utilcode:1.13.5'
``` ```
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Gradle: Gradle:
```groovy ```groovy
compile 'com.blankj:utilcode:1.13.4' compile 'com.blankj:utilcode:1.13.5'
``` ```
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<activity <activity
android:name=".util.PermissionUtils$PermissionActivity" android:name=".util.PermissionUtils$PermissionActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:multiprocess="true"
android:theme="@style/ActivityTranslucent" android:theme="@style/ActivityTranslucent"
android:windowSoftInputMode="stateHidden|stateAlwaysHidden" /> android:windowSoftInputMode="stateHidden|stateAlwaysHidden" />
</application> </application>
......
...@@ -32,6 +32,7 @@ import android.support.annotation.ColorInt; ...@@ -32,6 +32,7 @@ import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.support.annotation.FloatRange; import android.support.annotation.FloatRange;
import android.support.annotation.IntRange; import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.view.View; import android.view.View;
...@@ -358,6 +359,35 @@ public final class ImageUtils { ...@@ -358,6 +359,35 @@ public final class ImageUtils {
return BitmapFactory.decodeFileDescriptor(fd, null, options); return BitmapFactory.decodeFileDescriptor(fd, null, options);
} }
/**
* Return the bitmap with the specified color.
*
* @param src The source of bitmap.
* @param color The color.
* @return the bitmap with the specified color
*/
public static Bitmap drawColor(@NonNull final Bitmap src, @ColorInt final int color) {
return drawColor(src, color, false);
}
/**
* Return the bitmap with the specified color.
*
* @param src The source of bitmap.
* @param color The color.
* @param recycle True to recycle the source of bitmap, false otherwise.
* @return the bitmap with the specified color
*/
public static Bitmap drawColor(@NonNull final Bitmap src,
@ColorInt final int color,
final boolean recycle) {
if (isEmptyBitmap(src)) return null;
Bitmap ret = recycle ? src : src.copy(src.getConfig(), true);
Canvas canvas = new Canvas(ret);
canvas.drawColor(color, PorterDuff.Mode.DARKEN);
return ret;
}
/** /**
* Return the scaled bitmap. * Return the scaled bitmap.
* *
......
...@@ -298,7 +298,10 @@ public final class PermissionUtils { ...@@ -298,7 +298,10 @@ public final class PermissionUtils {
} }
if (sInstance.mPermissionsRequest != null) { if (sInstance.mPermissionsRequest != null) {
int size = sInstance.mPermissionsRequest.size(); int size = sInstance.mPermissionsRequest.size();
if (size <= 0) return; if (size <= 0) {
finish();
return;
}
requestPermissions(sInstance.mPermissionsRequest.toArray(new String[size]), 1); requestPermissions(sInstance.mPermissionsRequest.toArray(new String[size]), 1);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册