Android layout 安卓手机上到处都是图像。wvga800

Android layout 安卓手机上到处都是图像。wvga800,android-layout,Android Layout,我必须开发一个android应用程序。哪个应用程序已经开发成iphone应用程序了。 我有用于iphone应用程序的所有图像 在我的应用程序中,在第一个屏幕中,我必须设置2个图像。它们是640 x 684和640 x 236 我的模拟器大小是wvga800。(440*800) 但当我通过emulator运行应用程序时。第一个图像显示为strech,它与第二个图像重叠 我使用了相对层。 下面是xml代码 <?xml version="1.0" encoding="utf-8"?> &l

我必须开发一个android应用程序。哪个应用程序已经开发成iphone应用程序了。 我有用于iphone应用程序的所有图像

在我的应用程序中,在第一个屏幕中,我必须设置2个图像。它们是640 x 684和640 x 236

我的模拟器大小是wvga800。(440*800) 但当我通过emulator运行应用程序时。第一个图像显示为strech,它与第二个图像重叠

我使用了相对层。 下面是xml代码

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:orientation="vertical" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="fitCenter"
        android:contentDescription="@string/main_image"/>


    <FrameLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <ImageView
            android:id="@+id/imageView3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/presshereclick" 
            android:visibility="invisible"
            android:contentDescription="@string/main_image"/>

        <ImageView
            android:id="@+id/imageView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:adjustViewBounds="true"
            android:contentDescription="@string/main_image"
            android:src="@drawable/presshere" />

    </FrameLayout>

</RelativeLayout>

我已经计划调整图像大小,因为它们适合屏幕大小(440*800),但我觉得这可以从编码方面处理。这是我使用安卓系统的第三天

请帮我解决这个问题


提前感谢。

当使用
RelativeLayout
时,方向标记没有任何意义。您需要使用相对标记。对于isue,您希望
FrameLayout
位于上方
ImageView
的下方,在
FrameLayout
中使用
android:layout_-below=“@id/imageView1”
我尝试了您的Answare,但静态图像被压缩了。图像大小(640)不是导致这种情况的原因吗?什么是px=dp*(dpi/160)。我们如何获得dpi值。我使用wvga800 emulator。很抱歉,我现在不能给你一个更好的答案,但我认为你必须从阅读以下内容开始:同时尝试将图像移动到匹配的可绘制文件夹,例如“可绘制hdpi”