Finally i fixed it.there was a bug in a Picasso 2.0.0 beta.used official library
couldnt hide the progressbar after loading image in picasso?
-
26-06-2022 - |
質問
I was trying to integrate progress bar in ma app.but i couldn't track the call back method.the progress bar always showing.how to hide when image is loded?
holder.imageView = (ImageView) localView.findViewById(R.id.imageView1);
holder.progressBar = (ProgressBar) localView.findViewWithTag(R.id.progressBar1);
localView.setTag(holder);
url = getItem(paramInt);
Picasso.with(getApplicationContext())
.load(url)
.placeholder(R.drawable.ic_launcher)
.error(R.drawable.ic_launcher)
.fit()
.into(holder.imageView, new Callback() {
@Override
public void onSuccess() {
holder.imageView.setVisibility(View.VISIBLE);
holder.progressBar.setVisibility(View.INVISIBLE);
}
@Override
public void onError() {
holder.progressBar.setVisibility(View.VISIBLE);
holder.imageView.setVisibility(View.INVISIBLE);
}
});
解決
他のヒント
Try using VIEW.GONE
instead of VIEW.INVISIBLE
所属していません StackOverflow