Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

Commit d82cc97

Browse files
authored
Added new dismissType (outsideTargetAndMessage)
new dismissType - outsideTargetAndMessage added
2 parents 661a84e + bb3b920 commit d82cc97

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ maven:
4545
<dependency>
4646
<groupId>com.github.mreram</groupId>
4747
<artifactId>showcaseview</artifactId>
48-
<version>1.3.0</version>
48+
<version>1.4.0</version>
4949
</dependency>
5050
```
5151
gradle:
@@ -61,7 +61,7 @@ allprojects {
6161
```
6262
Step 2. Add the dependency
6363
```groovy
64-
implementation 'com.github.mreram:showcaseview:1.3.0'
64+
implementation 'com.github.mreram:showcaseview:1.4.0'
6565
```
6666
## Change type face
6767
```java
@@ -138,6 +138,7 @@ new GuideView.Builder(MainActivity.this)
138138
| outside | Dismissing with click on outside of MessageView |
139139
| anywhere | Dismissing with click on anywhere |
140140
| targetView | Dismissing with click on targetView(targetView is assigned with setTargetView method) |
141+
| outsideTargetAndMessage | Dismissing with click on outside of MessageView and target View |
141142

142143

143144

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 26
4+
compileSdkVersion 30
55
defaultConfig {
66
applicationId "smartdevelop.ir.eram.showcaseview"
7-
minSdkVersion 11
8-
targetSdkVersion 25
7+
minSdkVersion 14
8+
targetSdkVersion 30
99
versionCode 1
1010
versionName "1.0"
1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
35
package="ir.smartdevelop.eram.showcaseview">
46

57
<application
@@ -9,7 +11,9 @@
911
android:roundIcon="@mipmap/ic_launcher_round"
1012
android:supportsRtl="true"
1113
android:theme="@style/AppTheme">
12-
<activity android:windowSoftInputMode="stateHidden" android:name=".MainActivity">
14+
<activity
15+
android:name=".MainActivity"
16+
android:windowSoftInputMode="stateHidden">
1317
<intent-filter>
1418
<action android:name="android.intent.action.MAIN" />
1519

showcaseviewlib/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
defaultConfig {
1010
minSdkVersion 11
1111
targetSdkVersion 30
12-
versionCode 2
13-
versionName "1.3.0"
12+
versionCode 3
13+
versionName "1.4.0"
1414

1515
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1616

showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/GuideView.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ public boolean onTouchEvent(MotionEvent event) {
360360
dismiss();
361361
}
362362
break;
363+
364+
case outsideTargetAndMessage:
365+
if(!(targetRect.contains(x, y) || isViewContains(mMessageView, x, y))){
366+
dismiss();
367+
}
363368
}
364369
return true;
365370
}

showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/config/DismissType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* Created by Mohammad Reza Eram (https://github.com/mreram) on 27,November,2018
55
*/
66
public enum DismissType {
7-
outside, anywhere, targetView, selfView
7+
outside, anywhere, targetView, selfView, outsideTargetAndMessage
88
}

0 commit comments

Comments
 (0)