本文整理汇总了TypeScript中ui/layouts/grid-layout.GridLayout类的典型用法代码示例。如果您正苦于以下问题:TypeScript GridLayout类的具体用法?TypeScript GridLayout怎么用?TypeScript GridLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GridLayout类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: pluckViews
public static pluckViews(parent: GridLayout): View[] {
let returnViews: View[] = [];
parent.eachLayoutChild((child: View) => {
returnViews.push(child);
});
parent.removeChildren();
return returnViews;
}
示例2: ResetGridRows
public ResetGridRows(value: number){
let grid : GridLayout = this.gridRef.nativeElement;
grid.removeRows();
for(let i =0; i<value; i++){
console.log("add row defintion");
grid.addRow(new ItemSpec(1, "star"));
}
let rows = grid.getRows();
console.log("grid-row count: " + rows.length);
}
示例3: ResetGridColumns
public ResetGridColumns(value: number){
let grid : GridLayout = this.gridRef.nativeElement;
grid.removeColumns();
for(let i =0; i<value; i++){
console.log("add column defintion");
grid.addColumn(new ItemSpec(1, "star"));
}
let columns = grid.getColumns();
console.log("grid-column counts: " + columns.length);
}
示例4: loginPageFunc
public loginPageFunc() {
let wv = new TnsOauthWebView(this._cancelEventHandler);
TnsOAuthWebViewHelper.initWithWebViewAndIntercept(wv, this._checkCodeIntercept);
let grid = new GridLayout();
grid.addChild(wv);
let stack = new StackLayout();
stack.addChild(grid);
let page = new Page();
page.content = stack;
if (isAndroid) {
page.actionBarHidden = true;
}
wv.src = this._authUrl;
return page;
};
示例5: displayDevWarning
public static displayDevWarning(parent:GridLayout, message: string, ...viewsToCollapse: View[]): void {
let warningText = new Label();
warningText.text = message;
warningText.color = new Color('red');
warningText.textWrap = true;
warningText.marginTop = 50;
parent.addChild(warningText);
viewsToCollapse.forEach((view: View) => {
if (view != null) {
view.visibility = 'collapse';
}
});
}
示例6: onClearCache
export function onClearCache(args: EventData) {
var imagePipeLine = frescoModel.getImagePipeline();
imagePipeLine.clearCaches();
layout.removeChildren();
toggleBusyIndicator(true);
setContent();
}
示例7: setContent
function setContent() {
myComponentInstance = builderModule.load({
path: "~/examples/",
name: xmlFileName
});
if (tabViewItem && tabViewItem.view) {
if (layout && layout.getChildrenCount() <= 0) {
timerId = timerModule.setInterval(function () {
toggleBusyIndicator(false);
layout.addChild(myComponentInstance);
timerModule.clearInterval(timerId);
}, 800);
}
}
}
示例8: toggleBusyIndicator
timerId = timerModule.setInterval(function () {
toggleBusyIndicator(false);
layout.addChild(myComponentInstance);
timerModule.clearInterval(timerId);
}, 800);