0
我有5个按钮,点击按钮后需要打开不同的网页。如何做到这一点? 我的网页流量的活动Java代码:单击按钮后在我的应用程序内打开网页
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class WebView extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView v, String url)
{
v.loadUrl(url);
return true;
}
}
和xml:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context="lv.shit.test.Sakums" >
<webview android:id="@+id/manswebview"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</webview>
</linearlayout>
我应该写上的OnClick什么在我的web视图中打开网页?