Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Default empty project template
- import bb.cascades 1.0
- // creates one page with a label
- Page {
- Container {
- id: containerID
- topPadding: 20.0
- layout: StackLayout {
- }
- background: Color.create("#262626")
- Container {
- layout: DockLayout {
- }
- horizontalAlignment: HorizontalAlignment.Center
- ImageView {
- id: night
- imageSource: "asset:///images/night.jpg"
- horizontalAlignment: HorizontalAlignment.Center
- }
- ImageView {
- id: day
- imageSource: "asset:///images/day.jpg"
- opacity: 0.0
- horizontalAlignment: HorizontalAlignment.Center
- }
- }
- Container {
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
- topPadding: 25.0
- bottomPadding: 25.0
- leftPadding: 20.0
- rightPadding: 20.0
- ImageView {
- imageSource: "asset:///images/moon.png"
- horizontalAlignment: HorizontalAlignment.Center
- }
- Slider {
- leftMargin: 20.0
- rightMargin: 20.0
- horizontalAlignment: HorizontalAlignment.Fill
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1.0
- }
- onImmediateValueChanged: {
- // This is where the day-night opacity value is done.
- day.opacity = immediateValue;
- }
- }
- ImageView {
- imageSource: "asset:///images/sun.png"
- horizontalAlignment: HorizontalAlignment.Center
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement