带通知栏的Android WebView

带通知栏的Android WebView,android,webview,notification-bar,Android,Webview,Notification Bar,我想让我的webapp看起来尽可能与本地应用相似,现在我才意识到顶部没有通知栏,安卓后退按钮不会带你进入最后一个屏幕,而是关闭应用。有人知道怎么解决这个问题吗 <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher

我想让我的webapp看起来尽可能与本地应用相似,现在我才意识到顶部没有通知栏,安卓后退按钮不会带你进入最后一个屏幕,而是关闭应用。有人知道怎么解决这个问题吗

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true">
    <activity
        android:name="com.example.mywebapp.MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>
显示

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true">
    <activity
        android:name="com.example.mywebapp.MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>
布局

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true">
    <activity
        android:name="com.example.mywebapp.MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

找到了解决方案,您需要将此参数放入AndroidManifest.xml中的活动中

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true">
    <activity
        android:name="com.example.mywebapp.MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

为了支持后退按钮,您可以执行以下操作():

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:hardwareAccelerated="true">
    <activity
        android:name="com.example.mywebapp.MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>