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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:29:59+00:00 2026-06-08T21:29:59+00:00

In my Android app I want to create a dialog window that contains an

  • 0

In my Android app I want to create a dialog window that contains an image on top, some info text in the middle, and two buttons below. These two buttons are within a linear layout with vertical orientation. Both sould be of the same width.

I have managed to create a similar layout as described, however, the button with the longer text on it becomes wider than the other one. In the attached picture, the lower button is a bit wider than the button above, as marked by the dotted red line.

problematic layout

The layout I use for this inner linear layout looks as follows:

<LinearLayout
    android:orientation="vertical" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <Button 
        android:id="@+id/close_dialog_button_ok" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text="@string/upload_dialog_ok"
        android:layout_marginLeft="10dip"
        android:layout_marginRight="10dip"
        android:layout_marginTop="10dip" />        

    <Button 
        android:id="@+id/close_dialog_button_cancel" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text="@string/upload_dialog_cancel"
        android:layout_marginRight="10dip"
        android:layout_marginTop="10dip"
        android:layout_marginBottom="5dip" />        

</LinearLayout>

Any ideas what I am doing wrong here?
Thanks in advance for your help!

  • 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-08T21:30:00+00:00Added an answer on June 8, 2026 at 9:30 pm

    You forgot to set android:layout_marginLeft="10dip" on the second button

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

Sidebar

Related Questions

I want to create an Android app that can be used on 2.3.3 all
I want to create a layout for an Android app that has a numeric
I am developing an Android app and want to share some text by opening
I want to create an app that contains a Service S and an Activity
I want to create android app that while i am in my wifi area
i want to create a chat app using flex 4.5 mobile project for android
After reading some posts like this one: Choose File Dialog It appears that Android
In my android application i want to make a feedback dialog that will show
This dialog asks whether you want to install some other app...so when onclicked no
I want to create an android app. please consider the following scenario: Iam standing

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.