-2
我正在开发一个应用程序,我正在使用一个按钮。在按钮的左侧,我正在使用图像。问题是图像尺寸很大,并且不适合按钮尺寸。如何调整图像大小以使其适合按钮。 Plz给我一些解决方案。 Xml是这样的。图像将如何适应按钮
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_weight="0"
android:weightSum="1"
android:orientation="horizontal" >
<Button
android:id="@+id/btn1"
style="?android:attr/buttonStyleSmall"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/blue"
android:gravity="left|center"
android:text="Wallpapers"/>
</Linearlayout>
thanx的答复,并提醒我正确的方法。 – HBBR