picasso

Android - Picasso misses pictures sometimes

社会主义新天地 提交于 2019-12-24 13:38:18
问题 I am using Picasso library for images downloading using the following code, I've to load many pictures in a loop by resizing them and transforming to circular. Sometimes images are successfully loaded and sometimes onError method is called instead of onSuccess in Callback. And i get this error SkImageDecoder::Factory returned null Error . When i uninstall the app then after reinstalling images are loaded successfully mostly. What is the problem exactly and kindly suggest any solution. Code:

Picasso doesn't load first image of ArrayAdapter

☆樱花仙子☆ 提交于 2019-12-24 12:03:52
问题 I am building a Tinder-like Android app with this library : https://github.com/Diolor/Swipecards and Picasso for image loading. Everything works fine, except the first view of the list. The image is not displayed, although the text is correct. Views are stored in a custom subclass of ArrayAdapter. Here is the code: public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = ((Activity)context).getLayoutInflater(); switch (getItemViewType(position)) { case

Displaying ParseFile Containing Images Using Their Urls In A RecyclerView

荒凉一梦 提交于 2019-12-24 11:53:06
问题 I have three images stored in a table on Parse.com and I would like to display those three images using their URLs. I have retrieved the URLs of the three images and they are displayed in the RecyclerView. You can see this in my screen shot image. So how do I display these three images using their URLs? MY MAIN ACTIVITY: public class RecyclerViewActivity extends Activity { private List<Person> persons; private RecyclerView rv; @Override protected void onCreate(Bundle savedInstanceState) {

android picasso invalidate not working [duplicate]

泄露秘密 提交于 2019-12-24 11:27:48
问题 This question already has answers here : Invalidate cache in Picasso (14 answers) Closed 3 months ago . if(isConnected()) { // if device online Picasso.with(context) .load(url) .networkPolicy(NetworkPolicy.NO_CACHE) .placeholder(R.drawable.ic_contact_picture) .error(R.drawable.ic_contact_picture) .into(imageView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(context).invalidate(url); } }); } else { // if device offline Picasso.with

Picasso Circle Transformation without Cropping Image

♀尐吖头ヾ 提交于 2019-12-24 05:59:46
问题 How do I make Circle Transformation without cropping the image? I've been trying for 2 days and I keep failing. This is the closest I've come so far, but as you can see, the image is not centered inside the circle. @Override public Bitmap transform(Bitmap source) { int size = Math.min(source.getWidth(), source.getHeight()); Bitmap squaredBitmap = Bitmap.createScaledBitmap(source,size-50, size-50,true); if (squaredBitmap != source) { source.recycle(); } Bitmap bitmap = Bitmap.createBitmap(size

Android - Fit ImageView to ListView

不问归期 提交于 2019-12-24 04:17:52
问题 I want to fit ImageView inside a ListView row so that it fits to the edge of device's screen. This is my current layout: <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <ListView android:layout_width="fill_parent" android:layout_height="fill_parent" android:smoothScrollbar="true" android:id="@android:id/list" /> </RelativeLayout> In the custom_row.xml: <RelativeLayout android:layout_width="fill

Error when parsing JsonArray include another JsonArray

假装没事ソ 提交于 2019-12-24 03:43:25
问题 i have this Json Data a link and i parsing it like that when i click into the image i want to parsing the JsonArray for the image to piccaso in recycler view like this , but i get all image like this picture how i can solve this problem and get just the images for the item which i clicked ??? this is my module : public class AppShowModule { private List<String> Allimage = new ArrayList<String>(); public List<String> getAllimage() { return Allimage;} public void setAllimage(List<String>

java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso

荒凉一梦 提交于 2019-12-24 03:32:48
问题 I try to use Picasso for the first time like in the official site example: private void setItemBgImageUsingPicasso(View convertView) { String imageUrl = getImageUrlFromOffer(convertView); ImageView offerImage = ((ImageView) convertView .findViewById(R.id.offerImage)); Picasso.with(mOffersListActivity).load(imageUrl).into(offerImage); } but I get this error: 08-09 17:37:43.309: E/AndroidRuntime(17821): java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso 08-09 17:37:43.309: E

When does Picasso refresh image cache

久未见 提交于 2019-12-24 03:03:21
问题 I am using picasso to fetch images from server. This is what i am using. Picasso.with(getApplicationContext()).load(imageURL) .placeholder(R.drawable.card_loading) .fit().centerCrop() .into(imageView); The above code should cache the images, but when i update the same image on server, without changing its URL , it starts displaying the new image on app, whereas it should display the cached old image on the app. In some devices it was displaying the older images, i closed and restart the app

Android - Load Thumbnail from Website URL using Glide/Picasso

纵然是瞬间 提交于 2019-12-24 00:34:22
问题 I'm trying to load a thumbnail for an article on the web using Glide, but it returns an empty field. Unlike other examples this URL does not directly link to a PNG/JPG etc, rather its a website link from which I require it to load the default thumbnail. The ImageView has been set & initialised properly. I have used Glide & Picasso in separate attempts, but it the ImageView is blank. Snippet ivGlide = (ImageView) findViewById(R.id.ivGlide); String uriLoad = "http://www.recode.net/2016/7/26