• 22-11-2021, 23:45:38
    #1
    Belirlediğim yazıyı banner reklamın üstüne eklemek istiyorum fakat bir türlü webview altına ekleyemedim kodları nasıl düzenlemem gerekiyor?

    Tam olarak yapmak istediğim, burası sohbet sitesi olduğu için altta yazı yazma alanı var ve arada boşluk olmadığı için admob sorun çıkartıyor.

    Reklam ile yazı alanı arasında 1-2 boşluk bırakmak istiyorum.





    Kullandığım kodlar şu şekilde;

    <androidx.constraintlayout.widget.ConstraintLayout 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"
        tools:context="com.uygulama.MainActivity" >
    
        <WebView
            android:id="@+id/webview"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            ads:layout_constraintBottom_toTopOf="@+id/adView"
            ads:layout_constraintEnd_toEndOf="parent"
            ads:layout_constraintStart_toStartOf="parent"
            ads:layout_constraintTop_toTopOf="parent" />
    
        <com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            ads:adSize="BANNER"
            ads:adUnitId="@string/banner_ad_unit_id"
            ads:layout_constraintBottom_toBottomOf="parent"
            ads:layout_constraintEnd_toEndOf="parent"
            ads:layout_constraintStart_toStartOf="parent" />
    
    </androidx.constraintlayout.widget.ConstraintLayout>
  • 14-01-2022, 15:18:11
    #2
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
    
        <WebView
            android:layout_width="match_parent"
            android:layout_height="676dp" />
    
        <View
            android:layout_width="0dp"
            android:layout_height="?attr/actionBarSize"
            android:layout_weight="1" />
    
        <TextView
            android:gravity="center"
            android:layout_marginTop="5dp"
            android:id="@+id/textView3"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Yazılacak Yazı" />
    
        <View
            android:layout_width="0dp"
            android:layout_height="?attr/actionBarSize"
            android:layout_weight="1" />
    
        <com.google.android.gms.ads.AdView
            android:layout_marginTop="10dp"
            android:id="@+id/adView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            ads:adSize="BANNER"
            ads:adUnitId="@string/banner_ad_unit_id" />
    </LinearLayout>
    deneyebilirsiniz.