1
我正在尝试使用Web视图来使用像在图库中的图像的捏和缩放。Android在Web视图中加载图像
String imageUrl = "file:///local/dir/image.jpg"; // http://example.com/image.jpg
WebView wv = (WebView) findViewById(R.id.yourwebview);
wv.getSettings().setBuiltInZoomControls(true);
wv.loadUrl(imageUrl);
XML
<WebView android:id="@+id/yourwebview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
现在,如果我想在res \绘制,华电国际文件夹中引用的图像elephant.jpg。我如何在活动中做到这一点?