Skip to content

Commit 4eeb3e6

Browse files
committed
Update code docs
1 parent 06c6326 commit 4eeb3e6

5 files changed

Lines changed: 16 additions & 37 deletions

docs/components_search_SearchResults.bs.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
m.searchSelect = m.top.findnode("searchSelect")
1313
m.searchTask = CreateObject("roSGNode", "SearchTask")
1414

15-
'set label text
1615
m.searchHelpText = m.top.findNode("SearchHelpText")
17-
m.searchHelpText.text = tr("You can search for Titles, People, Live TV Channels and more")
1816

1917
end sub
2018

@@ -27,6 +25,7 @@
2725
'if search task is running and user selectes another letter stop the search and load the next letter
2826
m.searchTask.control = "stop"
2927
if isValid(query) and query <> ""
28+
m.searchHelpText.visible = false
3029
startLoadingSpinner(false)
3130
end if
3231
m.searchTask.observeField("results", "loadResults")
@@ -42,16 +41,14 @@
4241
stopLoadingSpinner()
4342
m.searchSelect.itemdata = m.searchTask.results
4443
m.searchSelect.query = m.top.SearchAlpha
45-
m.searchHelpText.visible = false
44+
4645
if m.searchTask.results.TotalRecordCount = 0
4746
' make sure focus is on the keyboard
4847
if m.searchSelect.isinFocusChain()
4948
m.searchAlphabox.setFocus(true)
5049
end if
5150
return
5251
end if
53-
m.searchAlphabox = m.top.findnode("searchResults")
54-
m.searchAlphabox.translation = "[470, 85]"
5552
end sub
5653

5754
function onKeyEvent(key as string, press as boolean) as boolean

docs/components_search_SearchRow.bs.html

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,20 @@
1111
m.top.itemComponentName = "ListPoster"
1212
m.top.content = getData()
1313

14-
updateSize()
15-
16-
m.top.showRowLabel = [true]
17-
m.top.rowLabelOffset = [0, 20]
18-
m.top.showRowCounter = [true]
14+
' override defaults
15+
m.top.rowLabelOffset = [0, 21]
16+
m.top.vertFocusAnimationStyle = "fixedFocus"
17+
m.top.rowFocusAnimationStyle = "fixedFocus"
18+
m.top.focusXOffset = [0]
19+
m.top.rowLabelOffset = [0, 21]
20+
m.top.translation = [491, 165]
21+
m.top.itemSize = [1325, 346] ' this is used for setting the row size
22+
m.top.itemSpacing = [0, 105]
23+
m.top.rowItemSize = [311, 346]
24+
m.top.numRows = 3
1925

2026
' TODO - Define a failed to load image background
2127
' m.top.failedBitmapURI
22-
23-
end sub
24-
25-
sub updateSize()
26-
' In search results, rowSize only dictates how many are on screen at once
27-
m.top.rowSize = 3
28-
29-
dimensions = m.top.getScene().currentDesignResolution
30-
31-
border = 50
32-
m.top.translation = [border, border + 115]
33-
34-
textHeight = 80
35-
itemWidth = (dimensions["width"] - border) / 6
36-
itemHeight = itemWidth + (textHeight / 2.3)
37-
38-
m.top.itemSize = [1350, itemHeight] ' this is used for setting the row size
39-
m.top.itemSpacing = [0, 105]
40-
41-
m.top.rowItemSize = [itemWidth, itemHeight]
42-
m.top.rowItemSpacing = [0, 0]
43-
m.top.numRows = 2
44-
m.top.translation = "[12,18]"
4528
end sub
4629

4730
function getData()

docs/components_ui_rowlist_JRRowList.bs.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
m.top.showRowCounter = [true]
88
m.top.rowFocusAnimationStyle = "fixedFocusWrap"
99
m.top.vertFocusAnimationStyle = "fixedFocusWrap"
10-
m.top.horizFocusAnimationStyle = "fixedFocusWrap"
1110
m.top.focusBitmapBlendColor = colorConstants.primary ' color of the item selector
1211
m.top.itemSpacing = [0, 105] ' spacing between rows
1312
m.top.rowItemSpacing = [27, 0] ' spacing between items in a row
@@ -16,7 +15,7 @@
1615

1716
m.top.rowLabelOffset = [96, 21] ' align row label with edge of "action" safe zone
1817
m.top.rowLabelColor = colorConstants.text_primary
19-
m.top.rowLabelFont = "font:MediumBoldSystemFont"
18+
m.top.rowLabelFont = "font:MediumSystemFont"
2019
m.top.rowLabelFont.size = m.global.constants.font_sizes.medium
2120

2221
end sub

docs/data/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/module-SearchRow.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)