1
내 앱이 내 삼성 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" />
기본적으로 버튼이 이미지 아래에 있어야합니다. 맞습니까? 버튼 아래의 layout_below 속성을 사용하여 이미지 아래에 배치하십시오. TextView에 대해서도 비슷한 작업을 수행 했으므로 버튼에 설정하기 만하면됩니다. 너비와 여백을 고정시키고있다. 향후 소형/대형 휴대 전화 및 태블릿으로 작업 할 때 문제가 될 수 있습니다. @dimen을 사용하여 config로 크기를 제어하거나 가능한 경우 wrap_content/match_parent와 같은 항목을 사용하여 가능한 모든 장치에서 크기가 조정되도록하십시오. – kha
예 @kha, 빨간 리본 아래에 단추를 놓으려고하지만 점수 필드 위에 있습니다. 또한 배너를 다른 장치에 올바르게 표시하고 싶습니다. Galaxy s3 neo에서는 앱이 완벽하게 보이지만 (배너 포함) Galaxy s plus에서는 그렇지 않습니다. 오늘 밤 나는 문제를 고치려고 노력할 것이고, 그것이 효과적인지 아닌지를 말해 줄 것이다. 고마워. – xManfred
예. (layout_below) 말한 상대적인 위치를 사용하면 잘 작동합니다. 이미지 아래에 버튼을, 버튼 아래에 텍스트를 나타낼 수 있습니다. 이미지와 버튼에 id (이미 버튼이 있음)를 입력 한 다음 layout_below를 사용합니다. – kha