Fel*_*lix 5 android google-chrome
我正在从Android应用程序启动Chrome,我希望看起来我不会离开应用程序...为此我会以这种方式从Intent启动Chrome:
public void onClickApp(View view){
Intent intent = new Intent("android.intent.action.MAIN");
intent.setComponent(ComponentName.unflattenFromString("com.android.chrome/com.android.chrome.Main"));
intent.addCategory("android.intent.category.LAUNCHER");
intent.setData(Uri.parse("http://google.com"));
startActivity(intent);
}
Run Code Online (Sandbox Code Playgroud)
但我不知道如何隐藏顶部栏,也很高兴"私人"开始.有办法实现这个目标吗?
这是不可能的。Android 版 Chrome 进入全屏模式的唯一方法是使用全屏 API: http: //www.html5rocks.com/en/mobile/fullscreen/
然而,这需要用户交互才能使 UI 处于全屏模式,这并不是您想要的。
WebView 现在使用 Chrome 作为 KitKat 中的渲染引擎:https://developers.google.com/chrome/mobile/docs/webview/overview
| 归档时间: |
|
| 查看次数: |
8178 次 |
| 最近记录: |