如何在Cordova Application中启用标题栏?

时间:2015-07-18 04:37:20

标签: html cordova phonegap-plugins cordova-plugins

下面是我的代码......我无法在我的应用程序中启用标题栏。 如何启用? config.xml中

<widget id="com.example.hello" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <preference name="loglevel" value="DEBUG" />
    <feature name="Whitelist">
        <param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
        <param name="onload" value="true" />
    </feature>
    <allow-intent href="market:*" />
    <name>HelloWorld</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
</widget>

我试过了..

<preference name="Fullscreen" value="false">

但它不起作用......活动仍以全屏模式显示...如何禁用该全屏并显示标题栏?

1 个答案:

答案 0 :(得分:2)

在配置文件中添加这两行

 preference name="fullscreen" value="false"
 preference name="showtitle" value="true"