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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:47:42+00:00 2026-05-28T04:47:42+00:00

I have created a layout in a dialog box, and need it to be

  • 0

I have created a layout in a dialog box, and need it to be scrollable so that phones with smaller screens can view the whole thing. However, when I contain the rest of my layout in a scrollview it makes it way too long with a lot of space at the bottom.

I have set the scrollview height to wrap_content, but this doesn’t change anything, can anybody see any problems with my xml that would make it do this?

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    >
<LinearLayout
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/allowanceroot"
    android:background="@drawable/background"
    >
<TextView
    android:id="@+id/dialogsetminutes"
    android:text="@string/setminutesallowance"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:layout_marginTop="30dp"
></TextView>
<EditText
    android:id="@+id/minutesinput"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:maxLines="1"
    android:inputType="number"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
    android:layout_marginBottom="30dp"
></EditText>
<TextView
    android:id="@+id/dialogsetmessages"
    android:text="@string/setmessagesallowance"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
></TextView>
<EditText
    android:id="@+id/messagesinput"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:maxLines="1"
    android:inputType="number"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
    android:layout_marginBottom="30dp"
></EditText>
<TextView
    android:id="@+id/dialogsetdata"
    android:text="@string/setdataallowance"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
></TextView>
<EditText
    android:id="@+id/datainput"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:maxLines="1"
    android:inputType="number"
    android:layout_marginLeft="50dp"
    android:layout_marginRight="50dp"
></EditText>
</LinearLayout>
</ScrollView>
  • 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-28T04:47:43+00:00Added an answer on May 28, 2026 at 4:47 am

    This is my code (may be useful for u )

     AlertDialog.Builder builder=new AlertDialog.Builder(this);
        LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
        View layout = inflater.inflate(R.layout.yourlayoutName,null);
        builder.setView(layout);
        builder.show();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a dialog over a fragment (that takes up the whole
I have created a custom dialog, the code is below. The problem is that,
I have created a custom dialog and a layout xml: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I want to have a custom dialog (created using layout) in Preferences . What
I've created some dialog and on this dialog I have a vertical layout consisting
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a PHP-script to update a web server that is live inside
I have created a UserControl that has a ListView in it. The ListView is
I have created a few small flash widgets that stream .mp3 audio from an
i have created a workflow activity that do give the item creater of a

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.