Search in sources :

Example 11 with BitmapAjaxCallback

use of com.androidquery.callback.BitmapAjaxCallback in project androidquery by androidquery.

the class AbstractAQuery method image.

/**
	 * Set the image of an ImageView from a file with aspect ratio.
	 *
	 * @param bm The image bitmap.
	 * @param ratio The desired aspect ratio of the imageview. Ratio is height / width, or AQuery.RATIO_PRESERVE to preserve the original aspect ratio of the image.
	 *
	 * @return self
	 * 
	 */
public T image(Bitmap bm, float ratio) {
    BitmapAjaxCallback cb = new BitmapAjaxCallback();
    cb.ratio(ratio).bitmap(bm);
    return image(cb);
}
Also used : BitmapAjaxCallback(com.androidquery.callback.BitmapAjaxCallback)

Aggregations

BitmapAjaxCallback (com.androidquery.callback.BitmapAjaxCallback)11 Bitmap (android.graphics.Bitmap)7 ImageView (android.widget.ImageView)5 AjaxStatus (com.androidquery.callback.AjaxStatus)5 File (java.io.File)2