picasso

Picasso load image with HTTP post

橙三吉。 提交于 2019-12-18 08:43:09
问题 My API having some verification mechanism for every HTTP request. One of the end-point have the functionality to load a image using HTTP post method. The post request body will contain a JSON object which is verified from the server side. For that i need to include a JSON like this on the http post request body. { "session_id": "someId", "image_id": "some_id" } how can I do this with Picasso ? 回答1: I got the solution from the hint given by Mr.Jackson Chengalai. Create a Okhttp request

Picasso Load Image into Target

和自甴很熟 提交于 2019-12-18 04:17:40
问题 I'm using Picasso to download various images. Usually, I just display these in an ImageView but in this situation, I want to hold a strong reference to them so that I can use them in different places without having to refer back to the cache or re-download them. Here is how I am attempting to do that (note that there is more to this class - I've just narrowed it down to the parts that are relevant to this question): public class MapLayer { private Context mContext; private String mType;

Getting Picasso to pre-fetch forthcoming images

烈酒焚心 提交于 2019-12-18 03:12:15
问题 I'm using Picasso with a GridView, loading 200 images over the network. Right now it looks like Picasso is not triggering an image load over the network until the image starts to come into view on the screen. Is there a way to have Picasso pre-fetch the next N images in the list so that the experience is better? I am using an Adapter to put the images into the Gridview. 回答1: I am prefetching images into a cache very successfully using Picasso like so: if (BuildConfig.DEBUG) { Picasso.with

Getting Picasso to pre-fetch forthcoming images

我的未来我决定 提交于 2019-12-18 03:10:57
问题 I'm using Picasso with a GridView, loading 200 images over the network. Right now it looks like Picasso is not triggering an image load over the network until the image starts to come into view on the screen. Is there a way to have Picasso pre-fetch the next N images in the list so that the experience is better? I am using an Adapter to put the images into the Gridview. 回答1: I am prefetching images into a cache very successfully using Picasso like so: if (BuildConfig.DEBUG) { Picasso.with

Picasso image loading issue in GoogleMap.InfoWindowAdapter

末鹿安然 提交于 2019-12-18 02:48:44
问题 I am using Google Maps Api and want to show an image inside InfoWindow when clicking of a Marker. I implemented it but there is a problem about Picasso. When I click a marker, infoWindow is shown up and imageView shows placeholder image. If I click same marker one more time, Picasso loads the image succesfully. I have to click twice, it is so weird. Screenshots for better understanding: First click on the marker: When I click again: There is my codes below: InfoWindowAdapter (Picasso loading

Glide - load single frame from video at specific time?

北城余情 提交于 2019-12-17 19:38:45
问题 I'm trying to use Glide to step through frames in a video file (without running into the keyframe seeking issue that Android suffers from). I can do this in Picasso by doing something like: picasso = new Picasso.Builder(MainActivity.this).addRequestHandler(new PicassoVideoFrameRequestHandler()).build(); picasso.load("videoframe://" + Environment.getExternalStorageDirectory().toString() + "/source.mp4#" + frameNumber) .placeholder(drawable) .memoryPolicy(MemoryPolicy.NO_CACHE) .into(imageView)

Adding borders for image rounded image android

。_饼干妹妹 提交于 2019-12-17 15:39:52
问题 What i have :: I have a Imageview for which i am making image as a circle using picassso What i what to do :: I want to add a black border for rounded image using my current implementation, how to achieve this without using third party library Picasso.with(this) .load("http://i.imgur.com/DvpvklR.png") .transform(new RoundedTransformation(50, 4)) .resize(100, 100) .centerCrop().into(imageView1); RoundedTransformation.java // enables hardware accelerated rounded corners // original idea here :

cannot find symbol method with() using picasso library android

对着背影说爱祢 提交于 2019-12-17 15:38:18
问题 i'm getting one issue in android app, I am trying to check already existing app, the app contains implementation('com.squareup.picasso:picasso:3.0.0-SNAPSHOT') { exclude group: 'com.android.support' } picasso library and using that library in a class, here is the code import com.squareup.picasso.Picasso; Picasso.with().load(url).placeholder(R.drawable.default_pic).into(imageView); here is the error, Error:(49, 20) error: cannot find symbol method with() and my android studio version is 3.0

Doesn't Picasso support to download images which uses https protocol

☆樱花仙子☆ 提交于 2019-12-17 10:54:20
问题 Hello I am using the Picasso library to download the images from URL. URL : https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t1.0-1/s200x200/1472865_191408954385576_14109897_n.jpg URL is using https protocol, here it is not working for me to download the images of https protocol using Picasso . Doesn't it support to download the images which uses https protocol, it worked for me only if I use http proctocol ? Here I am trying to get bitmap which is using https protocol com.squareup

Resize image to full width and fixed height with Picasso

谁都会走 提交于 2019-12-17 05:40:21
问题 I have a vertical LinearLayout where one of the items is an ImageView loaded using Picasso. I need to rise the image's width to the full device width, and to display the center part of the image cropped by a fixed height (150dp). I currently have the following code: Picasso.with(getActivity()) .load(imageUrl) .placeholder(R.drawable.placeholder) .error(R.drawable.error) .resize(screenWidth, imageHeight) .centerInside() .into(imageView); Which values should I put into screenWidth and