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 8991735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:47:48+00:00 2026-06-15T22:47:48+00:00

I have a game activity which is based on a LinearLayout defined in XML

  • 0

I have a game activity which is based on a LinearLayout defined in XML (but if it makes the answer easier I can easily make this a FrameLayout).

Now I wish to have an interstitial advert which will reside in a WebView. I wish to load up the url in the background while the game is playing and then, at a time of my choosing, splat the WebView over the top of my game’s layout.

I have seen similar issues discussed on SO, but despite reading them, I can’t seem to get this to work.

The essential code I’d like to see is simply “put this full screen webview over the top of my existing views at runtime”.

  • 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-15T22:47:49+00:00Added an answer on June 15, 2026 at 10:47 pm

    LinearLayout doesn’t allow items to stack on top of each other AFAIK

    I think you’ll have to either use a dialog, or switch to a different type of parent layout. RelativeLayout is what I would probably recommend but others would probably work too.

    If you go with RelativeLayout you can do something like this:

    WebView wv = new WebView(this);
    //load up your url and whatever else you need to do with the WebView
    RelativeLayout mainLyt = (RelativeLayout)findViewById(R.id.yourMainLayoutId);
    mainLyt.addView(wv);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple game activity. I start it and than press the back
I have login- and game-layout in my activity. I would use AndroidAnnotations in my
I have a problem with my activity. This is my onCreate: case NORMAL: game
I have drawn usecase, activity and class diagrams for Crafting System for my game.
I am trying to make a game for android. It is based on a
I have an activity which is basically a tabbed activity for keeping a score
Basically I have to make a maths game with easy/medium/hard difficulties. I used the
I am developing a Quiz game application which is being developed completely but at
I have written a game (I'll give it the name Gamer) in which I
My question is really short. I have a game which has a reset class

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.