
楼主顺带请教个问题,我用ListView显示,每行一个图片和一个问题
<ImageView
android:id="@+id/profilePhoto_ImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/studentName_TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="10dp"/>
这个是每行的布局,然后我希望每行的高度等于TextView的高度,也就是文字的高度,这里图片我随便找了一张,实际情况下图片会有大有小,我怎么样设定ImageView的高度适中等于TextView的高度?