我在表格布局中获取图片时遇到了一些麻烦...实际上,每个我都有 2 列,当我将图片放在表格的一个单元格中时,它完全被拉伸和不成比例...我找不到如何制作它保持在单元格内的原始状态,并让其余的空间由白色背景填充...... XML 是这样的:
<TableLayout android:layout_width="fill_parent" android:stretchColumns="*"
android:layout_marginLeft="3dip" android:layout_marginRight="10dip"
android:layout_height="wrap_content">
<TableRow android:layout_marginBottom="10dip">
<TextView android:id="@+id/tv01" android:text="text1"
android:textSize="14sp" android:layout_margin="1dip"
android:layout_height="wrap_content" android:textColor="@color/bleuLink"
android:layout_width="wrap_content" android:layout_weight="1"
android:background="@color/background"></TextView>
<Button android:id="@+id/add" android:background="@drawable/addressbook"
android:layout_height="wrap_content" android:layout_width="wrap_content"></Button>
<Button android:id="@+id/call" android:background="@drawable/greenphone"
android:layout_height="wrap_content" android:layout_width="wrap_content"></Button>