picasso

ViewPager + Picasso

旧巷老猫 提交于 2019-12-04 07:15:19
I'm creating a Image Slider using Picasso + Viewpager. I am able to swipe the slider base on the image size(counts). But no images has been loaded tho i can swipe the screen. What is wrong with my codes? In my MainActivity, I get the links of my images. then set the adapter Like this. viewPager = (ViewPager)findViewById(R.id.view_pager); viewPagerAdapter = new ViewPagerAdapter(MainActivity.this,IMAGES); viewPager.setAdapter(viewPagerAdapter); IMAGES=Arrays of Links(For images). My ImagePager_layout.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android

Custom Downloader using Picasso

≡放荡痞女 提交于 2019-12-04 06:23:54
I have to download an image from a URL which requires some headers ( username,password) along with the request. So i am doing that using the code given here . But calling this function gives the error java.lang.NoClassDefFoundError: com.squareup.okhttp.OkHttpClient at com.squareup.picasso.OkHttpDownloader.<init>(OkHttpDownloader.java:72) I am using Picasso 2.3.3 and okhttp-urlconnection-2.0.0-RC2 libraries The issue has been raised in this post also but changing to 2.3.2 doesnt work. Do you have OkHttp included in your project? If not, the problem is that you're using the OkHttpDownloader. You

ImageView image not showing after loading with Picaso and linking to layout file

痴心易碎 提交于 2019-12-04 06:03:11
问题 I want to show a radio button and next to it show a ImageView with image loaded by Picaso. I tried putting the ImageView object after loading it next to the radio button in Relative layout but only the radio button is showing up but not the the image. I am new to android and any help is appreciated. can anyone point out the issue? MainActivity.java package com.example.test.imageslider; import androidx.core.content.ContextCompat; import androidx.viewpager.widget.ViewPager; import androidx

how to make picasso display default image when there is an invalid path

梦想的初衷 提交于 2019-12-04 04:27:31
问题 I am having one issue on display a default image name here R.drawable.avatar_placeholder. When the link from webservice is non empty, but error 404. means there isn't any image on that link path. Which if i run this function below, the string "path not empty" is shown, but it failed to display the image. Any suggestion is welcomed. Thanks. private void loadProfileDetails() { Logger.d(UI_LoginFragmentWithPin.class, "loadProfileDetails profile image: " + PrefUtils.readString(Constant.PREF

Android - picasso shows only placeholder, not the image from URL

ぐ巨炮叔叔 提交于 2019-12-04 03:53:50
问题 I've got this code public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView image_view = (ImageView)findViewById(R.id.imageView1); Picasso.with(getApplicationContext()).load("http://nuclearpixel.com/content/icons/2010-02-09_stellar_icons_from_space_from_2005/earth_128.png").placeholder(R.drawable.ic_launcher).noFade().into(image_view); } And i want to view

Images are not loading in android 5.0 using picasso library

北战南征 提交于 2019-12-04 03:12:23
I am working on demo application in which I am using Picasso library v2.5.2. It is working fine on all android operating system version, but not in lollipop. Image whose size is 130KB which is not loading for me. Images whose size is less are loading correctly. Here is my code for downloading bitmap and set on imageview. target = new Target() { @Override public void onPrepareLoad(Drawable drawable) {} @Override public void onBitmapLoaded(Bitmap bitmap, LoadedFrom arg1) { if(bitmap != null) { imageView.setImageBitmap(bitmap); } } @Override public void onBitmapFailed(Drawable drawable) {} };

Can Picasso queue for me?

陌路散爱 提交于 2019-12-04 02:52:59
问题 Here's a critical point I don't know concerning the behavior of Picasso. Imagine you are, say, showing a slide-show of ten items. Say, they are on-screen for ten seconds each. The ideal behavior would be this: at the start of the slide show, I simply perform following: picasso.get( url1 ) picasso.get( url2 ) picasso.get( url3 ) picasso.get( url4 ) picasso.get( url5 ) picasso.get( url6 ) picasso.get( url7 ) picasso.get( url8 ) picasso.get( url9 ) picasso.get( url10 ) And, in fact, Picasso

Picasso not loading pictures in ImageView

谁说我不能喝 提交于 2019-12-03 21:48:58
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. The behaviors that I faced: Authentication error --> I've added the header. The error disappears. SSL

SSL Certificate Pinning w/ Picasso

早过忘川 提交于 2019-12-03 20:15:14
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. Turns out I was Just looking in the wrong place. I was attempting to modify the OkHttpDownloader, but I needed to modify the

Does Picasso library for Android handle image loading while network connectivity is off?

霸气de小男生 提交于 2019-12-03 17:22:20
I'm working on an application in which i use Picasso library for image loading in my ViewPager and other ImageViews . So i want to know what happens if network connectivity is off. Does the library handle itself or do i have to check the network connectivity before loading image to views? My code: Picasso picasso = Picasso.with(getActivity()); picasso.setDebugging(true); picasso.load(downloadPath+imgDetailPhoto) .placeholder(R.drawable.no_image) .error(android.R.drawable.stat_notify_error) .into(eventImage, new Callback() { @Override public void onSuccess() { Log.d("Success...", "picasso