0
目前我正在android app中使用基於web的模塊。我使用Jquery移動設計並使用webview將其導入到android活動中。當我運行活動時,顯示設計但不顯示縮放到web視圖,它包含橫向和縱向滾動。我附帶了這篇文章的代碼。我需要幫助擴展jquery移動設計的活動。提前感謝!jQuery在webview中的移動UI縮放
package com.example.updatesuite;
import android.os.Bundle;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.Menu;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@SuppressLint("SetJavaScriptEnabled")
public class Gateway extends Activity {
WebView wv1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gateway);
wv1=(WebView)findViewById(R.id.webView1);
WebSettings webSettings = wv1.getSettings();
webSettings.setDefaultFontSize(14);
wv1.getSettings().setLoadWithOverviewMode(true);
wv1.getSettings().setUseWideViewPort(true);
wv1.getSettings().setJavaScriptEnabled(true);
wv1.getSettings().setSupportZoom(false);
wv1.getSettings().setBuiltInZoomControls(false);
wv1.setWebChromeClient(new WebChromeClient());
wv1.setWebViewClient(new WebViewClient());
wv1.loadUrl("http://applicationdownloader.pixub.com/walcliff/index.php");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.gateway, menu);
return true;
}
}