Skip to content

Commit

Permalink
Merge pull request #12 from droidekas/master
Browse files Browse the repository at this point in the history
Fix for #7 when enableDismissAfterShown is enabled
  • Loading branch information
29jitender authored Aug 2, 2016
2 parents 2321e27 + ac0e31d commit a02a2e1
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ public void onAnimationStart(Animation animation) {
public void onAnimationEnd(Animation animation) {
dismissOnTouch = true;
dismissOnBackPress = true;
enableDismissOnBackPress();
}

@Override
Expand Down Expand Up @@ -628,6 +629,12 @@ public void onAnimationRepeat(Animator animator) {

}

private void enableDismissOnBackPress() {
setFocusableInTouchMode(true);
setFocusable(true);
requestFocus();
}

private List<AnimPoint> checkLinePoint() {

//Screen Height
Expand Down Expand Up @@ -1041,9 +1048,7 @@ public SpotlightView build() {
spotlightView.padding);
spotlightView.setCircleShape(circle);
if (spotlightView.dismissOnBackPress) {
spotlightView.setFocusableInTouchMode(true);
spotlightView.setFocusable(true);
spotlightView.requestFocus();
spotlightView.enableDismissOnBackPress();
}
return spotlightView;
}
Expand Down

0 comments on commit a02a2e1

Please sign in to comment.