Android4.1浏览器实现全屏

这篇博客详细记录了如何根据客户需求修改Android4.1的内置浏览器,使其能够实现全屏显示,隐藏地址栏。内容包括对AndroidManifest.xml文件的具体修改步骤。
摘要由CSDN通过智能技术生成

客户的需求千奇百怪,有的要求把浏览器实现全面,隐藏地址栏等,下面直接贴修改记录,本案例中的浏览器以launcher方式启动


diff --git a/packages/apps/Browser/AndroidManifest.xml b/packages/apps/Browser/AndroidManifest.xml

index 5e7a228..719ee14 100755
--- a/packages/apps/Browser/AndroidManifest.xml
+++ b/packages/apps/Browser/AndroidManifest.xml
@@ -68,8 +68,8 @@
                   android:label="@string/application_name"
                   android:launchMode="singleTask"
                   android:alwaysRetainTaskState="true"
-                  android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
-                  android:theme="@style/BrowserTheme"
+                  android:screenOrientation="landscape"
+  android:theme="@style/BrowserTheme"
                   android:windowSoftInputMode="adjustResize" >
             <intent-filter>
                 <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
@@ -120,10 +120,9 @@
             <!-- We are also the main entry point of the browser. -->
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.HOME" />
                 <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.LAUNCHER" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <category android:name="android.intent.category.APP_BROWSER" />
+                <category android:name="android.intent.category.MONKEY"/>
             </intent-filter>
             <!-- The maps app is a much better experience, so it's not
                  worth having this at all... especially for a demo!
diff --git a/packages/apps/Browser/res/layout/custom_screen.xml b/packages/apps/Brows
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值