Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create the widget
- let w = new ListWidget()
- w.backgroundColor = new Color("#1A1A1C")
- mainStack = w.addStack()
- leftStack = mainStack.addStack()
- mainStack.addSpacer()
- rightStack= mainStack.addStack()
- mainStack.layoutHorizontally()
- leftStack.layoutVertically()
- rightStack.layoutVertically()
- // Add the start balance title to the widget
- t = leftStack.addText("StartBalanceTitle")
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",15)
- // Add the start balance to the widget
- t = leftStack.addText("StartBalance")
- t.textColor = new Color("#FF3A30")
- t.font = new Font("San-Fransisco",12)
- // Add the current balance title to the widget
- t = leftStack.addText("CurrentBalanceTitle")
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",15)
- // Add the current balance to the widget
- t = leftStack.addText("CurrentBalance")
- t.textColor = new Color("#4CD964")
- t.font = new Font("San-Fransisco",12)
- // Add the current savings perecent title to the widget
- t = rightStack.addText("SavingsPercentTitle")
- t.rightAlignText()
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",15)
- rightStack.addSpacer(5)
- // Add the current savings percent to the widget
- t = rightStack.addText("SavingsPercent")
- t.rightAlignText()
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",12)
- rightStack.addSpacer(20)
- // Add the current savings title to the widget
- t = rightStack.addText("SavingsAmountTitle")
- t.rightAlignText()
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",15)
- rightStack.addSpacer(5)
- // Add the current savings to the widget
- t = rightStack.addText("SavingsAmount")
- t.rightAlignText()
- t.textColor = Color.white()
- t.font = new Font("San-Fransisco",12)
- //moves everything to the top
- w.addSpacer()
- w.presentMedium()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement