开发者

How to remove address bar coming to webview

I hava a webview showing some contents which is getting from server. Now on that same activity i use to override differnt urls based on condition. Means my webview is one and is loading differnt differnt page depending on the condition. Now in t开发者_运维技巧his webview bydefault I am getting address bar. Can anyone help me how to avoid addressbar coming to a webview.


2015 For Android Studio 1.0

Edit your manifest so theme looks like:

android:theme="@style/AppTheme.NoTitleBar"

Then open src/main/res/values/styles.xml and add the following:

    <style name="AppTheme.NoTitleBar" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
</style>

And gone is the whatchamacallit bar


There is no address bar in a WebView. Question has already been stated here: Disable address bar in Android webview

What you probably wants is to remove the title. If I remember correctly the name/url is also stated in the title of the activity. You should read: http://developer.android.com/resources/tutorials/views/hello-webview.html

You could remove the title by writing this for your activity in your manifest file.

<activity android:name=".MyActivity" android:label="@string/app_name"
 android:theme="@android:style/Theme.NoTitleBar">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜