picasso

Image from certain Url is not load in picasso

最后都变了- 提交于 2019-12-11 07:29:12
问题 I load image from URL using picasso first time on line, After then use from cache. Any URL from web is load in imageview on line or off line. But my server image URL is load image in on line not in off line. I use below code from image load. Picasso.with(mContext) .load(urlProfile) .networkPolicy(NetworkPolicy.OFFLINE) .placeholder(R.drawable.ic_place_holder) .into(imageView, new Callback() { @Override public void onSuccess() { } @Override public void onError() { Picasso.with(mContext) .load

Picasso doesn't load in Android

烈酒焚心 提交于 2019-12-11 07:28:47
问题 I put the .jar file inside the /libs folder and added it as library, now my build.gradle file has these dependencies: compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' compile project(':SmoothProgressBar') compile 'com.squareup.picasso:picasso:2.5.0' My manifest is like this <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.prova" > <application android:allowBackup="true" android:icon="@mipmap/ic

android:load image from sdcard with picasso

若如初见. 提交于 2019-12-11 06:50:57
问题 is it possible to use picasso library to load image from sdcard to imageView ? 回答1: As picasso doc provided, Resources, assets, files, content providers are all supported as image sources. You can simply do like it String filename = "YOURIMAGE.png"; String path = "/mnt/sdcard/" + filename; Picasso.with(context).load(new File(path)).into(imageView); Edit As @Budius suggested, the better way to access file from disk path, use Enviroment class. String filename = "YOURIMAGE.png"; String baseDir =

Picasso image gets rotated by itself

谁说我不能喝 提交于 2019-12-11 06:32:51
问题 I am using the Picasso library as follows, but when I take image and put into ImageView, image gets rotated. I wonder what might cause the issue? <ImageView android:layout_width="100dp" android:layout_height="100dp" android:id="@+id/imageViewUser" android:background="@color/colorAccent" android:contentDescription="@string/description" /> imageViewUser = (ImageView) findViewById(R.id.imageViewUser); Picasso.get().load(url).placeholder(R.drawable.image) .error(R.drawable.blank_profile) .resize

Picasso context==null issue

点点圈 提交于 2019-12-11 05:24:55
问题 I'm getting the following crash in crashlytics: Fatal Exception: java.lang.IllegalStateException: context == null at com.squareup.picasso.Picasso.get(Picasso.java:681) at com.package.name.Recycler.RecyclerVideoAdapter.onBindViewHolder(RecyclerVideoAdapter.java:435) RecyclerVideoAdapter.java:435 is referring to: Picasso.get().load(category.get(position).getImage()).noFade().tag("tag").resize(100, 100).centerCrop().networkPolicy(NetworkPolicy.OFFLINE).placeholder(R.drawable.image_placeholder)

Custom ImageViews not populating when using Picasso for Custom Marker InfoWindows in Maps

馋奶兔 提交于 2019-12-11 01:04:27
问题 I'm trying to use Picasso now for my Custom Marker's Images. I was previously using a Bitmap and setting individual Marker's InfoWindow Images with those Bitmaps with the help of a HashMap. But I like how Picasso will cache the Images for me and helps scale them etc. public class HomeActivity extends FragmentActivity implements OnMapReadyCallback, LocationListener, GoogleMap.OnMapLongClickListener, DetailsDialog.DialogListener, PictureDialog.FinishedMemorySaving { private GoogleMap mMap;

Limiting Square Picasso's cache size to 60MB max

眉间皱痕 提交于 2019-12-10 21:45:18
问题 I am currently using Picasso to download and cache images in my app inside multiple recycler views. So far Picasso has used around 49MB cache size and i am worried that as more images come into play, this will become much higher. I am using the default Picasso.with(context) object. Please answer the following: 1) Is there a way to restrict the Size of Picasso's cache. MemoryPolicy and NetworkPolicy set to NO_CACHE isn't an option. I need caching but upto a certain level (60MB max) 2) Is there

Picasso not loading image from http url but loads images from https url?

假装没事ソ 提交于 2019-12-10 20:27:27
问题 Picasso Loads the image fine if its from a https url like: https://i.ytimg.com/vi/28uUsJ72a1A/hqdefault.jpg Since youtube directs all traffic through https this works to: http://i.ytimg.com/vi/28uUsJ72a1A/hqdefault.jpg But when I use my url http://www.example.com/images/djnsdfndsf.jpg it redircets the link to a https version of the site and just gives a error This is how i'm loading the images Picasso.with(this).load(current.getImageURL()).into(ImageView); So I tried using this: //Below code

Android - StaggeredGrid wrong items disposition

好久不见. 提交于 2019-12-10 20:06:45
问题 I have a problem with my Recycler view and StaggeredGrid which cut the width by 2. I load images into items with Picasso and when I load image first time, they are disposed strangely in the recycler view. After reloading, everything seems good. I think problem come from image loading : the StaggeredGrid doesn't know the image height the first time, but know after reloading because of cache. How can i solve this problem ? 回答1: I think you have answered your own question. You need to load the

Slow load of local images with Picasso?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 19:58:27
问题 I've been developing Android apps for six years now, and using a simple "home-grown" image caching library for just as long. I recently started using a component that depends Picasso, and decided that it might be time to make the switch to a general library, rather than keep my old solution written many years ago. Most of my images are local ones stored in the drawable folders, with modest dimensions (100-200 px a side). However, I'm seeing a noticeable performance penalty when loading images