我正在将图像加载到recyclerview,并且从网络加载图像大约需要30秒。这是代码:
public void bindEvent(Event event){
datetime.setText(event.getTime());
description.setText(event.getDescription());
event_name.setText(event.getName());
Picasso.Builder builder = new Picasso.Builder(context).loggingEnabled(true);
builder.build().load(event.getEventPicUrl()).fit().into(event_picture);
}
以下是imageview的代码:
<ImageView
android:id="@+id/event_picture"
android:layout_width="match_parent"
android:layout_height="200dp"
/>
答案 0 :(得分:0)