我使用通用图像加载器(UIL)在列表视图中缓存和显示图像。Android /通用图像加载器:不显示图像
我不能让我想上面显示图像的描述图像具有以下布局列表视图的项目
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
显示的图像。图像的宽度是设备的整个宽度,图像的高度根据图像的宽度自动缩放。
使用宽度和高度的“wrap_content”,我可以让我的图像显示在其他不使用UIL的项目中。我不确定我在UIL的配置中做了什么错误(我在他们的Github的例子中使用了相同的配置),但是图像没有用上面的布局进行dsiplay。实际上他们显示0高度。我可以让他们显示,如果我提供一个固定的高度,像
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="300dp"
/>
请让我知道如果你有任何解决方案。