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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:57:15+00:00 2026-05-12T20:57:15+00:00

So I have a webview I’d like to display as a dialog. I’d like

  • 0

So I have a webview I’d like to display as a dialog. I’d like the webview to fill the entire screen, except for a button below it that I’d like to stay at the bottom of the dialog regardless of how much content is in the webview. Currently my webview fills up the dialog just enough to push the button off the screen. I’m sure this is something pretty easy but for the life of me, I haven’t been able to find the magical combination of layouts, views and attribute values to get it to play nice. Just to be clear, I’ve gotten it so the button floats over the webview but I’d like the webview to stop just above the button and scroll, if that makes sense.

<RelativeLayout android:id="@+id/RelativeLayout01" 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent"
                xmlns:android="http://schemas.android.com/apk/res/android">
  <WebView android:id="@+id/webview"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           /> 
  <Button android:text="Ok" 
          android:id="@+id/btnOk" 
          android:layout_width="120px" 
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_alignParentBottom="true"
          />
</RelativeLayout>
  • 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-12T20:57:15+00:00Added an answer on May 12, 2026 at 8:57 pm

    You will want to use android:layout_above=”@+id/btnOk” for your webview, and do fill_parent for width and height of the webview.

    However, it is important to note, that in 1.5 and below, RelativeLayout views need to be specified in order in your xml to be recognized correctly.. in other words, you have to have your Button first, then the WebView, since the WebView will reference the button. I think this has been changed in 1.6 or 2.0, but I am not positive which.

    <RelativeLayout android:id="@+id/RelativeLayout01" 
                    android:layout_width="fill_parent" 
                    android:layout_height="fill_parent"
                    xmlns:android="http://schemas.android.com/apk/res/android">
    
      <Button android:text="Ok" 
              android:id="@+id/btnOk" 
              android:layout_width="120px" 
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_alignParentBottom="true"
              android:layout_centerHorizontal="true"/>
        <WebView android:id="@+id/webview"
               android:layout_above="@+id/btnOk"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               /> 
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Webview application that uses progress bar dialog. It works fine but the
I have a webview that loads a webpage. I also have a reload button.
I have a WebView that loads a local HTML file like this: [webView loadRequest:[NSURLRequest
I have a WebView. I'd like to show some page from my server, but
I have a webview that's supposed to show cyrillic text wv.loadData( myStringHtml, html/text, utf-8);
I have a webview that I'm creating in an Activity which is a child
I have a webview that shows some animated boxes, but it slows down and
Guys i have a WebView in my Screen with some TextFields in it. Whenever
I have a Webview in which i display the html pages,there i have placed
I have a WebView wherein I would like anchor tags with rel=external to open

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.