我正在尝试在ma app中集成进度条。但我无法跟踪回调方法。进度条始终显示如何隐藏图像被锁定?
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);
}
});
答案 0 :(得分:3)
最后我修复了它。毕加索2.0.0 beta.used官方库中有一个错误
答案 1 :(得分:0)
尝试使用VIEW.GONE
代替VIEW.INVISIBLE