Skip to content

Commit

Permalink
升级悬浮窗框架的版本
Browse files Browse the repository at this point in the history
  • Loading branch information
getActivity committed Dec 5, 2020
1 parent 0317e06 commit 392d92b
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 28 deletions.
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/.gradle
/.idea
/build
*/build
/captures
/.idea
/.cxx
/.externalNativeBuild

/app/*.pro

/library/*.pro
*.iml
.DS_Store
local.properties
Binary file modified Logcat.apk
Binary file not shown.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 日志调试框架

> 码云地址:[Gitee](https://gitee.com/getActivity/Logcat)
* 码云地址:[Gitee](https://gitee.com/getActivity/Logcat)

> [点击此处下载Demo](Logcat.apk)
* [点击此处下载Demo](Logcat.apk)

![](picture/logo.png)

Expand All @@ -11,7 +11,7 @@
```groovy
dependencies {
// 日志调试框架:https://github.com/getActivity/Logcat
debugImplementation 'com.hjq:logcat:9.0'
debugImplementation 'com.hjq:logcat:9.2'
}
```

Expand Down Expand Up @@ -86,6 +86,8 @@ dependencies {

* 悬浮窗框架:[XToast](https://github.com/getActivity/XToast)

* Gson 解析容错:[GsonFactory](https://github.com/getActivity/GsonFactory)

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

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

This file was deleted.

4 changes: 2 additions & 2 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 90
versionName "9.0"
versionCode 92
versionName "9.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
25 changes: 25 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\SDK\Studio\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
1 change: 0 additions & 1 deletion library/.gitignore

This file was deleted.

8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 90
versionName "9.0"
versionCode 92
versionName "9.2"
}

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

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

publish {
userOrg = 'getactivity'
groupId = 'com.hjq'
artifactId = 'logcat'
version = '9.0'
version = '9.2'
description = 'This is to help developers quickly see the logging framework they want'
website = "https://github.com/getActivity/Logcat"
}
Expand Down
25 changes: 25 additions & 0 deletions library/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\SDK\Studio\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
13 changes: 12 additions & 1 deletion library/src/main/java/com/hjq/logcat/FloatingWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import android.app.Activity;
import android.content.Intent;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;

import com.hjq.xtoast.OnClickListener;
import com.hjq.xtoast.XToast;
Expand All @@ -19,7 +21,16 @@ final class FloatingWindow extends XToast implements OnClickListener {

FloatingWindow(Activity activity) {
super(activity);
setView(R.layout.logcat_window_floating);

ImageView imageView = new ImageView(activity.getApplicationContext());
imageView.setId(android.R.id.icon);
imageView.setImageResource(R.drawable.logcat_selector_floating);
setView(imageView);

int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 45, activity.getResources().getDisplayMetrics());
setWidth(size);
setHeight(size);

setAnimStyle(android.R.style.Animation_Toast);
setDraggable(new SpringDraggable());
setGravity(Gravity.END | Gravity.CENTER_VERTICAL);
Expand Down
6 changes: 0 additions & 6 deletions library/src/main/res/layout/logcat_window_floating.xml

This file was deleted.

0 comments on commit 392d92b

Please sign in to comment.