Skip to content

Commit

Permalink
修复部分日志没有显示的 Bug
Browse files Browse the repository at this point in the history
适配多语言字符串资源
移除权限申请的相关代码
适配 Android 10 分区存储特性
  • Loading branch information
getActivity committed Feb 6, 2021
1 parent 392d92b commit 1e416cf
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 143 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
*/build
/captures
/.cxx
*/.cxx
/.externalNativeBuild

._*
*.iml
.DS_Store
local.properties
Binary file modified Logcat.apk
Binary file not shown.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
```groovy
dependencies {
// 日志调试框架:https://github.com/getActivity/Logcat
debugImplementation 'com.hjq:logcat:9.2'
debugImplementation 'com.hjq:logcat:9.5'
}
```

Expand Down Expand Up @@ -90,6 +90,10 @@ dependencies {

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

#### 微信公众号:Android轮子哥

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

#### 如果您觉得我的开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 :monkey_face:就太:thumbsup:了。您的支持将鼓励我继续创作:octocat:

![](https://raw.githubusercontent.com/getActivity/Donate/master/picture/pay_ali.png) ![](https://raw.githubusercontent.com/getActivity/Donate/master/picture/pay_wechat.png)
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.hjq.logcat.demo"
minSdkVersion 16
targetSdkVersion 30
versionCode 92
versionName "9.2"
versionCode 95
versionName "9.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -25,7 +25,7 @@ dependencies {

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

// 标题栏:https://github.com/getActivity/TitleBar
implementation 'com.hjq:titlebar:8.2'
Expand Down
11 changes: 6 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ android {

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 92
versionName "9.2"
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 23
versionCode 95
versionName "9.5"
}

lintOptions {
Expand All @@ -21,14 +22,14 @@ android {

dependencies {
// 悬浮窗框架:https://github.com/getActivity/XToast
implementation 'com.hjq:xtoast:6.5'
implementation 'com.hjq:xtoast:6.6'
}

publish {
userOrg = 'getactivity'
groupId = 'com.hjq'
artifactId = 'logcat'
version = '9.2'
version = '9.5'
description = 'This is to help developers quickly see the logging framework they want'
website = "https://github.com/getActivity/Logcat"
}
Expand Down
1 change: 0 additions & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
package="com.hjq.logcat">

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

Expand Down
11 changes: 10 additions & 1 deletion library/src/main/java/com/hjq/logcat/ChooseWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.hjq.xtoast.OnClickListener;
import com.hjq.xtoast.XToast;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

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

private final ChooseAdapter mAdapter;
private OnListener mListener;
Expand All @@ -43,6 +44,14 @@ public void onClick(XToast toast, View view) {
cancel();
}

ChooseWindow setList(int... stringIds) {
List<String> data = new ArrayList<>();
for (int stringId : stringIds) {
data.add(getContext().getResources().getString(stringId));
}
return setList(data);
}

ChooseWindow setList(String... data) {
return setList(Arrays.asList(data));
}
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/com/hjq/logcat/FloatingWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* time : 2020/01/24
* desc : 悬浮窗口
*/
final class FloatingWindow extends XToast implements OnClickListener {
final class FloatingWindow extends XToast<FloatingWindow> implements OnClickListener<View> {

FloatingWindow(Activity activity) {
super(activity);
Expand Down
Loading

0 comments on commit 1e416cf

Please sign in to comment.