我想知道是否可以使用 webview 打开另一个类,我在我的应用程序中使用了此代码,但它让我只探索图像请帮助我,谢谢。这是代码:
WebView imageView1n;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
imageView1n=(WebView)findViewById(R.id.imageView1n);
imageView1n.setWebViewClient(new WebViewClient());
WebSettings webSettings = imageView1n.getSettings();
webSettings.setLoadWithOverviewMode(true);
webSettings.setUseWideViewPort(true);
imageView1n.loadUrl("http://bitsparrow.altervista.org/wp-content/uploads/2013/04/5.jpg");
Button button1=(Button) findViewById(R.id.Bopenbx);
imageView1n.setOnClickListener(new WebView.OnClickListener() {
public void onClick(View v){
Intent myIntentActivity1 = new Intent(menu.this,N_X.class);
//call N_X and wait for result
startActivity(myIntentActivity1);
}
});