Java Code Examples for com.bumptech.glide.request.RequestOptions#priority()

The following examples show how to use com.bumptech.glide.request.RequestOptions#priority() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageViewerActivity.java    From titanium-imagepicker with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private void setupGlideOptions() {
   	options = new RequestOptions();

   	if (isShapeCircle) {
   		if (Defaults.CIRCLE_RADIUS > 0) {
   			options.transforms(new CenterCrop(), new RoundedCorners(Defaults.CIRCLE_RADIUS));

   		} else {
   			options.circleCrop();
   		}
   	}

   	options.override(Defaults.IMAGE_HEIGHT, Defaults.IMAGE_HEIGHT);
   	options.placeholder(placeholder_image);
   	options.priority(Priority.HIGH);
}
 
Example 2
Source File: ImagePickerActivity.java    From titanium-imagepicker with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private void setupGlideOptions() {
   	options = new RequestOptions();
   	int size;

   	if (isShapeCircle) {
   		if (Defaults.CIRCLE_RADIUS > 0) {
   			size = (int) (0.65 * Defaults.IMAGE_HEIGHT);
   			options.transforms(new CenterCrop(), new RoundedCorners(Defaults.CIRCLE_RADIUS));

   		} else {
   			size = Defaults.IMAGE_HEIGHT;
   			options.circleCrop();
   		}

   	} else {
   		size = (int) (0.65 * Defaults.IMAGE_HEIGHT);
   	}

   	options.override(size, size);
   	options.error(error_image);
   	options.priority(Priority.HIGH);
   }
 
Example 3
Source File: ImageViewerActivity.java    From titanium-imagepicker with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("unchecked")
private void setupGlideOptions() {
   	options = new RequestOptions();

   	if (isShapeCircle) {
   		if (Defaults.CIRCLE_RADIUS > 0) {
   			options.transforms(new CenterCrop(), new RoundedCorners(Defaults.CIRCLE_RADIUS));

   		} else {
   			options.circleCrop();
   		}
   	}

   	options.override(Defaults.IMAGE_HEIGHT, Defaults.IMAGE_HEIGHT);
   	options.placeholder(placeholder_image);
   	options.priority(Priority.HIGH);
}
 
Example 4
Source File: ImagePickerActivity.java    From titanium-imagepicker with Apache License 2.0 6 votes vote down vote up
@SuppressWarnings({ "unchecked", "deprecation" })
private void setupGlideOptions() {
    	options = new RequestOptions();
    	int size;

    	if (isShapeCircle) {
    		if (Defaults.CIRCLE_RADIUS > 0) {
    			size = (int) (0.65 * Defaults.IMAGE_HEIGHT);
    			options.transforms(new CenterCrop(), new RoundedCorners(Defaults.CIRCLE_RADIUS));

    		} else {
    			size = Defaults.IMAGE_HEIGHT;
    			options.circleCrop();
    		}

    	} else {
    		size = (int) (0.65 * Defaults.IMAGE_HEIGHT);
    	}

    	options.override(size, size);
    	options.error(error_image);
    	options.priority(Priority.HIGH);
   }