本文整理匯總了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);