Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mmm-rain
AndroidUtilCode
提交
f213c602
A
AndroidUtilCode
项目概览
mmm-rain
/
AndroidUtilCode
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AndroidUtilCode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f213c602
编写于
3月 21, 2018
作者:
B
Blankj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see 03/21 log
上级
4d22bf68
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
44 addition
and
8 deletion
+44
-8
README-CN.md
README-CN.md
+1
-1
README.md
README.md
+1
-1
app/build.gradle
app/build.gradle
+1
-1
app/src/main/res_core/values/strings.xml
app/src/main/res_core/values/strings.xml
+1
-0
build.gradle
build.gradle
+2
-2
update_log.md
update_log.md
+1
-0
utilcode/README-CN.md
utilcode/README-CN.md
+1
-1
utilcode/README.md
utilcode/README.md
+1
-1
utilcode/src/main/AndroidManifest.xml
utilcode/src/main/AndroidManifest.xml
+1
-0
utilcode/src/main/java/com/blankj/utilcode/util/ImageUtils.java
...de/src/main/java/com/blankj/utilcode/util/ImageUtils.java
+30
-0
utilcode/src/main/java/com/blankj/utilcode/util/PermissionUtils.java
...c/main/java/com/blankj/utilcode/util/PermissionUtils.java
+4
-1
未找到文件。
README-CN.md
浏览文件 @
f213c602
...
...
@@ -41,7 +41,7 @@
[
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
[
apisvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
README.md
浏览文件 @
f213c602
...
...
@@ -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
[
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
[
apisvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
app/build.gradle
浏览文件 @
f213c602
...
...
@@ -56,7 +56,7 @@ dependencies {
// LeakCanary
debugImplementation
"com.squareup.leakcanary:leakcanary-android:$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
'
}
app/src/main/res_core/values/strings.xml
浏览文件 @
f213c602
...
...
@@ -133,6 +133,7 @@
<!--Image 相关-->
<string
name=
"image_src"
>
Src
</string>
<string
name=
"image_add_color"
>
Add Color
</string>
<string
name=
"image_scale"
>
Scale
</string>
<string
name=
"image_clip"
>
Clip
</string>
<string
name=
"image_skew"
>
Skew
</string>
...
...
build.gradle
浏览文件 @
f213c602
...
...
@@ -34,8 +34,8 @@ ext {
min_sdk_version
=
14
target_sdk_version
=
26
version_code
=
1
_013_00
4
version_name
=
'1.13.
4
'
// E.g 1.9.72 => 1,009,072
version_code
=
1
_013_00
5
version_name
=
'1.13.
5
'
// E.g 1.9.72 => 1,009,072
// App dependencies
support_version
=
'26.1.0'
...
...
update_log.md
浏览文件 @
f213c602
*
18/03/20 修复 PermissionUtils 子进程的问题
*
18/03/16 新增 gradle 插件来格式化 README
*
18/03/14 修复 KeyboardUtils#getContentViewInvisibleHeight,发布 1.13.4 版本
*
18/03/10 完善 Utils#installAppSilent 和 DeviceUtils#getMacAddress,发布 1.13.3 版本
...
...
utilcode/README-CN.md
浏览文件 @
f213c602
...
...
@@ -2,7 +2,7 @@
Gradle:
```
groovy
compile
'com.blankj:utilcode:1.13.
4
'
compile
'com.blankj:utilcode:1.13.
5
'
```
...
...
utilcode/README.md
浏览文件 @
f213c602
...
...
@@ -2,7 +2,7 @@
Gradle:
```
groovy
compile
'com.blankj:utilcode:1.13.
4
'
compile
'com.blankj:utilcode:1.13.
5
'
```
...
...
utilcode/src/main/AndroidManifest.xml
浏览文件 @
f213c602
...
...
@@ -5,6 +5,7 @@
<activity
android:name=
".util.PermissionUtils$PermissionActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:multiprocess=
"true"
android:theme=
"@style/ActivityTranslucent"
android:windowSoftInputMode=
"stateHidden|stateAlwaysHidden"
/>
</application>
...
...
utilcode/src/main/java/com/blankj/utilcode/util/ImageUtils.java
浏览文件 @
f213c602
...
...
@@ -32,6 +32,7 @@ import android.support.annotation.ColorInt;
import
android.support.annotation.DrawableRes
;
import
android.support.annotation.FloatRange
;
import
android.support.annotation.IntRange
;
import
android.support.annotation.NonNull
;
import
android.support.v4.content.ContextCompat
;
import
android.view.View
;
...
...
@@ -358,6 +359,35 @@ public final class ImageUtils {
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.
*
...
...
utilcode/src/main/java/com/blankj/utilcode/util/PermissionUtils.java
浏览文件 @
f213c602
...
...
@@ -298,7 +298,10 @@ public final class PermissionUtils {
}
if
(
sInstance
.
mPermissionsRequest
!=
null
)
{
int
size
=
sInstance
.
mPermissionsRequest
.
size
();
if
(
size
<=
0
)
return
;
if
(
size
<=
0
)
{
finish
();
return
;
}
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录