Skip to content

Commit

Permalink
1、修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Oct 21, 2024
1 parent 25544fd commit 0a2f677
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,24 @@ androidAop.debugMode.buildConfig = true //If set to true, it means exporting a D
!!! note
Because some modules have only Kotlin code, debugMode cannot take effect. You can insert a Java code to make it effective by setting it to true. If you don't need it, you can set it to false, but you need to manually create a Java code.

### This library has some built-in functional annotations for you to use directly.

| Annotation name | Parameter description | Function description |
|--------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| @SingleClick | value = interval of quick clicks, default 1000ms | Click the annotation and add this annotation to make your method accessible only when clicked |
| @DoubleClick | value = maximum time between two clicks, default 300ms | Double-click annotation, add this annotation to make your method enterable only when double-clicked |
| @IOThread | ThreadType = thread type | Switch to the sub-thread operation. Adding this annotation can switch the code in your method to the sub-thread for execution |
| @MainThread | No parameters | The operation of switching to the main thread. Adding this annotation can switch the code in your method to the main thread for execution |
| @OnLifecycle<sup>*</sup> | value = Lifecycle.Event | Monitor life cycle operations. Adding this annotation allows the code in your method to be executed only during the corresponding life cycle |
| @TryCatch | value = a flag you customized | Adding this annotation can wrap a layer of try catch code for your method |
| @Permission<sup>*</sup> | value = String array of permissions | The operation of applying for permissions. Adding this annotation will enable your code to be executed only after obtaining permissions |
| @Scheduled | initialDelay = delayed start time<br>interval = interval<br>repeatCount = number of repetitions<br>isOnMainThread = whether to be the main thread<br>id = unique identifier | Scheduled tasks, add this annotation to make your method Executed every once in a while, call AndroidAop.shutdownNow(id) or AndroidAop.shutdown(id) to stop |
| @Delay | delay = delay time<br>isOnMainThread = whether the main thread<br>id = unique identifier | Delay task, add this annotation to delay the execution of your method for a period of time, call AndroidAop.shutdownNow(id) or AndroidAop .shutdown(id) can be canceled |
| @CheckNetwork | tag = custom tag<br>toastText = toast prompt when there is no network<br>invokeListener = whether to take over the check network logic | Check whether the network is available, adding this annotation will allow your method to enter only when there is a network |
| @CustomIntercept | value = a flag of a string array that you customized | Custom interception, used with AndroidAop.setOnCustomInterceptListener, is a panacea |

!!! note
The above functions are located in the `android-aop-extra` library. [For detailed instructions, please see the documentation](/AndroidAOP/android_aop_extra/)

## Custom Aspects

Expand Down
1 change: 1 addition & 0 deletions docs/give_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Your stars and support are my biggest motivation to move forward!
| j*e | 2024-04-11 | Wechat | 辛苦大佬这么晚帮我找问题 | / | ¥ 88 |
| *| 2024-07-03 | Wechat | / | / | ¥ 64.6 |
| *| 2024-09-19 | Wechat | / | / | ¥ 66 |
| F*I | 2024-10-20 | Wechat | 感谢解我燃眉之急 | / | ¥ 100 |

## Appreciation

Expand Down
20 changes: 20 additions & 0 deletions docs/zh/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ androidAop.debugMode.buildConfig = true //设置为 true 表示导出一个 Debu
1、因为有些 module 的代码只有 kotlin 代码,导致 debugMode 无法生效,设置为true可插入一个 java 代码即可生效,如果不需要,可以设置为 false,但需要你手动创建一个 java 代码 <br>
2、通常不需要配置此项,除非你遇到上述情况

### 本库内置了一些功能注解可供你直接使用

| 注解名称 | 参数说明 | 功能说明 |
|--------------------------|:---------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------:|
| @SingleClick | value = 快速点击的间隔,默认1000ms | 单击注解,加入此注解,可使你的方法只有单击时才可进入 |
| @DoubleClick | value = 两次点击的最大用时,默认300ms | 双击注解,加入此注解,可使你的方法双击时才可进入 |
| @IOThread | ThreadType = 线程类型 | 切换到子线程的操作,加入此注解可使你的方法内的代码切换到子线程执行 |
| @MainThread | 无参数 | 切换到主线程的操作,加入此注解可使你的方法内的代码切换到主线程执行 |
| @OnLifecycle<sup>*</sup> | value = Lifecycle.Event | 监听生命周期的操作,加入此注解可使你的方法内的代码在对应生命周期内才去执行 |
| @TryCatch | value = 你自定义加的一个flag | 加入此注解可为您的方法包裹一层 try catch 代码 |
| @Permission<sup>*</sup> | tag = 自定义标记<br>value = 权限的字符串数组 | 申请权限的操作,加入此注解可使您的代码在获取权限后才执行 |
| @Scheduled | initialDelay = 延迟开始时间<br>interval = 间隔<br>repeatCount = 重复次数<br>isOnMainThread = 是否主线程<br>id = 唯一标识 | 定时任务,加入此注解,可使你的方法每隔一段时间执行一次,调用AndroidAop.shutdownNow(id)或AndroidAop.shutdown(id)可停止 |
| @Delay | delay = 延迟时间<br>isOnMainThread = 是否主线程<br>id = 唯一标识 | 延迟任务,加入此注解,可使你的方法延迟一段时间执行,调用AndroidAop.shutdownNow(id)或AndroidAop.shutdown(id)可取消 |
| @CheckNetwork | tag = 自定义标记<br>toastText = 无网络时toast提示<br>invokeListener = 是否接管检查网络逻辑 | 检查网络是否可用,加入此注解可使你的方法在有网络才可进去 |
| @CustomIntercept | value = 你自定义加的一个字符串数组的flag | 自定义拦截,配合 AndroidAop.setOnCustomInterceptListener 使用,属于万金油 |


!!! note
以上功能位于 `android-aop-extra` 库中,[详细说明请看文档](/AndroidAOP/zh/android_aop_extra/)


## 自定义切面

Expand Down
1 change: 1 addition & 0 deletions docs/zh/give_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| j*e | 2024-04-11 | 微信 | 辛苦大佬这么晚帮我找问题 | / | ¥ 88 |
| *| 2024-07-03 | 微信 | / | / | ¥ 64.6 |
| *| 2024-09-19 | 微信 | / | / | ¥ 66 |
| F*I | 2024-10-20 | 微信 | 感谢解我燃眉之急 | / | ¥ 100 |

## 赞赏

Expand Down

0 comments on commit 0a2f677

Please sign in to comment.