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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:29:48+00:00 2026-06-03T03:29:48+00:00

I already tried all things I could find (on stackoverflow and the net) but

  • 0

I already tried all things I could find (on stackoverflow and the net) but I somehow cannot set my dialog to fullscreen. It has a scrollview with a textview in it, and when there is not much text in the textview the scrollview is not fullscreen. How can I force it to be fullscreen even when there is not much text visible ?

I create the dialog like this:

    final   TextView    box;
    final   Dialog      info    = new Dialog(cx);
    final   ScrollView  scroll;

    info.setContentView(R.layout.dialoginfo);
    info.setTitle("Info");
    info.setCancelable(true);
    info.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);

    scroll = ((ScrollView) info.findViewById(R.id.scrollviewinfo));
    scroll.setPersistentDrawingCache(ScrollView.PERSISTENT_NO_CACHE);
    scroll.setScrollbarFadingEnabled(false);
    box = (TextView) info.findViewById(R.id.infotext);
    box.setText(text);
    info.show();

This is the xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:id="@+id/infolayout"
>

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ImageView01"
        android:layout_weight="1.0"
        android:id="@+id/scrollviewinfo">

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:id="@+id/infolayout2">

            <TextView   android:layout_margin="5dip" android:layout_width="fill_parent" android:layout_height="wrap_content"
                android:id="@+id/infotext"
                android:textSize="8sp" 
                android:text=""/>

        </LinearLayout>

    </ScrollView>


</LinearLayout>
  • 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-03T03:29:49+00:00Added an answer on June 3, 2026 at 3:29 am

    It looks like your ScrollView has its height set to wrap_content, I’d first try replacing it with fill_parent.

    Here are some other resources that may help you:

    How can I get a Dialog style activity window to fill the screen?

    I’ve never used the setFlags() method, so this may give you the same results. Basically try replacing

    info.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);

    with

    info.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);

    Alternatively, if you wanted more exact control over the height, you can create an instance of layout params, as the first answer here describes:

    How to make an alert dialog fill 90% of screen size?

    You can also use this code to get the screen size, if you wanted to modify it to be slightly smaller than full screen.

    Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();
    int width = display.getWidth();
    int height = display.getHeight();
    

    There are quite a few other ways to get the current screen size, too, this is just one example. Good luck!

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

Sidebar

Related Questions

Has anyone already tried this, anything particulair that I need to be aware of?
In .NET I have already tried the configuration below successfully: <system.net> <connectionManagement> <add address=*
Is there anyone who has already tried to use the Microsoft Bing translator web
I already tried getting the current URL of my UIWebView with: webview.request.URL . Unfortunately
I have already tried PreRenderComplete and unload is too late
http://github.com/gabriel/yajl-objc I've already tried SBJSON, and while it works, I'm looking into alternative options
Eclipse does not highlight matching variables for me: I've already tried to change Mark
I want to change my rehosted activities look to: Already tried ActivityDesignerTheme Need to
I'm currently pulling my hair out solving this bug :/ I have already tried
Sorry if this question has already been answered elsewhere. I looked through stack overflow

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.