Note that there are some explanatory texts on larger screens.

plurals
  1. POAdmob on my Custom SurfaceView
    primarykey
    data
    text
    <p>I have created a my custom <code>SurfaceView</code> and now want to place admob on surface view. Not below or above because it reduces the screen size. I found many questions here but all are solving by putting <code>SurfaceView</code> below or above of the admob view. but I want to put admob on <code>SurfaceView</code>. </p> <p>XML code of my Activity</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".SecondActivity" &gt; &lt;com.scratchview.ScratchView xmlns:wsv="http://schemas.android.com/apk/res-auto" android:id="@+id/scratch_view_background" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" wsv:antiAlias="true" wsv:revealSize="25dp" wsv:scratchable="false" /&gt; &lt;com.scratchview.ScratchView xmlns:wsv="http://schemas.android.com/apk/res-auto" android:id="@+id/scratch_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" wsv:antiAlias="true" wsv:revealSize="25dp" wsv:scratchable="true" /&gt; &lt;com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:gravity="top" ads:adSize="SMART_BANNER" ads:adUnitId="@string/admob_id" ads:loadAdOnCreate="true" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Note: I have tried by putting Admob below and above it is working fine. I need to put admob onto <code>SurfaceView</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload