我的应用在不同的设备上看起来不一样

时间:2014-12-12 14:46:28

标签: android android-layout android-studio

我的应用在我的三星S3 Neo中看起来很完美,但当我尝试在不同的设备上下载应用时,它看起来完全不同。 这里的照片:http://imgur.com/SOMShWo,2jURycw,eapm4J2,OqEYKou,YhYH5HX,a7UTGXf(最后一张照片是我正在尝试修复的,它不显示横幅,但在我的s3 neo上它完美无缺) 你知道我该怎么办?提前谢谢。

这里是代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MyActivity"
android:background="@drawable/sfondonero">

<com.google.android.gms.ads.AdView android:id="@+id/adView"
    android:layout_width="320dp"
    android:layout_height="50dp"
    ads:adSize="BANNER"
    ads:adUnitId="ca-app-pub-7226926424148914/1067724781"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true" />

<ImageView
    android:layout_width="100dp"
    android:layout_height="173dp"
    android:id="@+id/imageView"
    android:background="@drawable/aidsv"
    android:adjustViewBounds="false"
    android:layout_centerHorizontal="true"
    android:layout_alignParentEnd="false"
    android:layout_marginTop="17dp" />

<Button
    android:layout_width="200dp"
    android:layout_height="29dp"
    android:text="Click me!"
    android:id="@+id/button"
    android:background="@drawable/redbottone"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="19dp" />

<TextView
    android:layout_width="120dp"
    android:layout_height="42dp"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:text="   Score:"
    android:id="@+id/textView"
    android:textColor="#FF0000"
    android:background="@drawable/sfondotempo"
    android:autoText="false"
    android:layout_marginTop="19dp"
    android:layout_below="@+id/button"
    android:layout_centerHorizontal="true" />

1 个答案:

答案 0 :(得分:0)

我不知道这是否能解决您的问题,但在横幅中我会用最后四行代替:

android:layout_centerHorizontal="true" />

我看到你在ImageView中使用它,所以我不明白为什么你没有在横幅中使用它。

相关问题