forked from react-native-webview/react-native-webview
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: custom action menu on android + improved iOS (react-native-webv…
…iew#2993) * Update RNCWebView.java * Update RNCWebView.java * wip * wip * fix build on latest xcode * add example + fix a few things * Update RNCWebViewImpl.m * fix macOS build
- Loading branch information
Showing
11 changed files
with
633 additions
and
274 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
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
24 changes: 24 additions & 0 deletions
24
android/src/main/java/com/reactnativecommunity/webview/events/TopCustomMenuSelectionEvent.kt
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,24 @@ | ||
package com.reactnativecommunity.webview.events | ||
|
||
import com.facebook.react.bridge.WritableMap | ||
import com.facebook.react.uimanager.events.Event | ||
import com.facebook.react.uimanager.events.RCTEventEmitter | ||
|
||
/** | ||
* Event emitted when there is a loading progress event. | ||
*/ | ||
class TopCustomMenuSelectionEvent(viewId: Int, private val mEventData: WritableMap) : | ||
Event<TopCustomMenuSelectionEvent>(viewId) { | ||
companion object { | ||
const val EVENT_NAME = "topCustomMenuSelection" | ||
} | ||
|
||
override fun getEventName(): String = EVENT_NAME | ||
|
||
override fun canCoalesce(): Boolean = false | ||
|
||
override fun getCoalescingKey(): Short = 0 | ||
|
||
override fun dispatch(rctEventEmitter: RCTEventEmitter) = | ||
rctEventEmitter.receiveEvent(viewTag, eventName, mEventData) | ||
} |
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
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
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
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
Oops, something went wrong.