我见过很多手机应用程序只是打开一个网页而没有控件。只是页面。
我正在寻找指导和链接来开始像这样简单的事情。
原文由 EnexoOnoma 发布,翻译遵循 CC BY-SA 4.0 许可协议
我见过很多手机应用程序只是打开一个网页而没有控件。只是页面。
我正在寻找指导和链接来开始像这样简单的事情。
原文由 EnexoOnoma 发布,翻译遵循 CC BY-SA 4.0 许可协议
如果您想在 Android 中包装一个网站,您可以使用来自 Roskvist 的代码
package com.webview;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.webkit.WebView;
public class WebViewTest extends Activity {
WebView browserView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Removes the title bar in the application
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
//Creation of the Webview found in the XML Layout file
browserView = (WebView)findViewById(R.id.webkit);
//Enable Javascripts
browserView.getSettings().setJavaScriptEnabled(true);
//Removes both vertical and horizontal scroll bars
browserView.setVerticalScrollBarEnabled(false);
browserView.setHorizontalScrollBarEnabled(false);
//The website which is wrapped to the webview
browserView.loadUrl("http://dev.openlayers.org/sandbox/camptocamp
/mobile/trunk/examples/iol-iui.html?rev=9962#_map");
}
}
这是 main.xml 的内容
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView
android:id = "@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</RelativeLayout>
然后您必须编译它并通过 USB 将其加载到您的设备。
原文由 Sandwich 发布,翻译遵循 CC BY-SA 3.0 许可协议
3 回答963 阅读✓ 已解决
2 回答1k 阅读✓ 已解决
1 回答840 阅读✓ 已解决
2 回答949 阅读
2 回答889 阅读
1 回答823 阅读
2 回答692 阅读
如果我理解您的要求,在 Windows Phone 7 上,您无法在 Microsoft Marketplace 中批准此类应用程序。 Windows Phone 的应用程序认证要求 第 2.10 节说:“您的应用程序必须具有独特、实质和合法的内容和目的。您的应用程序必须提供启动网页以外的功能。”
我的一个同事最近有一个类似风格的申请被苹果公司拒绝了,就是因为这个原因。
我认为在这两个平台上,您过去可能已经能够接受这些类型的应用程序,但现在不会了。