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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:45:15+00:00 2026-06-14T21:45:15+00:00

I am fairly new to java and android. at the moment i am studying

  • 0

I am fairly new to java and android. at the moment i am studying java at school. i just started working in this calculator just to get my hand in android developing. my problem at the moment is that when i deploy the app to the emulator (phone size 480×800) looks like Pic 001, but when i deploy it to my Kindle fire 1st gen (1024×600 i believe) looks like Pic 002. how can i make it so it look the same in every phone.

Pic 001Pic 002

XML File

  • 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-14T21:45:16+00:00Added an answer on June 14, 2026 at 9:45 pm

    In order to have your buttons fill the entire width of your screen, put this in your tags Button:

    android:layout_width="0dp" android:layout_weight="1"
    

    instead of :

    android:layout_width="80dp"
    

    If you want the buttons to be higher :
    – In your tags Button change android:layout_height="80dp" to android:layout_height="match_parent".
    – In your tags LinearLayout which contain your buttons change android:layout_height="wrap_content" to android:layout_height="0dp" android:layout_weight="1".
    – In your tag TextView change android:layout_height="wrap_content" to android:layout_height="0dp" android:layout_weight="X" where X is the value that gives you the right proportions.
    You will have a warning telling your that nested weight are bad for performance but it’s the only way I know to do this.

    In general, if you want a component to fill the empty space, set the width or height to 0dp and add a weight. The weight will define the proportions of the elements which want to fill the space.

    I hope it will help you.

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

Sidebar

Related Questions

I'm fairly new to Java and Android programming in general but I would like
I'm still fairly new to Java, but I'm fairly sure this shouldn't happen. There's
First of all, I'm fairly new to Java, so sorry if this question is
I have been working on Eclipse recently. I am fairly new to java programming,
I am fairly new to Android development as well as Java and i am
ok so im very new to android development and fairly new to java and
I find myself a little baffled here. I'm fairly new to android/java development so
I'm fairly new to Java & Android, so I have little idea what I
I am fairly new to java having come from a VS2010 background. Currently working
I am fairly new to Android and Java and hope you can help me

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.