1

나는 이렇게 레이아웃을 만들려고하지만 톰의 패딩을 추가하면 내 광고보기가 작아진다. 내가 잘못하고있는 사람은 상대 레이아웃을 사용해야하거나 레이아웃이 좋지 않다는 것을 도와 줄 수있다. 내가이 일 this is layout i want to make광고가있는 사용자 지정 상대 레이아웃

같은 정확한 레이아웃을 만들 수있는 방법 나를 인도 해주십시오 화면 크기의 모든 종류에 작동 할 선형 레이아웃을 통해 그것을 만들이 내 코드

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:ads="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:gravity="center" 
    android:orientation="vertical"> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="40sp" 
     android:layout_marginTop="40dp" 
     android:text="the End"/> 
    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="100dp" 
     android:gravity="center" 
     android:orientation="horizontal"> 

     <Button 
      android:id="@+id/btn_close" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="start" /> 



     <Button 
      android:id="@+id/btn_play" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="close" /> 

    </LinearLayout> 

<LinearLayout 
    android:layout_width="match_parent" 
    android:orientation="vertical" 
    android:gravity="center|bottom" 
    android:layout_height="match_parent"> 

    <com.google.android.gms.ads.NativeExpressAdView 
     android:id="@+id/nativeAd" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     ads:adSize="280x250" 
     ads:adUnitId="ca-app-pub-394859312"/> 

    <com.google.android.gms.ads.AdView 
     android:id="@+id/bannerAd" 
     xmlns:ads="http://schemas.android.com/apk/res-auto" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center" 
     ads:adSize="SMART_BANNER" 
     ads:adUnitId="@string/banner_id"> 
    </com.google.android.gms.ads.AdView> 
</LinearLayout> 


</LinearLayout> 

답변

0

에 패딩을 추가입니다 부모님의 선형 레이아웃

android:padding="16dp"