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

Commit

Permalink
Added new dismissType (outsideTargetAndMessage)
Browse files Browse the repository at this point in the history
new dismissType - outsideTargetAndMessage added
  • Loading branch information
mreram authored Aug 31, 2021
2 parents 661a84e + bb3b920 commit d82cc97
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ maven:
<dependency>
<groupId>com.github.mreram</groupId>
<artifactId>showcaseview</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>
</dependency>
```
gradle:
Expand All @@ -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
Expand Down Expand Up @@ -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 |



Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="ir.smartdevelop.eram.showcaseview">

<application
Expand All @@ -9,7 +11,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:windowSoftInputMode="stateHidden" android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
4 changes: 2 additions & 2 deletions showcaseviewlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d82cc97

Please sign in to comment.