I am using a customer view, and I need to add a photo from the grid feed instead of the thumbnail. I cannot figure ut how to do this without changing the thumbnail. Is there a way to keep the thumbnail intact, and add a sperate photo for the CustomView? Below is the code. Would like to replace thumbnail with another image. Again, my app is a basic Roku SGDEX (scenegraph developer extensions) Custom + Screen
'''
'''parse from GridHandler
''' DetialsPosterUrl would be my custom image to replace the the thumbnail in the CustomView
function ParseMediaItemToNode(mediaItem as Object, mediaType as String) as Object
itemNode = Utils_AAToContentNode({
"id": mediaItem.id
"title": mediaItem.title
"hdPosterUrl": mediaItem.thumbnail
"detailsPosterURL": mediaItem.detailsPoster
"Description": mediaItem.shortDescription
"Categories": mediaItem.genres[0]
})
''' CustomView
sub ShowCustomView(hdPosterUrl as String)
m.customView = CreateObject("roSGNode", "custom")
m.customView.picPath = hdPosterUrl
m.top.ComponentController.CallFunc("show", {
view: m.customView
})
end sub
'''deails view
sub OnDetailsContentSet(event as Object)
details = event.GetRoSGNode()
currentItem = event.GetData()
if currentItem <> invalid
buttonsToCreate = []
if currentItem.url <> invalid and currentItem.url <> ""
buttonsToCreate.Push({ title: "Play", id: "play" })
else if details.content.TITLE = "series"
buttonsToCreate.Push({ title: "Episodes", id: "episodes" })
else if details.content.TITLE = "SERIES"
buttonsToCreate.Push({ title: "Episodes", id: "episodes" })
end if
buttonsToCreate.Push({ title: "Details", id: "thumbnail" })
'''
''' (more code irrevelant to topic)
'''
else if selectedButton.id = "thumbnail"
if details.currentItem.hdPosterUrl <> invalid then
ShowCustomView(details.currentItem.hdPosterUrl)
end if
'''
custom.xml
''''
<?xml version="1.0" encoding="utf-8" ?>
<component name="custom" extends="Group" >
<interface>
<field id="picPath" type="string" alias="thumbnail.uri" />
</interface>
<children>
<Poster id="thumbnail" translation="[0,0]" width="1280" height="720" />
</children>
</component>
''''