Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Technologx
Visitor

How to create a RSS channel?

How do I go about creating a RSS channel with a overhang panel? This is what I have I'm not to sure on how to go about doing this.

MainScence.xml
<?xml version="1.0" encoding="UTF-8" ?>
<component name="MainScene" extends="Scene" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
    <!-- importing main handler -->
    <script type="text/brightscript" uri="pkg:/components/MainScene.brs" />
    
    <children>
        
        <LoadingIndicator
            id="loadingProgress"
            imageUri="pkg:/images/loader.png"
            backgroundColor="0x000000"
             imageWidth="100"
            fadeInterval ="0.2"
        
             text="Loading..."/>
        
    </children>
    
</component>
<rss version="2.0">

<channel>
  <title>Technologx Home Page</title>
  <link>https://technologx.com</link>
  <description>News, Tutorials, Support, Downloads and more!</description>
  <item>
    <title>Adobe News</title>
    <link>http://www.w3schools.com/xml/xml_rss.asp</link>
    <description>New RSS tutorial on W3Schools</description>
  </item>
  <item>
    <title>XML Tutorial</title>
    <link>http://www.w3schools.com/xml</link>
    <description>New XML tutorial on W3Schools</description>
  </item>
</channel>

</rss>

<component name="categoriesListPanel" extends="ListPanel" >
 
<script type="text/brightscript" >
<![CDATA[
 
sub init()
  m.top.panelSize = "medium"
  m.top.focusable = true
  m.top.hasNextPanel = true
  m.top.leftOnly = true
  m.top.createNextPanelOnItemFocus = false
  m.top.selectButtonMovesPanelForward = true
  m.top.overhangTitle = "Technologx Menu"
  m.categorieslist = m.top.findNode("categorieslist")
  m.top.list = m.categorieslist
  end sub
 
]]>
</script>
 
<children>
 <label>showClock</label>
 <true/>
<LabelList id = "categorieslist" >
 
  <ContentNode role = "content" >
    <ContentNode
      title = "Renderable Nodes"
      description = "Basic Nodes That Show Things
      &#xA;
      &#xA;  &#8226; Rectangle
      &#xA;  &#8226; Label
      &#xA;  &#8226; Poster
      &#xA;  &#8226; Video"
      shortdescriptionline1="Renderable Node Markup"
      Url = "http://www.sdktestinglab.com/renderablegrid.xml" />
    <ContentNode
      title = "Z-Order/Parent-Child"
      description = "Scene Graph Tree Order Matters
      &#xA;
      &#xA;Demonstrates the basic concepts of Scene Graph element layering
and inheritance. In Roku Scene Graph, what's on the bottom of your XML tree goes
on top!"
      shortdescriptionline1="Z-Order/Parent-Child Markup"
      Url = "http://www.sdktestinglab.com/zordergrid.xml" />
    <ContentNode title = "Animations"
      description = "Fly Things Around and Flash Lights
      &#xA;
      &#xA;This shows you how to make your application more moving, by animating
screen elements. There are examples for all of the field interpolator nodes, plus
sequential and parallel animations."
      shortdescriptionline1="Animation Markup"  
      Url = "http://www.sdktestinglab.com/animationgrid.xml" />
    <ContentNode title = "Events and Observers"
      description = "React When Stuff Happens
      &#xA;
      &#xA;You need to handle events that come from both the user, and program
actions. You'll learn to use the onKeyEvent() and observeField() Scene Graph
functions to do this."  
      shortdescriptionline1="Events and Observers Markup"
      Url = "http://www.sdktestinglab.com/eventsobserversgrid.xml" />
  </ContentNode>
 
</LabelList>
 
</children>
 
</component>


MainScene.brs
' ********** Copyright 2016 Roku Corp.  All Rights Reserved. **********  

sub init()
    m.top.SetFocus(true)
    m.loadingProgress = m.top.findNode("loadingProgress")
    m.loadingProgress.visible = true
    m.loadingProgress.control = "start"
    
End sub

function onKeyEvent(key as String, press as Boolean) as Boolean
    result = false
    
    return result
end function

sub init()
  m.top.backgroundURI = "pkg:/images/panel.jpg"
 
  m.top.overhang.showClock = true
  m.top.overhang.showOptions = true
 
  m.categoriespanel = m.top.panelSet.createChild("categoriesListPanel")
 
  m.categoryinfopanel = m.top.panelset.createChild("categoryinfoPanel")
 
  m.categoriespanel.list.observeField("itemFocused","showcategoryinfo")
  m.categoryinfopanel.observeField("focusedChild","slideexamplesgridpanel")
 
  m.categoriespanel.setFocus(true)
end sub
 
sub showcategoryinfo()
  categorycontent = m.categoriespanel.list.content.getChild(m.categoriespanel.list.itemFocused)
  m.categoryinfopanel.description = categorycontent.description
  m.examplespanel = createObject("RoSGNode","examplesGridPanel")
  m.examplespanel.overhangtext = categorycontent.shortdescriptionline1
  m.examplespanel.gridcontenturi = categorycontent.Url
end sub
 
sub slideexamplesgridpanel()
  if not m.top.panelSet.isGoingBack
    m.top.panelSet.appendChild(m.examplespanel)
    m.examplespanel.setFocus(true)
  else
    m.categoriespanel.setFocus(true)
  end if
end sub
Technologx - Where we make things happen!
https://technologx.com
0 Kudos