// 获取主窗口。
window.getLastWindow(this.context,(err, data)=>{if(err.code){
console.error('Failed to get the subWindow. Cause: '+JSON.stringify(err));return;}
console.info('Succeeded in getting subWindow. Data: '+JSON.stringify(data));let mainWindowClass = data;let sysBarProps ={
statusBarColor:'#ff00ff',
navigationBarColor:'#00ff00',// 以下两个属性从API Version8开始支持。
statusBarContentColor:'#ff0000',
navigationBarContentColor:'#ff0000'};
mainWindowClass.setWindowSystemBarProperties(sysBarProps,(err)=>{if(err.code){
console.error('Failed to set the system bar properties. Cause: '+JSON.stringify(err));return;}
console.info('Succeeded in setting the system bar properties.');});}