picasso

Picasso keeps reloading images while scrolling upwards in listview, loads slowly

巧了我就是萌 提交于 2019-12-12 07:32:52
问题 I have been searching SO threads for answers but couldn't figure out my issue from previous discussion. I have a listview which loads about 50 images (it used to be about 100 but this was barely loading any images at all). After grabbing my JSON content (including image URL) from an api endpoint, through an adapter, my code puts it inside the listview. Currently, with 50 images, picasso will load one image at a time as I scroll down on the feed. I feel as if keeping the scroll fixed on one

How to cancel Picasso requests after fragment transitions in android

橙三吉。 提交于 2019-12-12 03:59:36
问题 I have a fragment with a gridview, which loads say 20 images simultaneously using an adapter. I want to make sure that unfinished Picasso requests terminate gracefully when fragment has disappeared/disposed. Question Is this automatically handled by Picasso framework (so I don't have to worry) How to implement cancel all Picasso requests on dispose? 回答1: You have to do some thing like below, if you want to perform any operation like you asked; Picasso.with(context) .load("http://some.example

passing image fetched from a remote source in an activity to another activity using picasso

拜拜、爱过 提交于 2019-12-12 03:35:16
问题 I'm a beginner in android development.I've a set images fetched from a URL into an Activity 'A' using Picasso, and are arranged in a GridView. Now, I want to pass the image which the user has tapped on, into an Intent. How can I pass the one of the fetched image to another activity, without having to fetch the image again. Please help me. Thank you. 回答1: If you are trying to reuse an image fetched in ActivityA in ActivityB without fetching again, you don't have to do anything apart from

Retrieving Images from Firebase in portrait Orientation using Picasso in an ImageView

南楼画角 提交于 2019-12-12 03:04:59
问题 I have successfully made an App which uploads pictures to firebase from the phone's Album in a portrait orientation using Picasso , but when i try to retrieve some of the pictures , they come when they have changed the orientation, maybe when the image size is bigger. Below is the sample pic. I use also Picasso while retrieving the image from Firebase , How can i be able to make an automatic detection when the image is not portrait to be set portrait without loosing an image quality like

Android Picasso cache with server image

為{幸葍}努か 提交于 2019-12-12 02:51:57
问题 I have a URL link to get images, and that image may change everyday however the link doesn't change. My questions are In this case, how Picasso know the image has changed and grab a new image? Does Picasso fires a url call to my server every-time the image is being used and then determine if the image is different or not? 回答1: Picasso uses HTTP headers for caching, so it basically follows the HTTP Caching specification. If your server provides accurate headers, it will all be managed

Dynamically increase the size of custom marker in google maps - Android

只愿长相守 提交于 2019-12-12 02:49:21
问题 I use Picasso to retrieve the Bitmap image to use as a marker icon and it apply successfully. But I need to dynamically increase the size of the custom marker for all devices. Because with my code below, it's working fine in some devices but in some others devices, the marker is very big. Here's my code dest = new LatLng(myMarker.getmLatitude(), myMarker.getmLongitude()); markerOption = new MarkerOptions().position(dest); location_marker = mMap.addMarker(markerOption); Target target = new

IndoorAtlas SDK 2.0: Using Picasso with custom ImageView

倖福魔咒の 提交于 2019-12-12 02:24:31
问题 So...., I want to use Picasso image loader library with an existing custom imageview class to load,resize,and rotate my image. The problem is I am unsuccessful with it as if I use this code: "Picasso.with(this).load(url).into(custom ImageView)" ,it gives me an error and suggests "cast parameter to target" . After casting the parameter "custom imageview" to target, when I test the application it gives me error saying "custom imageview cannot be cast to target" in the Logcat. After this problem

Generate cards with cardslib and load images with picasso

北慕城南 提交于 2019-12-12 02:04:43
问题 I am using cardslib (https://github.com/gabrielemariotti/cardslib) to create a project with cards and use picasso (http://square.github.io/picasso/), in order to dynamically create cards and load pictures into them with urls that I retrieve from Parse in a for loop. The problem I have is that even though I retrieve the correct data from Parse, only one image is loaded in all of the cards. The titles, subtitles etc are loaded correctly for each separate card, only the image is the same

Download images and save it

一世执手 提交于 2019-12-11 22:57:40
问题 I'm working on a school android project. I need to have a download button which downloads a picture(when we have class) And after display it in another activity(even in offline mode, and after quiting) I've tried picasso, but I can't get it to save and use it in offline mode. 回答1: For you to support offline mode, You need to Save the image on your disk because when your cache is cleared, The image is cleared as well. You can easily use Glide to Solve this, also storing on device and

Android Picasso GridView - Store URL data in Integer array?

馋奶兔 提交于 2019-12-11 21:42:42
问题 I'm using Picasso to set a gridview in my Android app. What I wanna do is basically pressing an image in the gridview and go to the detail view. The data was populated in String array like so: static final String[] URLS = { "http://i.imgur.com/file1.jpg", "http://i.imgur.com/file2.jpg", "http://i.imgur.com/file3.jpg", "http://i.imgur.com/file4.jpg" }; In the ImageAdapter those URLS are to be put in an String ArrayList: public class ImageAdapter extends BaseAdapter { private final Context