Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiaoxuan_i809
AndroidUtilCode
提交
1d45e4a4
A
AndroidUtilCode
项目概览
xiaoxuan_i809
/
AndroidUtilCode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,体验更适合开发者的 AI 搜索 >>
提交
1d45e4a4
编写于
9月 13, 2018
作者:
B
Blankj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see 09/13 log
上级
94c0dffd
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
27 addition
and
14 deletion
+27
-14
README-CN.md
README-CN.md
+1
-1
README.md
README.md
+1
-1
app/src/main/java/com/blankj/androidutilcode/feature/core/keyboard/KeyboardActivity.java
...droidutilcode/feature/core/keyboard/KeyboardActivity.java
+0
-4
config.gradle
config.gradle
+3
-3
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/java/com/blankj/utilcode/util/ToastUtils.java
...de/src/main/java/com/blankj/utilcode/util/ToastUtils.java
+19
-3
未找到文件。
README-CN.md
浏览文件 @
1d45e4a4
...
...
@@ -41,7 +41,7 @@
[
logo
]:
https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[
aucsvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.20.
2
-brightgreen.svg
[
aucsvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.20.
3
-brightgreen.svg
[
auc
]:
https://github.com/Blankj/AndroidUtilCode
[
apisvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
README.md
浏览文件 @
1d45e4a4
...
...
@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
[
logo
]:
https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[
aucsvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.20.
2
-brightgreen.svg
[
aucsvg
]:
https://img.shields.io/badge/AndroidUtilCode-v1.20.
3
-brightgreen.svg
[
auc
]:
https://github.com/Blankj/AndroidUtilCode
[
apisvg
]:
https://img.shields.io/badge/API-14+-brightgreen.svg
...
...
app/src/main/java/com/blankj/androidutilcode/feature/core/keyboard/KeyboardActivity.java
浏览文件 @
1d45e4a4
...
...
@@ -2,7 +2,6 @@ package com.blankj.androidutilcode.feature.core.keyboard;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v7.app.AlertDialog
;
...
...
@@ -11,12 +10,9 @@ import android.widget.EditText;
import
android.widget.TextView
;
import
com.blankj.androidutilcode.R
;
import
com.blankj.androidutilcode.base.BaseActivity
;
import
com.blankj.androidutilcode.base.BaseBackActivity
;
import
com.blankj.androidutilcode.helper.DialogHelper
;
import
com.blankj.utilcode.util.BarUtils
;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.blankj.utilcode.util.ScreenUtils
;
import
com.blankj.utilcode.util.SpanUtils
;
/**
...
...
config.gradle
浏览文件 @
1d45e4a4
...
...
@@ -6,8 +6,8 @@ ext {
compileSdkVersion:
27
,
minSdkVersion
:
14
,
targetSdkVersion
:
27
,
versionCode
:
1
_020_00
2
,
versionName
:
'1.20.
2
'
// E.g. 1.9.72 => 1,009,072
versionCode
:
1
_020_00
3
,
versionName
:
'1.20.
3
'
// E.g. 1.9.72 => 1,009,072
]
versionConfig
=
[
...
...
@@ -172,7 +172,7 @@ def configAppDependencies(Project pro) {
// LeakCanary
debugImplementation
depConfig
.
leakcanary
.
android
releaseImplementation
depConfig
.
leakcanary
.
android_no_op
// implementation 'com.blankj:utilcode:1.20.
2
'
// implementation 'com.blankj:utilcode:1.20.
3
'
}
}
...
...
update_log.md
浏览文件 @
1d45e4a4
*
`18/09/13`
修复 ToastUtils 在小米手机显示 Toast 带有 App 名,发布 1.20.3
*
`18/09/12`
修复 KeyBoardUtils#fixAndroidBug5497,完善 ToastUtils,发布 1.20.2
*
`18/09/11`
新增 BarUtils#isSupportNavBar,删除 BarUtils#setNavBarImmersive
*
`18/09/10`
修复 KeyboardUtils 中 getWindowVisibleDisplayFrame 空指针异常,更新 BarUtils#isNavBarVisible
...
...
utilcode/README-CN.md
浏览文件 @
1d45e4a4
...
...
@@ -2,7 +2,7 @@
Gradle:
```
groovy
implementation
'com.blankj:utilcode:1.20.
2
'
implementation
'com.blankj:utilcode:1.20.
3
'
```
...
...
utilcode/README.md
浏览文件 @
1d45e4a4
...
...
@@ -2,7 +2,7 @@
Gradle:
```
groovy
implementation
'com.blankj:utilcode:1.20.
2
'
implementation
'com.blankj:utilcode:1.20.
3
'
```
...
...
utilcode/src/main/java/com/blankj/utilcode/util/ToastUtils.java
浏览文件 @
1d45e4a4
...
...
@@ -3,6 +3,7 @@ package com.blankj.utilcode.util;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.content.res.Configuration
;
import
android.content.res.Resources
;
import
android.graphics.Color
;
import
android.graphics.PixelFormat
;
import
android.graphics.PorterDuff
;
...
...
@@ -333,13 +334,13 @@ public final class ToastUtils {
static
IToast
makeToast
(
Context
context
,
CharSequence
text
,
int
duration
)
{
if
(
NotificationManagerCompat
.
from
(
context
).
areNotificationsEnabled
())
{
return
new
SystemToast
(
Toast
.
makeTex
t
(
context
,
text
,
duration
));
return
new
SystemToast
(
makeNormalToas
t
(
context
,
text
,
duration
));
}
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
N_MR1
)
{
return
new
ToastWithoutNotification
(
Toast
.
makeTex
t
(
context
,
text
,
duration
));
return
new
ToastWithoutNotification
(
makeNormalToas
t
(
context
,
text
,
duration
));
}
Log
.
e
(
"ToastUtils"
,
"Toast is GG. In fact, next step is useless."
);
return
new
SystemToast
(
Toast
.
makeTex
t
(
context
,
text
,
duration
));
return
new
SystemToast
(
makeNormalToas
t
(
context
,
text
,
duration
));
}
static
IToast
newToast
(
Context
context
)
{
...
...
@@ -352,6 +353,21 @@ public final class ToastUtils {
Log
.
e
(
"ToastUtils"
,
"Toast is GG. In fact, next step is useless."
);
return
new
SystemToast
(
new
Toast
(
context
));
}
private
static
Toast
makeNormalToast
(
Context
context
,
CharSequence
text
,
int
duration
)
{
if
(
"Xiaomi"
.
equals
(
Build
.
MANUFACTURER
))
{
Toast
toast
=
new
Toast
(
context
);
int
identifier
=
Resources
.
getSystem
()
.
getIdentifier
(
"transient_notification"
,
"layout"
,
"android"
);
View
view
=
getView
(
identifier
);
toast
.
setView
(
view
);
toast
.
setDuration
(
duration
);
TextView
tv
=
view
.
findViewById
(
android
.
R
.
id
.
message
);
tv
.
setText
(
text
);
return
toast
;
}
return
Toast
.
makeText
(
context
,
text
,
duration
);
}
}
static
class
SystemToast
implements
IToast
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录