-
Notifications
You must be signed in to change notification settings - Fork 0
Details background #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ibrkhalil
wants to merge
17
commits into
develop
Choose a base branch
from
detailsBackground
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
60cb640
Made the interface to exchange information from item to hero
ibrkhalil fb2afc8
removed .vscode folder
ibrkhalil 8e4e167
removed .vscode folder
ibrkhalil 968d8a3
Added basic animations in the design provided by Mr. Hossam
ibrkhalil 3836106
replaced the global node with getScene()
ibrkhalil 5ff064b
Mr. Mostafa Changed applied
ibrkhalil d44b76a
made the layout group for details
ibrkhalil 6cbdad2
handled back button
ibrkhalil a68d573
added tags
ibrkhalil e9495c0
still need to make circular button
ibrkhalil d8ab48e
did Mr. Mostafa's Changes
ibrkhalil 2e6c86b
handled crash and changes
ibrkhalil bffe827
removed the new SceneGraph screen and added a UI screen
ibrkhalil eb2539b
made the changes
ibrkhalil 495f0ce
Delete .history directory
ibrkhalil 14f1569
Delete .clj-kondo/.cache/2021.09.25 directory
ibrkhalil e40ac99
Simplify the code and fix it
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| out/ | ||
| out/roku-deploy.zip | ||
| .vscode/ |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <component name="ItemDetailsScreen" extends="Group" initialFocus="ButtonGroup"> | ||
| <script type="text/brightscript" uri="itemDetailsScreen.brs" /> | ||
| <interface> | ||
| <field id="content" type="node" /> | ||
| <function name="focusWatch" /> | ||
| <function name="focusPlus" /> | ||
| </interface> | ||
| <children> | ||
| <LayoutGroup id="mainContent" translation="[640,400]" layoutDirection="vert" itemSpacings="20" vertAlignment="center" horizAlignment="center"> | ||
| <Label id="itemTitle" /> | ||
| <Label id="itemDescription" /> | ||
| <Label id="itemTags" /> | ||
| <Label id="itemTime" /> | ||
| <ButtonGroup id="ButtonGroup" layoutDirection="horiz" itemSpacings="16"> | ||
| <Button id="watch" text="WATCH" iconUri="" focusedIconUri="" minWidth="120" maxWidth="260" /> | ||
| <Button id="plus" iconUri="pkg:/components/icons/plusicon.png" focusedIconUri="pkg:/components/icons/plus.png" minWidth="50" maxWidth="80" /> | ||
| </ButtonGroup> | ||
| </LayoutGroup> | ||
| </children> | ||
| </component> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <component name="RowItemDataContent" extends="ContentNode"> | ||
| <interface> | ||
| <field id="title" type="string" /> | ||
| <field id="hdPosterURL" type="string" /> | ||
| <field id="description" type="string" /> | ||
| <field id="tags" type="array" /> | ||
| <field id="time" type="integer" /> | ||
| </interface> | ||
| <children></children> | ||
| </component> |
File renamed without changes.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <component name="RowListScene" extends="Scene" initialFocus="mainRowList"> | ||
| <script type="text/brightscript" uri="rowListScene.brs" /> | ||
| <children> | ||
| <Poster id="mainOverlay" opacity="1.0" uri="https://besthqwallpapers.com/Uploads/3-2-2018/39425/4k-material-design-art-lollipop-geometric-shapes.jpg" height="1080" width="1920" loadDisplayMode="limitSize" /> | ||
| <Group id="heroDetails" translation="[50,0]" opacity="0.0"> | ||
| <Poster id="providerLogo" translation="[0,20]" /> | ||
| <Label id="mainBoldLabel" translation="[0,80]" width="540" wrap="true" maxLines="2" font="font:LargeBoldSystemFont" /> | ||
| <Label id="dateAndDurationLabel" translation="[0,160]" font="font:MediumBoldSystemFont" /> | ||
| <Label id="descriptionLabel" translation="[0,210]" width="540" wrap="true" maxLines="2" font="font:MediumSystemFont" /> | ||
| <Label id="categoryLabel" translation="[0,300]" font="font:LargeBoldSystemFont" /> | ||
| </Group> | ||
| <Animation id="fadeInAnimation" duration="0.4" repeat="false" easeFunction="linear"> | ||
| <!-- <Vector2DFieldInterpolator key="[0.0, 1.0]" keyValue="[ [60,0], [70,0] ]" fieldToInterp="heroDetails.translation" /> --> | ||
| <FloatFieldInterpolator key="[0.0, 0.25, 0.5, 0.75, 1.0]" keyValue="[0.0, 0.25, 0.5, 0.75, 1.0]" fieldToInterp="heroDetails.opacity" /> | ||
| <FloatFieldInterpolator key="[0.0, 0.25, 0.5, 0.75, 1.0]" keyValue="[0.0, 0.25, 0.5, 0.75, 1.0]" fieldToInterp="mainOverlay.opacity" /> | ||
| </Animation> | ||
| <Animation id="fadeOutAnimation" duration="0.4" repeat="false" easeFunction="linear"> | ||
| <!-- <Vector2DFieldInterpolator key="[0.0, 1.0]" keyValue="[ [70,0], [60,0] ]" fieldToInterp="heroDetails.translation" /> --> | ||
| <FloatFieldInterpolator key="[0.0, 0.25, 0.5, 0.75, 1.0]" keyValue="[1.0, 0.75, 0.5, 0.25, 0.0]" fieldToInterp="heroDetails.opacity" /> | ||
| <FloatFieldInterpolator key="[0.0, 0.25, 0.5, 0.75, 1.0]" keyValue="[1.0, 0.75, 0.5, 0.25, 0.0]" fieldToInterp="mainOverlay.opacity" /> | ||
| </Animation> | ||
| <RowList id="mainRowList" rowSpacings="[0.0]" focusXOffset="[-150.0]" translation="[ 0, 480 ]" rowLabelOffset="[[220.0,-6.0]]" itemComponentName="RowListItem" numRows="2" itemSize="[ 1608, 250 ]" rowItemSize="[ [368, 250] ]" rowHeights="[250.0]" vertFocusAnimationStyle="fixedFocusWrap" rowFocusAnimationStyle="fixedFocusWrap" showRowLabel="[true]" rowItemSpacing="[[0.0,0.0]]" drawFocusFeedback="false" rowLabelFont="font:LargeBoldSystemFont" /> | ||
| </children> | ||
| </component> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| sub init() | ||
| m.mainContent = m.top.findNode("mainContent") | ||
| m.itemTitle = m.mainContent.findNode("itemTitle") | ||
| m.itemDescription = m.mainContent.findNode("itemDescription") | ||
| m.itemTags = m.mainContent.findNode("itemTags") | ||
| m.itemTime = m.mainContent.findNode("itemTime") | ||
| m.ButtonGroup = m.mainContent.findNode("ButtonGroup") | ||
| m.top.ObserveField("content", "handleItemDetails") | ||
| m.ButtonGroup.focusedTextFont = "font:LargeBoldSystemFont" | ||
| m.ButtonGroup.textFont = "font:LargeBoldSystemFont" | ||
| m.ButtonGroup.vertAlignment = "center" | ||
| m.ButtonGroup.horizAlignment = "center" | ||
|
|
||
|
|
||
| ratio = m.global.ratio | ||
|
|
||
| m.mainContent.translation = [cint(m.mainContent.translation[0] * ratio), cint(m.mainContent.translation[1] * ratio)] | ||
|
|
||
| m.watch = m.ButtonGroup.findNode("watch") | ||
| m.plus = m.ButtonGroup.findNode("plus") | ||
| end sub | ||
|
|
||
| sub handleItemDetails() | ||
| m.itemTitle.text = m.top.content.title | ||
| m.itemDescription.text = m.top.content.description | ||
| m.itemTime.text = "Duration : " + formatDuration(m.top.content.time) + " Hour(s)" | ||
| if m.top.content.tags <> invalid | ||
| seperator = "" | ||
| for each tag in m.top.content.tags | ||
| m.itemTags.text += seperator + tag | ||
| seperator = " - " | ||
| end for | ||
| else | ||
| m.itemTags.text = "No tags available" | ||
| end if | ||
| end sub | ||
|
|
||
| function formatDuration(duration as integer) as string | ||
| minutes = (duration \ 60).toStr() | ||
| seconds = (duration MOD 60).toStr() | ||
| if len(seconds) < 2 | ||
| seconds = "0" + seconds | ||
| end if | ||
| return minutes + ":" + seconds | ||
| end function | ||
|
|
||
| sub focusWatch() | ||
| m.watch.setFocus(true) | ||
| end sub | ||
|
|
||
| sub focusPlus() | ||
| m.plus.setFocus(true) | ||
| end sub | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,31 @@ | ||
| sub init() | ||
| m.global.http.request = { payload: { | ||
| m.http = createObject("roSGNode", "httpTask") | ||
| m.http.request = { | ||
| payload: { | ||
| userId: 1, | ||
| title: "WOW, IT WORKED ^_^", | ||
| }, url: "https://jsonplaceholder.typicode.com/albums", requestType: "GET"} | ||
| m.global.http.observeFieldScoped("response", "useResponse") | ||
| }, | ||
| url: "https://alghool.net/RokuDev/data.json", | ||
| requestType: "GET" | ||
| } | ||
| m.http.control = "RUN" | ||
| m.http.observeFieldScoped("response", "populateRowList") | ||
| end sub | ||
|
|
||
| sub useResponse() | ||
| ?m.global.http.response | ||
| sub populateRowList() | ||
| for each item in m.http.response.body | ||
| itemNode = m.top.createChild("ContentNode") | ||
| itemNode.title = item.title | ||
| for each data in item.data | ||
| itemData = itemNode.createChild("rowItemDataContent") | ||
| itemData.setFields({ | ||
| title: data.title | ||
| hdPosterURL: data.thumbnail | ||
| description: data.longDescription | ||
| tags: data.tags | ||
| time: data.time | ||
| }) | ||
| end for | ||
| m.top.appendChild(itemNode) | ||
| end for | ||
| end sub |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.