Stay organized with collections
Save and categorize content based on your preferences.
PluginStub
public
interface
PluginStub
android.webkit.PluginStub
|
This interface is used to implement plugins in a WebView. A plugin
package may extend this class and implement the abstract functions to create
embedded or fullscreeen views displayed in a WebView. The PluginStub
implementation will be provided the same NPP instance that is created
through the native interface.
Summary
Public methods |
abstract
View
|
getEmbeddedView(int NPP, Context context)
Return a custom embedded view to draw the plugin.
|
abstract
View
|
getFullScreenView(int NPP, Context context)
Return a custom full-screen view to be displayed when the user requests
a plugin display as full-screen.
|
Public methods
getEmbeddedView
public abstract View getEmbeddedView (int NPP,
Context context)
Return a custom embedded view to draw the plugin.
Parameters |
NPP |
int : The native NPP instance. |
context |
Context : The current application's Context. |
Returns |
View |
A custom View that will be managed by WebView. |
getFullScreenView
public abstract View getFullScreenView (int NPP,
Context context)
Return a custom full-screen view to be displayed when the user requests
a plugin display as full-screen. Note that the application may choose not
to display this View as completely full-screen.
Parameters |
NPP |
int : The native NPP instance. |
context |
Context : The current application's Context. |
Returns |
View |
A custom View that will be managed by the application. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PluginStub\n\nAdded in [API level 5](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nPluginStub\n==========\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/webkit/PluginStub \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nPluginStub\n`\n\n\n`\n\n\n`\n\n|---------------------------|\n| android.webkit.PluginStub |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis interface is used to implement plugins in a WebView. A plugin\npackage may extend this class and implement the abstract functions to create\nembedded or fullscreeen views displayed in a WebView. The PluginStub\nimplementation will be provided the same NPP instance that is created\nthrough the native interface.\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[View](/reference/android/view/View) | ` `[getEmbeddedView](/reference/android/webkit/PluginStub#getEmbeddedView(int,%20android.content.Context))`(int NPP, `[Context](/reference/android/content/Context)` context) ` Return a custom embedded view to draw the plugin. |\n| ` abstract `[View](/reference/android/view/View) | ` `[getFullScreenView](/reference/android/webkit/PluginStub#getFullScreenView(int,%20android.content.Context))`(int NPP, `[Context](/reference/android/content/Context)` context) ` Return a custom full-screen view to be displayed when the user requests a plugin display as full-screen. |\n\nPublic methods\n--------------\n\n### getEmbeddedView\n\nAdded in [API level 5](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract View getEmbeddedView (int NPP, \n Context context)\n```\n\nReturn a custom embedded view to draw the plugin.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|------------------------------------------------------|\n| `NPP` | `int`: The native NPP instance. \u003cbr /\u003e |\n| `context` | `Context`: The current application's Context. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------|-------------------------------------------------------|\n| [View](/reference/android/view/View) | A custom View that will be managed by WebView. \u003cbr /\u003e |\n\n### getFullScreenView\n\nAdded in [API level 5](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract View getFullScreenView (int NPP, \n Context context)\n```\n\nReturn a custom full-screen view to be displayed when the user requests\na plugin display as full-screen. Note that the application may choose not\nto display this View as completely full-screen.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|------------------------------------------------------|\n| `NPP` | `int`: The native NPP instance. \u003cbr /\u003e |\n| `context` | `Context`: The current application's Context. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------|---------------------------------------------------------------|\n| [View](/reference/android/view/View) | A custom View that will be managed by the application. \u003cbr /\u003e |"]]