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

Commit

Permalink
Merge pull request #33 from TKshadow018/master
Browse files Browse the repository at this point in the history
added dismisstype selfView
  • Loading branch information
mreram authored Dec 24, 2019
2 parents c3c1cd0 + e764453 commit bab8533
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# :flashlight:ShowCaseView:flashlight:
[![](https://jitpack.io/v/TKshadow018/ShowCaseView.svg)](https://jitpack.io/#TKshadow018/ShowCaseView)
[![Release](https://jitpack.io/v/mreram/ShowCaseView.svg)](https://jitpack.io/#mreram/ShowCaseView)
[![APK](https://img.shields.io/badge/APK-Demo-brightgreen.svg)](https://github.com/mreram/ShowCaseView/raw/master/demo-flatShowCaseView.apk)
[![API](https://img.shields.io/badge/API-11%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=11) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FlatShowCaseView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6713)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected void onCreate(Bundle savedInstanceState) {
.setTitle("Guide Title Text")
.setContentText("Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
.setGravity(Gravity.center)
.setDismissType(DismissType.outside)
.setDismissType(DismissType.selfView)
.setTargetView(view1)
.setGuideListener(new GuideListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ public boolean onTouchEvent(MotionEvent event) {
}
break;

case selfView:
if (isViewContains(mMessageView, x, y)) {
dismiss();
}
break;
}
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
outside, anywhere, targetView, selfView
}

0 comments on commit bab8533

Please sign in to comment.