Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.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 Develope:如何调整图像以适应屏幕?_Android_Eclipse_Image_Screen_Image Size - Fatal编程技术网

Android Develope:如何调整图像以适应屏幕?

Android Develope:如何调整图像以适应屏幕?,android,eclipse,image,screen,image-size,Android,Eclipse,Image,Screen,Image Size,为什么在遵守不同屏幕尺寸规则的情况下,图像仍会缩放。 你可以在img的右边看到我的意思 I图像大小为[查看url上的图像]。 我怎样才能解决这个问题 对不起,我的英语不好,欢迎讲德语和波尔西语,但不是必须的 <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="m

为什么在遵守不同屏幕尺寸规则的情况下,图像仍会缩放。 你可以在img的右边看到我的意思

I图像大小为[查看url上的图像]。

我怎样才能解决这个问题

对不起,我的英语不好,欢迎讲德语和波尔西语,但不是必须的

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
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=".MainActivity" >

<TableRow
    android:id="@+id/tableRow1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:src="@drawable/img" />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:src="@drawable/img" />

    <ImageView
        android:id="@+id/imageView3"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:src="@drawable/img" />

    <ImageView
        android:id="@+id/imageView4"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:src="@drawable/img" />

    <ImageView
        android:id="@+id/imageView5"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:src="@drawable/img" />
</TableRow>

以及它在不同屏幕大小上的外观[查看url上的图像]。

您可以使用
android:scaleType
属性。要在图像视图中完全匹配图像,可以使用如下方法

android:scaleType="fitXY"
还有这个

<dimen name="activity_horizontal_margin">0dp</dimen>
0dp

谢谢你的回答,但还是一样