Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Imagebutton小图像_Android - Fatal编程技术网

Android Imagebutton小图像

Android Imagebutton小图像,android,Android,我制作了3幅不同的图像,每幅图像的大小分别为48x48、72x72、96x96和144x144。我将它们导入eclipse,并将它们放在应该进入的文件夹(drawable mdpi等)中 这些图像都位于ImageButton上,并且都位于SeekBar下的线性布局中 但当我启动应用程序时,图像太小了 <LinearLayout android:id="@+id/buttonLayout" android:layout_width="fill_parent" andr

我制作了3幅不同的图像,每幅图像的大小分别为48x48、72x72、96x96和144x144。我将它们导入eclipse,并将它们放在应该进入的文件夹(drawable mdpi等)中

这些图像都位于
ImageButton
上,并且都位于
SeekBar
下的
线性布局中

但当我启动应用程序时,图像太小了

<LinearLayout
    android:id="@+id/buttonLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:orientation="horizontal" >

    <ImageButton
        android:id="@+id/imageButton2"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginBottom="5dp"
        android:layout_weight="0.50"
        android:background="@android:color/transparent"
        android:padding="3dp"
        android:scaleType="centerInside"
        android:src="@drawable/btn_previous" />

    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginBottom="5dp"
        android:layout_weight="0.5"
        android:adjustViewBounds="true"
        android:background="@android:color/transparent"
        android:minHeight="80dp"
        android:minWidth="80dp"
        android:padding="3dp"
        android:scaleType="centerInside"
        android:src="@drawable/btn_play" />

    <ImageButton
        android:id="@+id/imageButton3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="5dp"
        android:layout_weight="0.5"
        android:adjustViewBounds="true"
        android:background="@android:color/transparent"
        android:padding="3dp"
        android:scaleType="centerInside"
        android:src="@drawable/btn_next" />

</LinearLayout>

<SeekBar
    android:id="@+id/seekBar1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/buttonLayout"
    android:layout_margin="5dp" />


我希望它们的大小是目前的两倍。我能做些什么使它们更大?

首先,当您在GraphicLayout背景中单击imageButton设置为drawable(并从文件夹中选择图像)时,我认为您可以将Src设置为not Background,然后您可以执行缩放类型和选择fitXY或更改imageButton的宽度和高度等操作