本文整理匯總了TypeScript中nativescript-swiss-army-knife/nativescript-swiss-army-knife.SwissArmyKnife類的典型用法代碼示例。如果您正苦於以下問題:TypeScript SwissArmyKnife類的具體用法?TypeScript SwissArmyKnife怎麽用?TypeScript SwissArmyKnife使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了SwissArmyKnife類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: animationsFinished
animationsFinished() {
const intent = new android.content.Intent(com.tns.NativeScriptApplication.getInstance().getApplicationContext(), com.tns.NativeScriptActivity.class)
intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
com.tns.NativeScriptApplication.getInstance().startActivity(intent);
SwissArmyKnife.setAndroidNavBarColor('#644749');
SwissArmyKnife.setAndroidStatusBarColor('#8ba192');
}
示例2: initSplash
initSplash(configSplash) {
//Customize Circular Reveal
configSplash.setBackgroundColor(org.joshdsommer.weathercards.R.color.custom_green);//new Color('#8ba892').android); //any color you want form colors.xml
configSplash.setAnimCircularRevealDuration(1000); //int ms
configSplash.setRevealFlagX(com.viksaa.sssplash.lib.cnst.Flags.REVEAL_RIGHT); //or Flags.REVEAL_LEFT
configSplash.setRevealFlagY(com.viksaa.sssplash.lib.cnst.Flags.REVEAL_BOTTOM); //or Flags.REVEAL_TOP
SwissArmyKnife.setAndroidNavBarColor('#644749');
SwissArmyKnife.setAndroidStatusBarColor('#8ba192');
configSplash.setLogoSplash(org.joshdsommer.weathercards.R.drawable.splash_logo); //or any other drawable
configSplash.setTitleSplash('');
}
示例3: getDimensions
//right now this is probably overkill
getDimensions(): Rx.Observable<IDimensions> {
const portraitHeight = SwissArmyKnife.getScreenHeight().portrait - 80;
const cardRowSize = portraitHeight / 5;
const cardSize = cardRowSize * 4 - 16;
return Rx.Observable.of<IDimensions>({
cardRowSize: cardRowSize,
cardSize: cardSize,
pageHeight: portraitHeight,
morningOffset: 0,
dayOffset: cardRowSize,
eveningOffset: cardRowSize * 2,
nightOffset: cardRowSize * 3,
maxYScroll: cardRowSize * 2
});
}
示例4: ngAfterViewInit
ngAfterViewInit(): void {
SwissArmyKnife.actionBarSetStatusBarStyle(1);
SwissArmyKnife.setAndroidNavBarColor('#644749');
SwissArmyKnife.setAndroidStatusBarColor('#8ba192');
}
示例5: ngAfterViewInit
ngAfterViewInit(): void {
SwissArmyKnife.actionBarSetStatusBarStyle(1);
}