我不知道为什么会这样:使用 Ion 库加载图像后,我的图像在图像下方和上方显示两个白条。我不想拥有那个。
我的 ImageView 显示在列表视图项中。我的适配器代码如下所示:
if (node.getImageUrl() != null) { ivImage.setVisibility(View.VISIBLE); Ion.with(ivImage) .placeholder(R.drawable.anne_eli_icons_set_up_anne_eli_logo_530px) //.error(R.drawable.error_image) //.animateLoad(android.R.anim.cycle_interpolator) .animateIn(android.R.anim.fade_in) .load("http://app.anne-eli.at/" + node.getImageUrl().getUrlBig()); } 别的 { ivImage.setVisibility(View.GONE); }
我的图像视图布局是这样的:
<LinearLayout ...
<ImageView
android:id="@+id/fragment_appointment_list_item_article_iv_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/anne_eli_icons_set_up_anne_eli_logo_530px"
android:background="@color/gray1" />
</LinearLayout>
有任何想法吗?