picasso

Picasso not loading pictures in ImageView

这一生的挚爱 提交于 2019-12-05 07:20:45
问题 I'm trying to use Picasso in order to make a lazy picture loading in a ListView. But it's actually not working. In my custom adapter, I get the ImageView, initialize a Picasso object and indicate to load the image into the specified ImageView. To retrieve picture from server, I needed to provide a basic authentication, so I've created a custom interceptor which adds the authentication header. Moreover, I need to trust every SSL certificate because for the moment the certificate is not signed.

Glide: log each request

戏子无情 提交于 2019-12-05 06:24:56
Consider the code below: Glide.with(<your_context>) .load(<remote_file_url, local_file_path>) .into(<imageview>); Above Glide code is written in lots of file. Simply I want to log my remote_file_url or local_file_path in logcat. But I don't want to change the code in every file. Is Glide allowing logging? If it allows, then I need a simple central way to turn on glide logging. For Reference: I want the way like Retrofit + okhttp allow. In OkHttp , I just have to add interceptor at one location and it will log information about each webservice call without writing any other additional code. In

How do I get a Palette for my bitmap once Picasso Loads it?

与世无争的帅哥 提交于 2019-12-05 05:14:57
问题 In October 2014, Jake Wharton wrote Coercing Picasso to Play With Palette. In it, there are 2 methods being pondered: Using a Transformation that generates the palette. The advantage of this is that the palette is generated on Picasso's worker thread and is ready when the image is loaded. The disadvantage, however, seems to be that I'm getting palettes that don't match the picture. At the moment I only run one of these transformations at a time. Using a Callback that onSuccess gets the bitmap

Set background resource using Picasso

。_饼干妹妹 提交于 2019-12-05 03:55:16
I know Picasso is an awesome library to play with images. Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView); with this code i can load an image to an image view. But is it possible to set a background resource , using Picasso ? The Javadoc for Picasso's RequestCreator class has the following example: public class ProfileView extends FrameLayout implements Target { @Override public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) { setBackgroundDrawable(new BitmapDrawable(bitmap)); } @Override public void onBitmapFailed() { setBackgroundResource(R.drawable.profile

Adding markers from url with Picasso

守給你的承諾、 提交于 2019-12-05 03:27:46
I'm adding markers to my map from a url using the Picasso library As a marker isn't an ImageView I tried to use a Target instead for(int x =0; x < mapIcon_url.length; x++){ Picasso.with(getActivity()).load(mapIcon_url[x]).resize(marker_size, marker_size+15).into(new Target() { @Override public void onSuccess(Bitmap b) { bitmapMarker = BitmapDescriptorFactory.fromBitmap(b); //create marker option if(b != null) markerOptions = new MarkerOptions().position(marker_position).icon(bitmapMarker)); else markerOptions = new MarkerOptions().position(marker_position).icon(BitmapDescriptorFactory

A/Looper: Could not create wake pipe. errno=24

大憨熊 提交于 2019-12-05 02:26:14
We're building an app that does a lot of animations and downloads a lot of images. After a certain amount of transactions (a predictable number), the app is crashing with the error: A/Looper: Could not create wake pipe. errno=24 We don't use Looper in our code, but a few of the libraries we use do use Looper: ActionBarSherlock: I don't think this is the culprit facebook: I don't think this is the culprit nineoldandroid: This animation library could be the culprit volley: This is probably not the culprit Picasso: This could be the culprit Has any body experienced this Looper error with any of

Making ImageGallery of private Images in S3 Client android

早过忘川 提交于 2019-12-05 00:14:35
问题 I am trying to create an imageGallery of my S3 Bucket in my android application. My images are private so i won't be having any specific link for each image. For Such private images , amazon has a link generator, s3Client.generatePresignedUrl(Constants.S3_BUCKET_NAME, key, expiration); It generates a URL with let's say 1 hour or 2 min expiration set by us. Now for easy memory caching and stuff, i can either use volley or Picasso or many other such easy loading libraries. However there is this

Getting black ImageView using Picasso and Glide

夙愿已清 提交于 2019-12-04 22:12:39
The problem I'm writing an Android app that's supposed to have a "Slideshow" feature on it. I've found this nice library , based on Picasso, that does exactly what I wanted, and it worked just fine most of the times. Problem is, sometimes my images are not loaded into the slide ImageView ... It only shows a "black canvas" as you can see on the screenshot below. I am loading the image from a local resource from my drawables. Sometimes it happens on Portrait mode, sometimes on Landscape mode. It doesn't matter which image I use, sometimes that "blackness" happens. EDIT: I'm using Android 5.0.2

How would an anonymous class get GC'd in picasso on Android?

泪湿孤枕 提交于 2019-12-04 20:27:34
Can someone explain to me the comment here : Don't create anonymous class of Target when calling Picasso as might get garbage collected. Keep a member field as a strong reference to prevent it from being gc'ed Per line 30 of ImageViewAction.java , that Callback is a strong reference. ImageViewAction(Picasso picasso, ImageView imageView, Request data, boolean skipCache, boolean noFade, int errorResId, Drawable errorDrawable, String key, Callback callback) { super(picasso, imageView, data, skipCache, noFade, errorResId, errorDrawable, key); this.callback = callback; } Assuming the Callback is an

Is there any way from which we can detect images are loading from cache in picasso?

落爺英雄遲暮 提交于 2019-12-04 20:22:48
as title suggest I want to check whether images are loading from cache or not. I've done something like this but couldn't succeeded. Picasso.with(getApplicationContext()) .load(data.get(position).get("product_image")) .into(viewHolder.imgViewIcon, new Callback() { @Override public void onSuccess() { viewHolder.imgViewIcon.setVisibility(View.VISIBLE); if (Picasso.LoadedFrom.NETWORK != null) YoYo.with(Techniques.ZoomIn).duration(1200) .playOn(viewHolder.imgViewIcon); viewHolder.placeholder.setVisibility(View.GONE); } @Override public void onError() { } }); Please anyone have batter option then