本文整理汇总了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);
}