新的答案
显然我误解了这个问题。答案是使用:
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
style="@android:style/Widget.Button">
...,随函附上的ImageView和TextView内。
老答案
这里有一个想法:包裹在一个FrameLayout里的按钮。类似于:
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:foreground="@drawable/ico"
android:foregroundGravity="center">
android:gravity="center_vertical"
android:id="@+id/StartButton2x2"
android:text="@string/Widget2x2StartBtnLabel"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/widgetbtn_bg" />
顺便提一下,这是怎么回事android:layout_width="0dip"?看起来不正确。而不是背景