diff --git a/README.md b/README.md index dfe8b09..ba6e376 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ maven: com.github.mreram showcaseview - 1.3.0 + 1.4.0 ``` gradle: @@ -61,7 +61,7 @@ allprojects { ``` Step 2. Add the dependency ```groovy -implementation 'com.github.mreram:showcaseview:1.3.0' +implementation 'com.github.mreram:showcaseview:1.4.0' ``` ## Change type face ```java @@ -138,6 +138,7 @@ new GuideView.Builder(MainActivity.this) | outside | Dismissing with click on outside of MessageView | | anywhere | Dismissing with click on anywhere | | targetView | Dismissing with click on targetView(targetView is assigned with setTargetView method) | +| outsideTargetAndMessage | Dismissing with click on outside of MessageView and target View | diff --git a/app/build.gradle b/app/build.gradle index e9bb38e..d0a7ca7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 + compileSdkVersion 30 defaultConfig { applicationId "smartdevelop.ir.eram.showcaseview" - minSdkVersion 11 - targetSdkVersion 25 + minSdkVersion 14 + targetSdkVersion 30 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 00fa980..a78346c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,7 @@ - - + diff --git a/showcaseviewlib/build.gradle b/showcaseviewlib/build.gradle index 2fd9382..90d5b75 100644 --- a/showcaseviewlib/build.gradle +++ b/showcaseviewlib/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 11 targetSdkVersion 30 - versionCode 2 - versionName "1.3.0" + versionCode 3 + versionName "1.4.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/GuideView.java b/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/GuideView.java index 33444b2..4945d6c 100644 --- a/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/GuideView.java +++ b/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/GuideView.java @@ -360,6 +360,11 @@ public boolean onTouchEvent(MotionEvent event) { dismiss(); } break; + + case outsideTargetAndMessage: + if(!(targetRect.contains(x, y) || isViewContains(mMessageView, x, y))){ + dismiss(); + } } return true; } diff --git a/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/config/DismissType.java b/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/config/DismissType.java index 7366aab..f97eb2c 100644 --- a/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/config/DismissType.java +++ b/showcaseviewlib/src/main/java/smartdevelop/ir/eram/showcaseviewlib/config/DismissType.java @@ -4,5 +4,5 @@ * Created by Mohammad Reza Eram (https://github.com/mreram) on 27,November,2018 */ public enum DismissType { - outside, anywhere, targetView, selfView + outside, anywhere, targetView, selfView, outsideTargetAndMessage } \ No newline at end of file