spinner while loading
This commit is contained in:
parent
ebbb4deeb9
commit
9f5138a9f5
|
@ -9,6 +9,7 @@ sub init()
|
|||
m.infoGroup = m.top.FindNode("infoGroup")
|
||||
m.songListRect = m.top.FindNode("songListRect")
|
||||
|
||||
m.songList.observeField("doneLoading", "onDoneLoading")
|
||||
m.spinner = m.top.findNode("spinner")
|
||||
m.spinner.visible = true
|
||||
|
||||
|
@ -24,7 +25,6 @@ end sub
|
|||
' Set values for displayed values on screen
|
||||
sub pageContentChanged()
|
||||
item = m.top.pageContent
|
||||
m.spinner.visible = false
|
||||
|
||||
setPosterImage(item.posterURL)
|
||||
setScreenTitle(item.json)
|
||||
|
@ -165,6 +165,11 @@ sub createDialogPallete()
|
|||
}
|
||||
end sub
|
||||
|
||||
sub onDoneLoading()
|
||||
m.songList.unobservefield("doneLoading")
|
||||
m.spinner.visible = false
|
||||
end sub
|
||||
|
||||
sub OnScreenHidden()
|
||||
m.spinner.visible = false
|
||||
end sub
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
sub init()
|
||||
m.spinner = m.top.findNode("spinner")
|
||||
|
||||
m.top.content = getData()
|
||||
m.top.setfocus(true)
|
||||
end sub
|
||||
|
@ -21,11 +19,7 @@ function getData()
|
|||
|
||||
m.top.content = data
|
||||
|
||||
hideSpinner()
|
||||
m.top.doneLoading = true
|
||||
|
||||
return data
|
||||
end function
|
||||
|
||||
sub hideSpinner()
|
||||
m.spinner.visible = false
|
||||
end sub
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="MusicAlbumSongList" extends="MarkupList">
|
||||
<children>
|
||||
<Spinner id="spinner" translation="[485, 150]" />
|
||||
</children>
|
||||
<interface>
|
||||
<field id="MusicArtistAlbumData" type="assocarray" onChange="getData" />
|
||||
<field id="doneLoading" type="boolean" value="false"/>
|
||||
</interface>
|
||||
<script type="text/brightscript" uri="MusicAlbumSongList.brs" />
|
||||
</component>
|
||||
|
|
Loading…
Reference in New Issue
Block a user