Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Petterpx committed Oct 26, 2022
2 parents 9a793e3 + 5394e5a commit 70bb99c
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ allprojects {
```groovy
dependencies {
implementation 'com.github.Petterpx:FloatingX:1.1.0'
implementation 'com.github.Petterpx:FloatingX:1.1.2'
}
```
Expand Down Expand Up @@ -105,7 +105,7 @@ FloatingX.init {
```java
AppHelper helper = AppHelper.builder()
.setLayout(R.layout.item_floating)
.enableFx()
.enableFx()
.build();
FloatingX.init(helper);
```
Expand Down Expand Up @@ -140,38 +140,28 @@ ScopeHelper.builder()
##### activity创建悬浮窗

```kotlin
private val activityFx by activityToFx(activity) {
private val scopeFx by createFx {
setLayout(R.layout.item_floating)
build().toControl(this/Activity)
}

```

##### fragment创建悬浮窗

```kotlin
private val fragment by fragmentToFx(fragment) {
private val activityFx by createFx {
setLayout(R.layout.item_floating)
build().toControl(this/Fragment)
}
```

##### viewGroup创建悬浮窗

```kotlin
private val viewFx by createFx({
init(viewGroup)
}) {
setLayout(R.layout.item_floating)
setEnableLog(true, "main_fx")
}
```

##### 快速创建任意作用域悬浮窗

```kotlin
private val customCreateFx by createFx {
private val activityFx by createFx {
setLayout(R.layout.item_floating)
build().toControl(activity)
build().toControl(fragment)
build().toControl(viewgroup)
build().toControl(this/Viewgroup)
}
```

Expand Down

0 comments on commit 70bb99c

Please sign in to comment.