如何通过长按PhoneGap Webview上的图像来允许用户保存图像?现在,如果我按下图像没有任何反应,但在本机浏览器弹出菜单中(将图像另存为,保存图像,设置为壁纸)。我需要在PhoneGap中发生这种情况,就像在本地webrowser中一样。
package com.phonegap.helloworld;
import android.os.Bundle;
import org.apache.cordova.*;
import android.view.WindowManager;
public class App extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.setStringProperty("loadingDialog", "Loading please wait...");
super.loadUrl("http://www.mywebsite.com", 5000);
}
}