forked from rome2rio/react-native-touch-through-view
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #8 where the touch goes not through TouchThroughView
- Loading branch information
Simon Hoss
authored and
Simon Hoss
committed
Dec 22, 2017
1 parent
e7e6a06
commit aaeb029
Showing
5 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.rome2rio.android.reactnativetouchthroughview; | ||
|
||
import android.view.MotionEvent; | ||
|
||
public class TouchThroughTouchHandler { | ||
|
||
private TouchThroughTouchHandlerListener listener = null; | ||
|
||
public void setListener(TouchThroughTouchHandlerListener listener) { | ||
this.listener = listener; | ||
} | ||
|
||
public void handleTouchEvent(MotionEvent ev) { | ||
if (listener != null) { | ||
listener.handleTouch(ev); | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...a/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.rome2rio.android.reactnativetouchthroughview; | ||
|
||
import android.view.MotionEvent; | ||
|
||
public interface TouchThroughTouchHandlerInterface { | ||
public TouchThroughTouchHandler getTouchThroughTouchHandler(); | ||
} |
7 changes: 7 additions & 0 deletions
7
...va/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.rome2rio.android.reactnativetouchthroughview; | ||
|
||
import android.view.MotionEvent; | ||
|
||
public abstract class TouchThroughTouchHandlerListener { | ||
abstract void handleTouch(MotionEvent ev); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters