Permalink
Browse files

minor enhancements

  • Loading branch information...
1 parent 0b6f6d7 commit dbda7ac666a88f535a6537ea47a60bbbe5af2769 @shaque committed Mar 18, 2013
@@ -0,0 +1,40 @@
+import bb.cascades 1.0
+
+NavigationPane {
+ backButtonsVisible: false
+ peekEnabled: true
+ Page {
+ titleBar: TitleBar {
+ title: qsTr("Composer")
+ acceptAction: ActionItem {
+ title: qsTr("Share")
+ onTriggered: {
+ _app.cardDone(qsTr("Content Shared."));
+ }
+ }
+ dismissAction: ActionItem {
+ title: qsTr("Cancel")
+ onTriggered: {
+ _app.cardDone(qsTr("Dont feel like sharing today?"));
+ }
+ }
+ }
+ Container {
+ horizontalAlignment: HorizontalAlignment.Fill
+ Header {
+ title: qsTr("Share via Sample Composer")
+ }
+ Container {
+ horizontalAlignment: HorizontalAlignment.Fill
+ TextArea {
+ horizontalAlignment: HorizontalAlignment.Center
+ preferredHeight: 400
+ text: _app.data
+ onCreationCompleted: {
+ requestFocus();
+ }
+ }
+ }
+ }
+ }
+}
@@ -34,7 +34,7 @@ Container {
textStyle {
base: SystemDefaults.TextStyles.BodyText
- color: Color.Black
+ color: Color.White
fontStyle: FontStyle.Italic
}
@@ -0,0 +1,94 @@
+import bb.cascades 1.0
+
+NavigationPane {
+ backButtonsVisible: false
+ peekEnabled: true
+ Page {
+ titleBar: TitleBar {
+ title: qsTr("Pick an Egg")
+ dismissAction: ActionItem {
+ title: qsTr("Cancel")
+ onTriggered: {
+ _app.cardDone(qsTr("Boo! No eggs today.."));
+ }
+ }
+ }
+ Container {
+ layout: DockLayout {
+ }
+ horizontalAlignment: HorizontalAlignment.Fill
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Left
+ verticalAlignment: VerticalAlignment.Top
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Yummy!"));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Center
+ verticalAlignment: VerticalAlignment.Top
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Quack Quack.."));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Right
+ verticalAlignment: VerticalAlignment.Top
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Mmmmmm.."));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Left
+ verticalAlignment: VerticalAlignment.Center
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Delicio!"));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Center
+ verticalAlignment: VerticalAlignment.Center
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Yuck!"));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Right
+ verticalAlignment: VerticalAlignment.Center
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Whoa!"));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Left
+ verticalAlignment: VerticalAlignment.Bottom
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Love it.."));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Center
+ verticalAlignment: VerticalAlignment.Bottom
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Get it cooked already!"));
+ }
+ }
+ ImageButton {
+ horizontalAlignment: HorizontalAlignment.Right
+ verticalAlignment: VerticalAlignment.Bottom
+ defaultImageSource: "asset:///images/egg.png"
+ onClicked: {
+ _app.cardDone(qsTr("Sunny side up"));
+ }
+ }
+ }
+ }
+}
@@ -0,0 +1,18 @@
+import bb.cascades 1.0
+
+NavigationPane {
+ backButtonsVisible: true
+ peekEnabled: true
+ Page {
+ titleBar: TitleBar {
+ title: qsTr("Previewer")
+ }
+ Container {
+ horizontalAlignment: HorizontalAlignment.Fill
+ ImageView {
+ imageSource: _app.uri
+ scalingMethod: ScalingMethod.AspectFit
+ }
+ }
+ }
+}
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,104 +1,38 @@
/* Copyright (c) 2012 Research In Motion Limited.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
import bb.cascades 1.0
-NavigationPane {
-
- peekEnabled: true
-
- backButtonsVisible: _app.backButtonVisible
-
- Page {
- titleBar: TitleBar {
- title: _app.title
- }
-
+Page {
+ titleBar: TitleBar {
+ title: _app.title
+ }
+ ScrollView {
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Top
+ scrollViewProperties.scrollMode: ScrollMode.Vertical
Container {
- layout: DockLayout {}
-
- // The background image
- ImageView {
- imageSource: "asset:///images/background.png"
- }
-
- ScrollView {
- horizontalAlignment: HorizontalAlignment.Fill
- verticalAlignment: VerticalAlignment.Top
-
- scrollViewProperties.scrollMode: ScrollMode.Vertical
-
- Container {
-
- topPadding: 50
- leftPadding: 50
- rightPadding: 50
-
- //! [0]
- LabelLabel {
- label: qsTr ("startup mode")
- text: _app.startupMode
- }
-
- LabelLabel {
- label: qsTr ("source")
- text: _app.source
- }
- //! [0]
-
- LabelLabel {
- label: qsTr ("target")
- text: _app.target
- }
-
- LabelLabel {
- label: qsTr ("action")
- text: _app.action
- }
-
- LabelLabel {
- label: qsTr ("mime type")
- text: _app.mimeType
- }
-
- LabelLabel {
- label: qsTr ("uri")
- text: _app.uri
- }
-
- LabelLabel {
- label: qsTr ("data")
- text: _app.data
- }
-
- Divider {}
-
- LabelLabel {
- topMargin: 100
-
- label: qsTr ("status")
- text: _app.status
- }
-
- Button {
- horizontalAlignment: HorizontalAlignment.Center
- topMargin: 50
-
- text: qsTr("Done")
- onClicked: _app.cardDone()
- }
+ topPadding: 50
+ leftPadding: 50
+ rightPadding: 50
+ Label {
+ text: "<html>Try invoking this app as a <b>Card</b> with the following parameters. You can also use the InvokeClient sample app on blackberry.github.com/cascades-samples to invoke these cards.<hr/><p/><br/><b>Composer:</b><br/><i>Action:</i> bb.action.SHARE<br/><i>MIME:</i> text/plain<br/><i>Data:</i> [ANYTHING]<p/><br/><b>Previewer:</b><br/><i>Action:</i> bb.action.OPEN<br/><i>URI:</i> file:///path/to/file.jpg<p/><br/><b>Picker:</b><br/><i>Action:</i> com.example.PICKEGG<br/><i>MIME:</i> food/egg</html>"
+ multiline: true
+ textStyle {
+ fontSize: FontSize.XSmall
+ color: Color.LightGray
}
}
}
Oops, something went wrong.

0 comments on commit dbda7ac

Please sign in to comment.