mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed all merge problems.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
Button, Label, TextView, TextField {
|
||||
border-color: black;
|
||||
border-width: 50;
|
||||
border-width: 10;
|
||||
border-radius: 3;
|
||||
padding-left: 50;
|
||||
padding-top: 50;
|
||||
padding-right: 50;
|
||||
padding-bottom: 50;
|
||||
padding: 10;
|
||||
/*padding-left: 20;
|
||||
padding-top: 20;
|
||||
padding-right: 20;
|
||||
padding-bottom: 20;*/
|
||||
margin: 10;
|
||||
font-size: 24;
|
||||
text-align: right;
|
||||
text-align: left;
|
||||
color: black;
|
||||
}
|
||||
@@ -1,51 +1,51 @@
|
||||
import observableModule = require("data/observable");
|
||||
import pagesModule = require("ui/page");
|
||||
import textFieldModule = require("ui/text-field");
|
||||
import textViewModule = require("ui/text-view");
|
||||
import buttonModule = require("ui/button");
|
||||
import labelModule = require("ui/label");
|
||||
import model = require("./model");
|
||||
import colorModule = require("color");
|
||||
import stackLayoutModule = require("ui/layouts/stack-layout");
|
||||
import enums = require("ui/enums");
|
||||
//import observableModule = require("data/observable");
|
||||
//import pagesModule = require("ui/page");
|
||||
//import textFieldModule = require("ui/text-field");
|
||||
//import textViewModule = require("ui/text-view");
|
||||
//import buttonModule = require("ui/button");
|
||||
//import labelModule = require("ui/label");
|
||||
//import model = require("./model");
|
||||
//import colorModule = require("color");
|
||||
//import stackLayoutModule = require("ui/layouts/stack-layout");
|
||||
//import enums = require("ui/enums");
|
||||
|
||||
var stackLayout: stackLayoutModule.StackLayout;
|
||||
var textField: textFieldModule.TextField;
|
||||
var textView: textViewModule.TextView;
|
||||
var button: buttonModule.Button;
|
||||
var label: labelModule.Label;
|
||||
//var stackLayout: stackLayoutModule.StackLayout;
|
||||
//var textField: textFieldModule.TextField;
|
||||
//var textView: textViewModule.TextView;
|
||||
//var button: buttonModule.Button;
|
||||
//var label: labelModule.Label;
|
||||
|
||||
export function onPageLoaded(args: observableModule.EventData) {
|
||||
var page = <pagesModule.Page>args.object;
|
||||
//export function onPageLoaded(args: observableModule.EventData) {
|
||||
// var page = <pagesModule.Page>args.object;
|
||||
|
||||
//stackLayout = page.getViewById<stackLayoutModule.StackLayout>("stack");
|
||||
//button = page.getViewById<buttonModule.Button>("button");
|
||||
//label = page.getViewById<labelModule.Label>("label");
|
||||
// stackLayout = page.getViewById<stackLayoutModule.StackLayout>("stack");
|
||||
// button = page.getViewById<buttonModule.Button>("button");
|
||||
// label = page.getViewById<labelModule.Label>("label");
|
||||
|
||||
//if (stackLayout.android) {
|
||||
// stackLayout.android.setClickable(true);
|
||||
// stackLayout.android.setFocusableInTouchMode(true);
|
||||
//}
|
||||
// if (stackLayout.android) {
|
||||
// stackLayout.android.setClickable(true);
|
||||
// stackLayout.android.setFocusableInTouchMode(true);
|
||||
// }
|
||||
|
||||
//textField = page.getViewById<textFieldModule.TextField>("textField");
|
||||
//textField.style.backgroundColor = new colorModule.Color("LightGray");
|
||||
// textField = page.getViewById<textFieldModule.TextField>("textField");
|
||||
// textField.style.backgroundColor = new colorModule.Color("LightGray");
|
||||
|
||||
//textView = page.getViewById<textViewModule.TextView>("textView");
|
||||
//textView.style.backgroundColor = new colorModule.Color("BlanchedAlmond");
|
||||
// textView = page.getViewById<textViewModule.TextView>("textView");
|
||||
// textView.style.backgroundColor = new colorModule.Color("BlanchedAlmond");
|
||||
|
||||
//var viewModel = new model.WebViewModel();
|
||||
//page.bindingContext = viewModel;
|
||||
}
|
||||
// var viewModel = new model.WebViewModel();
|
||||
// page.bindingContext = viewModel;
|
||||
//}
|
||||
|
||||
export function onTap(args: observableModule.EventData) {
|
||||
//if (textField.updateTextTrigger === enums.UpdateTextTrigger.focusLost) {
|
||||
// textField.updateTextTrigger = enums.UpdateTextTrigger.textChanged;
|
||||
// textView.updateTextTrigger = enums.UpdateTextTrigger.textChanged;
|
||||
// button.text = "textChanged";
|
||||
//}
|
||||
//else {
|
||||
// textField.updateTextTrigger = enums.UpdateTextTrigger.focusLost;
|
||||
// textView.updateTextTrigger = enums.UpdateTextTrigger.focusLost;
|
||||
// button.text = "focusLost";
|
||||
//}
|
||||
}
|
||||
//export function onTap(args: observableModule.EventData) {
|
||||
// if (textField.updateTextTrigger === enums.UpdateTextTrigger.focusLost) {
|
||||
// textField.updateTextTrigger = enums.UpdateTextTrigger.textChanged;
|
||||
// textView.updateTextTrigger = enums.UpdateTextTrigger.textChanged;
|
||||
// button.text = "textChanged";
|
||||
// }
|
||||
// else {
|
||||
// textField.updateTextTrigger = enums.UpdateTextTrigger.focusLost;
|
||||
// textView.updateTextTrigger = enums.UpdateTextTrigger.focusLost;
|
||||
// button.text = "focusLost";
|
||||
// }
|
||||
//}
|
||||
@@ -1,6 +1,6 @@
|
||||
<Page loaded="onPageLoaded">
|
||||
<StackLayout id="stack">
|
||||
<Button id="button" text="button" tap="onTap" backgroundColor="Green" />
|
||||
<Page>
|
||||
<StackLayout id="stack" backgroundColor="LightGray">
|
||||
<Button id="button" text="button" backgroundColor="Green" />
|
||||
<Label id="label" text="label" backgroundColor="Yellow"/>
|
||||
<TextField id="textField" text="text-field" hint="hint" backgroundColor="Red"/>
|
||||
<TextView id="textView" text="text-view" backgroundColor="Blue"/>
|
||||
|
||||
Reference in New Issue
Block a user