Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:59:40+00:00 2026-06-03T20:59:40+00:00

I try to show Admob on my SurfaceView. I use framework from book beginning

  • 0

I try to show Admob on my SurfaceView.

  1. I use framework from book beginning android games from Mario Zechner
  2. In framework there is a class (AndroidFastRenderView extends SurfaceView implements Runnable) and in that class there is line canvas.drawBitmap(framebuffer, null, dstRect, null); where framebuffer is Bitmap where is all drawn in game.
  3. In that framework there is a class (AndroidGame extends Activity) where is line setContentView(renderView);

Here renderView is AndroidFastRenderView that is SurfaceView, Now I try to add Admob but I don’t no how.

I can create Admob like this

AdView adView = new AdView(this, AdSize.BANNER, “MyID”);

but where to add that view

Thanks for help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:59:41+00:00Added an answer on June 3, 2026 at 8:59 pm

    AdMob’s Ad Catalog sample application has an example similar to this. In the above example, the AdView was defined in XML. But at a high level, you’ll probably want something like this:

    <RelativeLayout ...>
        <AdView ...
            android:id="@+id/adView"
            android:layout_alignParentBottom="true"/>
        <AndroidFastRenderView ...
            android:layout_above="@id/adView"/>
    </RelativeLayout>
    

    Where the AdView sits at the top or bottom outside of the AndroidFastRenderView. If you’re doing it in code, I’d suggest you create a RelativeLayout, add the AdView as a subView of the RelativeLayout at the bottom (for example), and then add the renderView as a subView of the RelativeLayout, but above the AdView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am try to show epub book in android pad. I can parse the
This compiles: class Ex1 { public int show() { try { int a=10/10; return
I try to use amazon API using PHP. If I use print_r($parsed_xml->Items->Item->ItemAttributes) it show
dear i need to get query from 3 tables i try to show how
I try to show a VideoView on top of a SurfaceView . But it
I try to show name and author of the book at the top and
Working with Android I've got an error while I try to show a progressbar
i try to show and hide divs on click but something isnt going wel
iam using setting.bundle and i try to show a hidden picture with Switch toggle
I try to color given area of bitmap. After show it on screen. Currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.