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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:42:02+00:00 2026-05-23T16:42:02+00:00

I am having a problem on the last row of my linear layout. I

  • 0

I am having a problem on the last row of my linear layout. I want the 0 to be the same size as all the other numbers, and then the other 4 buttons in that row to be like below (this is using Absolute Layout):

Correct Look I could not post images so this is a tinypic

But using Linear Layout, which is what I need to use so it looks correct on all screen sizes, I cannot get the last row to look right. The problem is the images, they do not let me scale the buttons correctly. I’m sure I could fix it by scaling down the images, but I want them to stay that size, and just make the buttons thinner. Does anyone know how to do that? Weights don’t seem to work.

Needs changing I could not post images so this is a tinypic

Here is my xml file:

<?xml version="1.0" encoding="utf-8"?>

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

    <TextView
        android:id="@+id/widget86"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>

    <TextView
        android:id="@+id/widget40"
        android:gravity="right"
        android:textSize="40sp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>

</LinearLayout>

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">

    <Button
        android:id="@+id/widget34"
        android:text="7"
        android:gravity="center_vertical|center_horizontal" 
        android:layout_width="wrap_content"
        android:textSize="35sp"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget35"
        android:gravity="center_vertical|center_horizontal" 
        android:text="8"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget37"
        android:gravity="center_vertical|center_horizontal" 
        android:text="9"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

</LinearLayout>

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">

    <Button
        android:id="@+id/widget31"
        android:gravity="center_vertical|center_horizontal" 
        android:text="4"
        android:layout_width="wrap_content"
        android:textSize="35sp"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget32"
        android:gravity="center_vertical|center_horizontal" 
        android:text="5"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget33"
        android:gravity="center_vertical|center_horizontal" 
        android:text="6"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

</LinearLayout>

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">

    <Button
        android:id="@+id/widget28"
        android:gravity="center_vertical|center_horizontal" 
        android:text="1"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget29"
        android:gravity="center_vertical|center_horizontal" 
        android:text="2"
        android:layout_width="wrap_content"
        android:textSize="35sp"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

    <Button
        android:id="@+id/widget30"
        android:gravity="center_vertical|center_horizontal" 
        android:text="3"
        android:textSize="35sp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_weight="1"/>

</LinearLayout>

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">

    <Button
        android:id="@+id/widget38"
        android:gravity="center_vertical|center_horizontal" 
        android:text="0"
        android:layout_width="wrap_content"
        android:textSize="35sp"
        android:layout_height="fill_parent"
        android:layout_weight="30"/>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="30">

        <Button
            android:id="@+id/widget72"
                android:gravity="center_vertical|center_horizontal" 
                android:text="R"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:textSize="35sp"
                android:layout_weight="1"/>

        <Button
                android:id="@+id/widget73"
                android:gravity="center_vertical|center_horizontal" 
                android:text="Z"
                android:layout_width="wrap_content"
                android:textSize="35sp"
                android:layout_height="fill_parent"
                android:layout_weight="1"/>

            <Button
                android:id="@+id/widget70"
                android:gravity="center_vertical|center_horizontal" 
                android:layout_width="wrap_content"
                android:drawableBottom="@drawable/back"
                android:textSize="35sp"
                android:layout_height="fill_parent"
                android:layout_weight="1"/>

            <Button
                android:id="@+id/widget39"
                android:gravity="center_vertical|center_horizontal" 
                android:textSize="35sp"
                android:drawableBottom="@drawable/search"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:layout_weight="1"/>

     </LinearLayout>

</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-23T16:42:02+00:00Added an answer on May 23, 2026 at 4:42 pm

    Last LinearLayout consists of two objects: Button and LinearLayout.
    You want it to be divided: 1 unit for button and 2 units for LL. So you should set button layout_weight=”1″ and LL layout_weight=”2″. Set also layout_width=”fill_parent” (or “0dp” – should act the same as weight will provide proper weight).

    You can also put “R” and “Z” to one LL and “arrow”, “search” to second LL. Then you will have three objects the same size so put layout_weight=”1″ to each of them.

    Here is article about using weight parameter: http://developer.android.com/resources/articles/layout-tricks-efficiency.html

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

Sidebar

Related Questions

I am having the following problem. I have the numbers 1/2/3/4/5/6 and I want
I'm having an incomprehensible problem in Scicoslab in the last few days. I've been
I'm having a strange problem, that I've been trying to solve for too long.
today i'm having a little problem, that probably is nothing for pros here :)
The problem that i'm having is how can i synchronise my datasets in my
Have a problem that seems easy on paper but i'm having a big problem
I am basically having the exact same problem as here: SQL View: Join tables
I'm having a particularly interesting problem. Perhaps my don't remember the last time I
I'm having some problem to get the index of the selected row in a
I'm having a problem with using a TStringGrid and Popup menu I want to

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.