This file contains hidden or 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
| class IconHeaderItemPresenter : RowHeaderPresenter() { | |
| override fun onCreateViewHolder(viewGroup: ViewGroup): ViewHolder { | |
| // inflate layout | |
| } | |
| override fun onBindViewHolder(viewHolder: Presenter.ViewHolder, item: Any) { | |
| // set text, icons, etc. | |
| } |
This file contains hidden or 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
| val program = PreviewProgram.Builder() | |
| .setChannelId(channelId) | |
| // Matches the intent filter in the manifest for VIEW action | |
| .setIntentUri(Uri.parse("https://.../program/$id")) | |
| .build() | |
| helper.publishPreviewProgram(program) |
This file contains hidden or 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
| val channelId = helper.publishChannel(previewChannel) |
This file contains hidden or 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
| val helper = PreviewChannelHelper(context) |
This file contains hidden or 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
| .build() |
This file contains hidden or 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
| .setLogo(bitmap) |
This file contains hidden or 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
| val previewChannel = PreviewChannel.Builder() | |
| .setDisplayName(name) | |
| .setDescription(description) | |
| .setAppLinkIntentUri(Uri.parse(deeplinkUri)) | |
| .setInternalProviderId(getPlaylistId()) |
This file contains hidden or 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
| PreviewChannelHelper(context).publishWatchNextProgram(program) |
This file contains hidden or 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
| .setWatchNextType( | |
| WatchNextPrograms.WATCH_NEXT_TYPE_CONTINUE) | |
| .setContentId(myProgramId) | |
| .setType(PreviewPrograms.TYPE_MOVIE) | |
| .setTitle("Program Title") | |
| .setDescription("Program Description") | |
| .setPosterArtUri( | |
| Uri.parse("http://example.com/poster_art.png")) | |
| .setLastEngagementTimeUtcMillis(System.currentTimeMillis()) | |
| Then you build |
This file contains hidden or 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
| val program = WatchNextProgram.Builder() |