Skip to content

Commit 1e416cf

Browse files
committed
修复部分日志没有显示的 Bug
适配多语言字符串资源 移除权限申请的相关代码 适配 Android 10 分区存储特性
1 parent 392d92b commit 1e416cf

File tree

16 files changed

+202
-143
lines changed

16 files changed

+202
-143
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
*/build
55
/captures
66
/.cxx
7+
*/.cxx
78
/.externalNativeBuild
89

10+
._*
911
*.iml
1012
.DS_Store
1113
local.properties

Logcat.apk

10.2 KB
Binary file not shown.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
```groovy
1212
dependencies {
1313
// 日志调试框架:https://github.com/getActivity/Logcat
14-
debugImplementation 'com.hjq:logcat:9.2'
14+
debugImplementation 'com.hjq:logcat:9.5'
1515
}
1616
```
1717

@@ -90,6 +90,10 @@ dependencies {
9090

9191
#### Android技术讨论Q群:78797078
9292

93+
#### 微信公众号:Android轮子哥
94+
95+
![](https://raw.githubusercontent.com/getActivity/Donate/master/picture/official_ccount.png)
96+
9397
#### 如果您觉得我的开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 :monkey_face:就太:thumbsup:了。您的支持将鼓励我继续创作:octocat:
9498

9599
![](https://raw.githubusercontent.com/getActivity/Donate/master/picture/pay_ali.png) ![](https://raw.githubusercontent.com/getActivity/Donate/master/picture/pay_wechat.png)

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.hjq.logcat.demo"
88
minSdkVersion 16
99
targetSdkVersion 30
10-
versionCode 92
11-
versionName "9.2"
10+
versionCode 95
11+
versionName "9.5"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {
@@ -25,7 +25,7 @@ dependencies {
2525

2626
// 谷歌兼容库:https://developer.android.google.cn/jetpack/androidx/releases/appcompat?hl=zh-cn
2727
implementation 'androidx.appcompat:appcompat:1.2.0'
28-
implementation 'com.google.android.material:material:1.2.0'
28+
implementation 'com.google.android.material:material:1.2.1'
2929

3030
// 标题栏:https://github.com/getActivity/TitleBar
3131
implementation 'com.hjq:titlebar:8.2'

library/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ android {
99

1010
defaultConfig {
1111
minSdkVersion 14
12-
targetSdkVersion 26
13-
versionCode 92
14-
versionName "9.2"
12+
//noinspection ExpiredTargetSdkVersion
13+
targetSdkVersion 23
14+
versionCode 95
15+
versionName "9.5"
1516
}
1617

1718
lintOptions {
@@ -21,14 +22,14 @@ android {
2122

2223
dependencies {
2324
// 悬浮窗框架:https://github.com/getActivity/XToast
24-
implementation 'com.hjq:xtoast:6.5'
25+
implementation 'com.hjq:xtoast:6.6'
2526
}
2627

2728
publish {
2829
userOrg = 'getactivity'
2930
groupId = 'com.hjq'
3031
artifactId = 'logcat'
31-
version = '9.2'
32+
version = '9.5'
3233
description = 'This is to help developers quickly see the logging framework they want'
3334
website = "https://github.com/getActivity/Logcat"
3435
}

library/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package="com.hjq.logcat">
33

44
<!-- 外部存储读写权限 -->
5-
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
65
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
76
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
87

library/src/main/java/com/hjq/logcat/ChooseWindow.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.hjq.xtoast.OnClickListener;
1111
import com.hjq.xtoast.XToast;
1212

13+
import java.util.ArrayList;
1314
import java.util.Arrays;
1415
import java.util.List;
1516

@@ -19,7 +20,7 @@
1920
* time : 2020/01/24
2021
* desc : 列表选择类
2122
*/
22-
final class ChooseWindow extends XToast implements AdapterView.OnItemClickListener, OnClickListener {
23+
final class ChooseWindow extends XToast implements AdapterView.OnItemClickListener, OnClickListener<View> {
2324

2425
private final ChooseAdapter mAdapter;
2526
private OnListener mListener;
@@ -43,6 +44,14 @@ public void onClick(XToast toast, View view) {
4344
cancel();
4445
}
4546

47+
ChooseWindow setList(int... stringIds) {
48+
List<String> data = new ArrayList<>();
49+
for (int stringId : stringIds) {
50+
data.add(getContext().getResources().getString(stringId));
51+
}
52+
return setList(data);
53+
}
54+
4655
ChooseWindow setList(String... data) {
4756
return setList(Arrays.asList(data));
4857
}

library/src/main/java/com/hjq/logcat/FloatingWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* time : 2020/01/24
1818
* desc : 悬浮窗口
1919
*/
20-
final class FloatingWindow extends XToast implements OnClickListener {
20+
final class FloatingWindow extends XToast<FloatingWindow> implements OnClickListener<View> {
2121

2222
FloatingWindow(Activity activity) {
2323
super(activity);

0 commit comments

Comments
 (0)