Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hzw1199 committed Dec 22, 2023
1 parent eeaff97 commit 02b7ba4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* ```OverlayViewGroup```: Display FloatingView above certain ViewGroup
* Move FloatingView with finger
* Scale FloatingView with two fingers (can be disabled)
* Listen to click and double-click events
* Define 9 initial position for FloatingView
* Define initial paddings for FloatingView
* Hold FloatingView object, so that you can change the content of FloatingView dynamically, and set OnClickListener for each child view of FloatingView
Expand All @@ -41,7 +42,7 @@ Add the dependency in the form:

```
dependencies {
compile 'com.github.hzw1199:FloatingView:1.4.0'
compile 'com.github.hzw1199:FloatingView:1.5.0'
}
```

Expand Down Expand Up @@ -143,6 +144,23 @@ floatingView.setOnClickListener(new View.OnClickListener() {
});
```

Double-click event

```java
floatingView.setOnDoubleClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

}
});
```

Maximize zoom

```java
floatingView.full();
```

## Hold the Floating View object, to change the content logically
[demo](/app/src/main/java/com/wuadam/demo/AdvancedControlActivity.java)

Expand Down
20 changes: 19 additions & 1 deletion READMEcn.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* ```OverlayViewGroup```模式下只在指定的ViewGroup上显示
* 可随着手指拖动
* 可双指缩放(可开关)
* 可监听单击和双击事件
* 可指定9个初始位置
* 可指定初始paddings
* 可持有浮动View对象,从而可以动态修改View的内容,并可为浮动View的各个子控件单独设置OnClickListener
Expand All @@ -39,7 +40,7 @@ allprojects {

```
dependencies {
compile 'com.github.hzw1199:FloatingView:1.4.0'
compile 'com.github.hzw1199:FloatingView:1.5.0'
}
```

Expand Down Expand Up @@ -141,6 +142,23 @@ floatingView.setOnClickListener(new View.OnClickListener() {
});
```

双击事件

```java
floatingView.setOnDoubleClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

}
});
```

最大化缩放

```java
floatingView.full();
```

## 持有浮动控件的View对象,可动态修改浮动View的内容
[demo](/app/src/main/java/com/wuadam/demo/AdvancedControlActivity.java)

Expand Down

0 comments on commit 02b7ba4

Please sign in to comment.