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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# SurfaceHolderGlueHost\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1 \nSummary: [Methods](#pubmethods) \\| [\\[Expand All\\]](#) \n\nSurfaceHolderGlueHost\n=====================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\n\n\ninterface\nSurfaceHolderGlueHost\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------------------|\n| android.support.v17.leanback.media.SurfaceHolderGlueHost |\n\n|---|---|\n| Known Indirect Subclasses [VideoFragmentGlueHost](/reference/android/support/v17/leanback/app/VideoFragmentGlueHost),[VideoSupportFragmentGlueHost](/reference/android/support/v17/leanback/app/VideoSupportFragmentGlueHost) |----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [VideoFragmentGlueHost](/reference/android/support/v17/leanback/app/VideoFragmentGlueHost) | *This class was deprecated in API level 27.1.0. use [VideoSupportFragmentGlueHost](/reference/android/support/v17/leanback/app/VideoSupportFragmentGlueHost)* | | [VideoSupportFragmentGlueHost](/reference/android/support/v17/leanback/app/VideoSupportFragmentGlueHost) | [PlaybackGlueHost](/reference/android/support/v17/leanback/media/PlaybackGlueHost) implementation the interaction between [PlaybackGlue](/reference/android/support/v17/leanback/media/PlaybackGlue) and [VideoSupportFragment](/reference/android/support/v17/leanback/app/VideoSupportFragment). | ||\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nOptional interface to be implemented by any subclass of [PlaybackGlueHost](/reference/android/support/v17/leanback/media/PlaybackGlueHost) that contains\na [SurfaceView](https://developer.android.com/reference/android/view/SurfaceView.html). This will allow subclass of [PlaybackGlue](/reference/android/support/v17/leanback/media/PlaybackGlue) to setup\nthe surface holder callback during [setHost(PlaybackGlueHost)](/reference/android/support/v17/leanback/media/PlaybackGlue#setHost(android.support.v17.leanback.media.PlaybackGlueHost)). \n**See also:**\n\n- [setHost(PlaybackGlueHost)](/reference/android/support/v17/leanback/media/PlaybackGlue#setHost(android.support.v17.leanback.media.PlaybackGlueHost))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[setSurfaceHolderCallback](/reference/android/support/v17/leanback/media/SurfaceHolderGlueHost#setSurfaceHolderCallback(android.view.SurfaceHolder.Callback))`(`[SurfaceHolder.Callback](https://developer.android.com/reference/android/view/SurfaceHolder.Callback.html)` callback) ` Sets the [SurfaceHolder.Callback](https://developer.android.com/reference/android/view/SurfaceHolder.Callback.html) on the the host. |\n\nPublic methods\n--------------\n\n### setSurfaceHolderCallback\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid setSurfaceHolderCallback (SurfaceHolder.Callback callback)\n```\n\nSets the [SurfaceHolder.Callback](https://developer.android.com/reference/android/view/SurfaceHolder.Callback.html) on the the host.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------|\n| `callback` | `SurfaceHolder.Callback` \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [SurfaceHolderGlueHost](/reference/android/support/v17/leanback/media/SurfaceHolderGlueHost)\n-\n\n Classes\n -------\n\n - [MediaControllerAdapter](/reference/android/support/v17/leanback/media/MediaControllerAdapter)\n - [MediaControllerGlue](/reference/android/support/v17/leanback/media/MediaControllerGlue)\n - [MediaPlayerAdapter](/reference/android/support/v17/leanback/media/MediaPlayerAdapter)\n - [PlaybackBannerControlGlue](/reference/android/support/v17/leanback/media/PlaybackBannerControlGlue)\n - [PlaybackBaseControlGlue](/reference/android/support/v17/leanback/media/PlaybackBaseControlGlue)\n - [PlaybackControlGlue](/reference/android/support/v17/leanback/media/PlaybackControlGlue)\n - [PlaybackGlue](/reference/android/support/v17/leanback/media/PlaybackGlue)\n - [PlaybackGlue.PlayerCallback](/reference/android/support/v17/leanback/media/PlaybackGlue.PlayerCallback)\n - [PlaybackGlueHost](/reference/android/support/v17/leanback/media/PlaybackGlueHost)\n - [PlaybackGlueHost.HostCallback](/reference/android/support/v17/leanback/media/PlaybackGlueHost.HostCallback)\n - [PlaybackGlueHost.PlayerCallback](/reference/android/support/v17/leanback/media/PlaybackGlueHost.PlayerCallback)\n - [PlaybackTransportControlGlue](/reference/android/support/v17/leanback/media/PlaybackTransportControlGlue)\n - [PlayerAdapter](/reference/android/support/v17/leanback/media/PlayerAdapter)\n - [PlayerAdapter.Callback](/reference/android/support/v17/leanback/media/PlayerAdapter.Callback)"]]