【发布时间】:2015-08-08 23:49:23
【问题描述】:
我做了这个按钮:
http://i.stack.imgur.com/QkrMD.png
但是图像比它应该的大得多(它应该是当前大小的四分之一)。我制作了各种尺寸的图像并将每个图像放入各自的可绘制文件夹中。
图标的大小应该是:
http://i.stack.imgur.com/12E8r.png
如何将图像缩小到我需要的尺寸(因为它是常规可绘制尺寸)?
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3,056"
android:drawableLeft="@drawable/ic_arrow_up_b"
android:background="@color/gray"
android:padding="15dp"
/>
【问题讨论】:
-
看起来您对像素、dps 和随后的所有内容感到困惑。 developer.android.com/guide/practices/screens_support.html
标签: android android-layout android-xml