picasso

Picasso image is not loading on first run

狂风中的少年 提交于 2020-01-05 03:11:05
问题 I am using picasso to load image from a url. Since i needed bitmap for further processing, I am using Target() class for saving the bitmap. But picasso is not loading the image on the first run. But it loads at the time when i goes to another activity and getting back to the picasso implemented activity. Why it is happening ? Any fixes? My code is below, Picasso.with(getActivity()).load(card.getExtras().getImageUrl()).into(new Target() { @Override public void onBitmapLoaded(Bitmap bitmap,

Picasso only loading one image in a BaseAdapter

你离开我真会死。 提交于 2020-01-04 06:19:51
问题 In the getView() of a BaseAdapter I load an image into a ImageView using a URL and Picasso. Unfortunately only one image is being loaded. Here is the getView() code : @Override public View getView(int i, View view, ViewGroup viewGroup) { if (view == null) { LayoutInflater inflater = (LayoutInflater) mFragment.getActivity().getSystemService(Context .LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.layout_card, viewGroup, false); } Log.d("ParseUrl", mCardList.get(i)

Picasso only loading one image in a BaseAdapter

坚强是说给别人听的谎言 提交于 2020-01-04 06:19:05
问题 In the getView() of a BaseAdapter I load an image into a ImageView using a URL and Picasso. Unfortunately only one image is being loaded. Here is the getView() code : @Override public View getView(int i, View view, ViewGroup viewGroup) { if (view == null) { LayoutInflater inflater = (LayoutInflater) mFragment.getActivity().getSystemService(Context .LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.layout_card, viewGroup, false); } Log.d("ParseUrl", mCardList.get(i)

Picasso cannot load images for some URL (no special characters)

北城以北 提交于 2020-01-03 20:04:00
问题 I am using Picasso to load some images from online into a listView. The problem is, while some of the images are successfully loaded, some just simply disappear. Successful (The brand image is successfully displayed): Fail (no brand image is shown, failed): The ImageView disappears when it fails. Here is my code: Picasso.with(mContext) .load(UrlEncoder.encode(interiorDesign.getBrand_image_url())) .config(Bitmap.Config.RGB_565) .error(R.drawable.blank) .fit() .centerInside() .into(holder.brand

Picasso New Version 2.5.2: Not Working with Transformation

ぐ巨炮叔叔 提交于 2020-01-02 18:09:29
问题 Hello Picasso+Android Users, I have used following version of Picasso and its working with following Transformation snippet: compile 'com.squareup.picasso:picasso:2.3.2' and created following Transformation for Image Transformation : public class ImageTransformation implements Transformation { int maxWidth; int maxHeight; public ImageTransformation(ImageView imageView) { this.maxWidth = imageView.getWidth(); this.maxHeight = imageView.getHeight(); } @Override public Bitmap transform(Bitmap

Picasso disk caching

别等时光非礼了梦想. 提交于 2020-01-02 05:01:07
问题 I am using Picasso to load images from a URL Picasso.with(getApplicationContext()).load(product.getImageUrl()).into(imageView); From what I can see this is going to the url everytime and not caching to disk. I need disk caching enabled I have permissions <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> So its not a issue with disk. I think the issue is that the server is not sending back a cache param

SSL Certificate Pinning w/ Picasso

删除回忆录丶 提交于 2020-01-01 06:52:53
问题 I am using Picasso to cache Images. Our backend recently switched to HTTPS using self signed certificate pinning as authentication. I used the khandroid library to create an HTTP client that pins the certificates to each request; basically following this example. http://ogrelab.ikratko.com/using-android-volley-with-self-signed-certificate/ I now need to apply this same concept to Picasso but am unsure how to modify Picasso's singleton to use pinned SSL certificates. 回答1: Turns out I was Just

Is there a way to enable TLS 1.2 in Picasso library on older devices?

家住魔仙堡 提交于 2020-01-01 03:15:06
问题 My app is using images from HTTPS source, Solar Dynamics Observatory, and these images are loading just fine on Android versions with API 21 (5.0) (I think that API 20 would work as well) or higher, but I can't load these images on Android versions from API 16 (min. API that I set for my app) to API 19. Here's the code that's loading the images, it's pretty basic - Picasso.with(this) .load("https://sdo.gsfc.nasa.gov/assets/img/latest/latest_2048_HMIIC.jpg") .placeholder(R.drawable

how to resize an image without being blurred , or with using picasso

♀尐吖头ヾ 提交于 2019-12-31 02:54:24
问题 I need help in improving my code . What I am doing : There is a button in main activity, when clicked , user choose the image , after that, the image is passed through an intent to another activity(add_image.java) and displayed in an image view , after that I send the image to the server. My problems :1) I want the best way to send the path image to second intent then convert it into image 2) then compress it as much as I can without loosing a lot of its quality. the image size now is 376kb .

Use Picasso to Place Image Into Drawable

淺唱寂寞╮ 提交于 2019-12-30 10:08:44
问题 I am attempting to use Picasso from Square to pull a jpg from a URL and then append to an EditText. The reason for Picasso is that it's very lightweight in the implementation. As can be seen I am using a placeholder ImageView, whereby Picasso will import the image from the URL provided, and then I convert that ImageView into a Drawable. The same goes for the ImageGetter. However I receive null pointer error when using the configuration below. (Note when simply using a drawable from the