Skip to content

Commit d35ff4a

Browse files
committed
Release version 1.0.0
1 parent 48aed62 commit d35ff4a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,30 @@ Floating view with draw over other apps
55

66
## Demo
77
<div style="dispaly:flex">
8-
<img src="/demo.gif" width="24%">
8+
<img src="/demo.gif" width="30%">
99
</div>
1010

1111
## Build
1212
##### Step 1. Add the JitPack repository to your build file
13-
```build
13+
```bat
1414
allprojects {
1515
repositories {
1616
maven { url "https://jitpack.io" }
1717
}
1818
}
1919
```
20+
2021
##### Step 2. Add the dependency
21-
```build
22+
```bat
2223
dependencies {
23-
implementation 'com.buildtoapp.floatingoverlayview:FloatingOverlayView:1.0.0'
24+
implementation 'com.github.javaherisaber:FloatingOverlayView:1.0.0'
2425
}
2526
```
2627

2728
## Usage
2829
### Layout.xml
2930
##### Step 1. Create layout and don't forget add id (root_container) like this
30-
```layout
31+
```xml
3132
<?xml version="1.0" encoding="utf-8"?>
3233
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3334
android:layout_width="match_parent"
@@ -44,16 +45,17 @@ dependencies {
4445

4546
</FrameLayout>
4647
```
48+
4749
### Kotlin/Java
4850
##### Step 2. Create FloatingOverlayView
4951
```kotlin
5052
FloatingOverlayView(context, R.layout.view_overlay)
51-
.setXOffset(800)
53+
.setXOffset(800) // move the banner to the right side
5254
.setOnCreateListener { layout: FloatingOverlayView, view: View ->
53-
55+
// do something with `view`, maybe a close button
5456
}
5557
.setOnCloseListener {
56-
58+
// do something after the banner is closed
5759
}
5860
.create()
5961
```

0 commit comments

Comments
 (0)