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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:51:30+00:00 2026-06-03T05:51:30+00:00

I have an activity with style Dialog, containing two EditTexts. However, only the first

  • 0

I have an activity with style Dialog, containing two EditTexts. However, only the first one is shown when I run the app. Here is my code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dip" >

<EditText
        android:id="@+id/firstEditText"
        android:layout_height="wrap_content"
        android:lines="1"
        android:inputType="number"
        android:scrollHorizontally="false"
        android:layout_width="fill_parent"/>

<EditText
        android:id="@+id/secondEditText"
        android:layout_height="wrap_content"
        android:lines="3"
        android:scrollHorizontally="false"
        android:layout_width="fill_parent"/>

</LinearLayout>

As far as I know, this is normal Android behavior, but how can I make the activity show both fields without writing Java code and using only XML?

  • 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-03T05:51:32+00:00Added an answer on June 3, 2026 at 5:51 am

    The second EditText doesn’t appear because the parent LinearLayout has the default orientation(horizontal) and the first EditText has the width set to fill_parent. This will push the second EditText out of the screen. You either set the orientation of the LinearLayout to vertical to show the EditText one below the other or you set wrap_content as the width for the first EditText and use layout_weight(on both EditText) to set up a desired ration between the first and second EditText.

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

Sidebar

Related Questions

I have an activity that has the following set as theme: android:theme=@android:style/Theme.Dialog However, there
I have an activity whose layout only contains a VideoView. Here is the xml:
I have an activity which is shown in a dialog: In order to remove
I have an activity, that has in manifest: android:theme=@android:style/Theme.Dialog When I start it, it
I have a simple Activity that uses a android:theme=@android:style/Theme.Dialog in the manifest. My activity
i have already set the theme of my activity as android:theme = @android:style/Theme.Dialog but
I have an activity with ListView that has: android:theme=@android:style/Theme.Dialog in Manifest. When I open
in my app i have activity with XML layout, i want to build an
I have an activity which is with the theme Theme.Transparent which is: <style name=Theme.Transparent
I am writing an Android app. I have an activity in my main project

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.