Skip to content

Commit c00cc09

Browse files
committed
feat(assists): 添加窗口管理器的标志设置功能并更新构建配置
- 在 AssistsWindowManager 中添加 setFlags 函数,用于设置窗口标志 - 在各模块的 build.gradle 中添加 sourcesJar任务,生成源码 jar 文件- 更新版本号至 3.2.17 - 修改 assists-web 的版本号为 0.0.2-SNAPSHOT
1 parent 340b4a2 commit c00cc09

File tree

6 files changed

+96
-7
lines changed

6 files changed

+96
-7
lines changed

assists-mp/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ dependencies {
3535
implementation "androidx.core:core-ktx:${rootProject.ext.coreKtxVersion}"
3636
implementation project(':assists')
3737
}
38-
38+
task sourcesJar(type: Jar) {
39+
archiveClassifier.set('sources')
40+
from android.sourceSets.main.java.srcDirs
41+
}
3942
afterEvaluate {
4043
publishing {
4144
publications {
@@ -44,6 +47,9 @@ afterEvaluate {
4447
groupId = 'com.github.ven-coder'
4548
artifactId = 'assists-mp'
4649
version = rootProject.ext.mavenVersion
50+
51+
artifact sourcesJar
52+
4753
}
4854
}
4955
}

assists-opcv/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ dependencies {
3636
implementation project(':assists')
3737
implementation project(':assists-mp')
3838
}
39-
39+
task sourcesJar(type: Jar) {
40+
archiveClassifier.set('sources')
41+
from android.sourceSets.main.java.srcDirs
42+
}
4043
afterEvaluate {
4144
publishing {
4245
publications {
@@ -45,6 +48,8 @@ afterEvaluate {
4548
groupId = 'com.github.ven-coder'
4649
artifactId = 'assists-opcv'
4750
version = rootProject.ext.mavenVersion
51+
artifact sourcesJar
52+
4853
}
4954
}
5055
}

assists-web/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,19 @@ dependencies {
3737
implementation project(':assists')
3838
implementation project(':assists-mp')
3939
}
40-
40+
task sourcesJar(type: Jar) {
41+
archiveClassifier.set('sources')
42+
from android.sourceSets.main.java.srcDirs
43+
}
4144
afterEvaluate {
4245
publishing {
4346
publications {
4447
release(MavenPublication) {
4548
from components.release
4649
groupId = 'com.github.ven-coder'
4750
artifactId = 'assists-web'
48-
version = '0.0.1-SNAPSHOT'
51+
version = '0.0.2-SNAPSHOT'
52+
artifact sourcesJar
4953
}
5054
}
5155
}

assists/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ dokkaHtml {
4949
// }
5050
}
5151

52+
task sourcesJar(type: Jar) {
53+
archiveClassifier.set('sources')
54+
from android.sourceSets.main.java.srcDirs
55+
}
56+
5257
afterEvaluate {
5358
publishing {
5459
publications {
@@ -57,6 +62,8 @@ afterEvaluate {
5762
groupId = 'com.github.ven-coder'
5863
artifactId = 'assists-base'
5964
version = rootProject.ext.mavenVersion
65+
66+
artifact sourcesJar
6067
}
6168
}
6269
}

assists/src/main/java/com/ven/assists/window/AssistsWindowManager.kt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,73 @@ object AssistsWindowManager {
179179
viewList.add(ViewWrapper(view, layoutParams))
180180
}
181181

182+
/**
183+
* FLAG_NOT_FOCUSABLE
184+
* 8
185+
* 0x08
186+
* 不获取焦点
187+
* FLAG_NOT_TOUCHABLE
188+
* 16
189+
* 0x10
190+
* 不响应触摸
191+
* FLAG_NOT_TOUCH_MODAL
192+
* 32
193+
* 0x20
194+
* 不拦截触摸
195+
* FLAG_WATCH_OUTSIDE_TOUCH
196+
* 4
197+
* 0x04
198+
* 监听窗外点击
199+
* FLAG_LAYOUT_NO_LIMITS
200+
* 512
201+
* 0x200
202+
* 可绘制超出屏幕
203+
* FLAG_LAYOUT_IN_SCREEN
204+
* 256
205+
* 0x100
206+
* 屏幕全区域布局
207+
* FLAG_FULLSCREEN
208+
* 1024
209+
* 0x400
210+
* 全屏显示
211+
* FLAG_DIM_BEHIND
212+
* 2
213+
* 0x02
214+
* 背景变暗
215+
* FLAG_SECURE
216+
* 8192
217+
* 0x2000
218+
* 防录屏防截图
219+
* FLAG_KEEP_SCREEN_ON
220+
* 128
221+
* 0x80
222+
* 保持常亮
223+
* FLAG_SHOW_WHEN_LOCKED
224+
* 524288
225+
* 0x80000
226+
* 锁屏时可见
227+
* FLAG_DISMISS_KEYGUARD
228+
* 4194304
229+
* 0x400000
230+
* 解锁屏幕
231+
* FLAG_TURN_SCREEN_ON
232+
* 2097152
233+
* 0x200000
234+
* 点亮屏幕
235+
* FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
236+
* 128
237+
* 0x80
238+
* 自动锁屏(不常用)
239+
* FLAG_SHOW_WALLPAPER
240+
* 1048576
241+
* 0x100000
242+
* 显示墙纸
243+
* FLAG_HARDWARE_ACCELERATED
244+
* 16777216
245+
* 0x1000000
246+
* 强制硬件加速
247+
*
248+
*/
182249
suspend fun setFlags(flag: Int) {
183250
withContext(Dispatchers.Main) {
184251
viewList.forEach {

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ buildscript {
99
targetSdk = 33
1010

1111
// 应用版本
12-
versionCode = 9
13-
versionName = "3.2.16"
14-
mavenVersion = "3.2.16"
12+
versionCode = 10
13+
versionName = "3.2.17"
14+
mavenVersion = "3.2.17"
1515

1616
// 依赖库版本
1717
coreKtxVersion = "1.13.1"

0 commit comments

Comments
 (0)