本文整理汇总了Java中com.androidquery.util.WebImage类的典型用法代码示例。如果您正苦于以下问题:Java WebImage类的具体用法?Java WebImage怎么用?Java WebImage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WebImage类属于com.androidquery.util包,在下文中一共展示了WebImage类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.androidquery.util.WebImage; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.web_runtime);
file_url = getIntent().getStringExtra("file");
save_to = getIntent().getStringExtra("save_to");
v = (WebView) findViewById(R.id.webview);
pb = (ProgressBar) findViewById(R.id.loadingbar);
splash = (ImageView)findViewById(R.id.spoon_preview);
ImageLoader.getInstance().displayImage(getIntent().getStringExtra("preview"), splash);
SharedPreferences prefs = DobroApplication.getApplicationStatic().getDefaultPrefs();
wi = new WebImage(v, true, false, /*0x000000FF Integer.parseInt(prefs.getString("img_viewer_bg_color1", "000000FF"),16)*/Color.parseColor(prefs.getString("img_viewer_bg_color1", "#FF000000"))); //TODO: background color from settings
v.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress)
{
// pb.setProgress(progress);
// pb.setVisibility(View.VISIBLE);
if(progress == 100) {
wi.done(wi.wv);
splash.setVisibility(View.GONE);
}
}
});
AQUtility.invokeHandler(v, "setLayerType", false, false, LAYER_TYPE_SIG, LAYER_TYPE_SOFTWARE, null);
super.onCreate(savedInstanceState);
}
示例2: webImage
import com.androidquery.util.WebImage; //导入依赖的package包/类
/**
* Load the webview with an image with a url.
* <p/>
* Zoom control can only be disabled for API level 14+. Lower level apis will always show zoom control if zoom is enabled.
* <p/>
* Note that color is AARRGGBB, where AA is the alpha value. Solid color (0xFF??????) should be used for performance reason.
* Transparent background is not well supported by WebView in most devices.
*
* @param url The image url
* @param zoom Image is zoomable
* @param control Show zoom control (API level 14+)
* @param color The background color
* @return self
*/
public T webImage(String url, boolean zoom, boolean control, int color)
{
if (view instanceof WebView)
{
setLayerType11(AQuery.LAYER_TYPE_SOFTWARE, null);
WebImage wi = new WebImage((WebView) view, url, progress, zoom, control, color);
wi.load();
progress = null;
}
return self();
}
示例3: webImage
import com.androidquery.util.WebImage; //导入依赖的package包/类
/**
* Load the webview with an image with a url.
*
* Zoom control can only be disabled for API level 14+. Lower level apis will always show zoom control if zoom is enabled.
*
* Note that color is AARRGGBB, where AA is the alpha value. Solid color (0xFF??????) should be used for performance reason.
* Transparent background is not well supported by WebView in most devices.
*
* @param url The image url
* @param zoom Image is zoomable
* @param control Show zoom control (API level 14+)
* @param color The background color
* @return self
*
*/
public T webImage(String url, boolean zoom, boolean control, int color){
if(view instanceof WebView){
setLayerType11(AQuery.LAYER_TYPE_SOFTWARE, null);
WebImage wi = new WebImage((WebView) view, url, progress, zoom, control, color);
wi.load();
progress = null;
}
return self();
}