1***@163.com
1***@163.com
  • 发布:2016-06-01 17:28
  • 更新:2016-06-01 17:41
  • 阅读:1658

怎么改变安卓状态栏的背景颜色啊?

分类:MUI

试着用这个方法plus.navigator.setStatusBarBackground("#0C519D");但是发现iOS平台上可以,但是安卓平台上不行,有谁能解释一下么?

2016-06-01 17:28 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

Android平台
Android平台暂时不支持自定义系统状态栏样式,但可以通过离线打包在AndroidManifest.xml中配置主Activity的皮肤(android:theme)来设置:

        <activity  
            android:name="io.dcloud.PandoraEntry"  
            android:configChanges="orientation|keyboardHidden|screenSize"  
            android:label="@string/app_name"  
            android:launchMode="singleTask"  
            android:screenOrientation="sensor"  
            android:windowSoftInputMode="adjustResize"  
            android:theme="主Activity的皮肤"  
            android:exported="true">  
            <intent-filter>  
                <action android:name="android.intent.action.MAIN"/>  
                <category android:name="android.intent.category.LAUNCHER"/>  
            </intent-filter>  
        </activity>  

云端打包封装了常用的皮肤样式。请参考http://ask.dcloud.net.cn/docs/#http://ask.dcloud.net.cn/article/238

该问题目前已经被锁定, 无法添加新回复