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

  • Home
  • SEARCH
  • 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 7435739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:07:31+00:00 2026-05-29T10:07:31+00:00

I have a screen where i have 2 fullscreen views, and i want an

  • 0

I have a screen where i have 2 fullscreen views, and i want an adwhirl ad at the bottom.

Here is my xml file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="bottom"
    android:id="@+id/main_layout"
    >
</RelativeLayout>

Then i put the views on it from code:

    // in activity's onCreate 
    RelativeLayout layout = (RelativeLayout)findViewById(R.id.main_layout); 

    v1= new V1(this);
    v2= new V2(this, v1);

    RelativeLayout.LayoutParams  lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    lp.addRule(RelativeLayout.ALIGN_PARENT_TOP, RelativeLayout.TRUE);

    v1.setLayoutParams(lp);
    v2.setLayoutParams(lp);

    layout.addView(v1);
    layout.addView(v2);

    .....
    AdWhirlLayout adWhirlLayout2 = new AdWhirlLayout(this, "key");
    adWhirlLayout2.setAdWhirlInterface(this);
    adWhirlLayout2.setMaxWidth(width);
    adWhirlLayout2.setMaxHeight(height);

    RelativeLayout.LayoutParams  lp_bottom = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    lp_bottom.addRule(RelativeLayout.ALIGN_BOTTOM, RelativeLayout.TRUE);
    adWhirlLayout2.setLayoutParams(lp_bottom);

    layout.addView(adWhirlLayout2);

But the ads are still at the top of the screen, like when i didn’t set the layoutparams.

  • 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-05-29T10:07:32+00:00Added an answer on May 29, 2026 at 10:07 am

    Try :

    lp_bottom.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few full screen png's where I want to create regions on
I'm building a site using HTML 5 and want to have a full screen
Now I have finally managed to create a fullscreen window via http://cocoadevcentral.com/articles/000028.php Brilliant tutorial.
I have a full-screen UIWebView, and I want to add a semi-transparent subview on
I have a settings dialog that I want to be full screen and cover
I have two views, a game view and an admob view. I want the
http://developer.android.com/reference/android/widget/TextView.html#attr_android:password I can't find where in the android code it applied the android:password xml
All my views/pages in apps so far have been full screen UIViewControllers that i
I have a video view that is full screen and would like to trigger
So, I have a screen capture utility (it takes full screen shots and saves

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.