以下是我在ListViewActivity中用于ListViewItem的布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:background="@drawable/list_single" >
<TextView
android:id="@+id/listUp_RecipeInstructionNumberTextBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/header_orange"
android:text="1"
android:textSize="30dip" />
<TextView
android:id="@+id/listUp_RecipeInstructioTextTextBoxId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="This is the instruction info"
android:textSize="14dip" />
<ImageView
android:layout_height="56dp"
android:layout_width="63dp"
android:id="@+id/listUp_RecipeInstructionImageViewId"
android:layout_marginLeft="15dp"
android:layout_weight="1" />
</LinearLayout>首先,ImageView处于可见性=消失状态。然后,用户使用相机拍照,ImageView可见性可见,我更新ImageView以使用拍摄的照片。
如果TextView为空,则以当前大小显示。但是,当我有一个文本到达ListViewItem的末尾时(长文本和最初的ImageView在Visibilite中消失了),然后我拍摄了照片,然后它以错误的大小显示。小得多
我怎么才能修复它?
发布于 2011-12-23 18:37:58
将此android:layout_weight="1"用于较大的文本视图,并移除imageView的权重。
https://stackoverflow.com/questions/8614968
复制相似问题