我編程的Android應用程序,我有下一個問題:我的ImageView取決於圖像大小的改變(安卓)
我需要顯示通過HTTP下載圖片到包含列表視圖和ImageView的和文本。雙方或其中包含在LinearLayout中:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imagenEvento"
android:layout_width="80dp"
android:layout_height="80dp"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:paddingBottom="2dp"
android:contentDescription="@string/contenidoImagen"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:padding="10dp"
android:orientation="vertical" >
<TextView
android:id="@+id/titulo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17sp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/sitio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/fecha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
Iload的圖像dinamically不同大小和,但是當我加載它們中的一些,我的ImageView的大小受到影響,它不會尊重我的身高和寬度聲明。
我試圖建立最大和最小尺寸,我已經在代碼中定義了佈局參數,建立了填充底部,重新設置了位圖,但沒有任何效果。
在接下來的畫面中的黃色圓圈顯示相同的空間和紅色的ImageView的和行 http://imageshack.us/photo/my-images/32/csww.jpg/
我缺少的底部之間不同的空間?
沒有耶調整,它沒有工作,我不斷獲得相同的結果 – n4h1n
但ImageVIew保持他的大小,右LinearLayout包含TextViews是根據行改變 –
@MarcinGawel ImageView我我認爲這是不斷變化的。 TextViews正在改變取決於行,這是正確的,但它不應該影響ImageView的大小 – n4h1n