我已经创建了带有图标的文本按钮。但我的图标更大。我怎样才能为每个分辨率创建不同的图像大小?在Android中调整图标+文本按钮的大小
注:我使用的是Android 2.2.3工作室
这里是我的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.asus.teacher.TeacherActivity">
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_eye"
android:text="Drawable left"
android:textSize="10dp"
/>
</RelativeLayout>
他们很酷,但我不知道是否有任何其他方式来调整XML文件中的图像的大小? –
我编辑了答案...如果图标很大,您可以将特定尺寸高度设置为包装图标的按钮...... – rafsanahmad007