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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:31:59+00:00 2026-05-20T03:31:59+00:00

I have a relatively simple layout that contains an EditText . The activity itself

  • 0

I have a relatively simple layout that contains an EditText. The activity itself uses the dialog theme. The dialog ends up being tiny, the edit text isn’t even big enough to show the initial string.

I know that tiny dialogs are a common problem (IIRC Dianne mentioned that dialogs by default use wrap_content for the parent window), and a typical workaround is to force the dialog to be a certain size in onCreate. I prefer to fix this issue in the layout.

The idea was to give the EditText an android:minEms of 30 to give it a reasonable size (without being ridiculously huge on a tablet), but that seems to be ignored – the EditText (and dialog) is still tiny.

Side note – the dialog’s height is too small too – the button at the bottom is half the size it should be.

Layout, for reference:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <TextView android:id="@+id/TextView01"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/title"
        android:gravity="center"
    />
    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >
    <ImageButton
        android:id="@+id/file_manager"
        android:src="@drawable/ic_launcher_folder_small"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:onClick="pickFile"
      />
      <EditText android:id="@+id/file"
            android:text="@string/default_file"
            android:inputType="text"
            android:minEms="30"
            android:layout_toLeftOf="@+id/file_manager"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
        />
    </RelativeLayout>
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/action"
        android:onClick="performAction"
        android:text="@string/action">
    </Button>
</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-05-20T03:32:00+00:00Added an answer on May 20, 2026 at 3:32 am

    Change your RelativeLayout to android:layout_width="wrap_content".

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

Sidebar

Related Questions

I have a relatively simple site that I'm working up for an intranet environment.
We have are relatively simple Reporting Services report that our users commonly export to
I have a relatively simple select statement in a VB6 program that I have
I have what I'd consider a relatively simple Highcharts chart that I want to
I have a relatively simple form which asks a variety of questions. One of
I'm relatively new to the Component Object Model specification - I have a simple
In an ASP.NET 3.5 site we have a relatively standard payment checkout progess that
I have a relatively simple case where I want to repurpose a Start button
I have a relatively simple (I think) use-case but I can't find any examples
I have a relatively simple use case which is failing. Consider the following code:

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.