0
是否可以在NativeScript中設置ActionBar的background-image屬性?在NativeScript中的ActionBar背景圖片?
我知道你可以改變背景顏色,但我無法獲得背景圖片顯示。
我知道你可以在Native iOS中做到這一點,我也確定在Android中,它怎麼能在{NS}中完成? 我檢查了NS文檔,但它沒有任何實際的背景圖片,只顯示圖片本身。
是否可以在NativeScript中設置ActionBar的background-image屬性?在NativeScript中的ActionBar背景圖片?
我知道你可以改變背景顏色,但我無法獲得背景圖片顯示。
我知道你可以在Native iOS中做到這一點,我也確定在Android中,它怎麼能在{NS}中完成? 我檢查了NS文檔,但它沒有任何實際的背景圖片,只顯示圖片本身。
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { Page } from 'ui/page';
@Component({
selector: 'home',
templateUrl: 'modules/home/home.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class HomeComponent {
constructor(private page : Page){
}
ngOnInit() {
this.page.actionBar.backgroundImage = "res://actionbar_bg";
}
}
這個工作對我來說