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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:32:10+00:00 2026-05-27T19:32:10+00:00

I have an image, as below I made the above bar and buttons as

  • 0

I have an image, as belowenter image description here

I made the above bar and buttons as below in xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


    <LinearLayout
        android:id="@+id/titleRowId"
        android:layout_width="fill_parent"
        android:layout_height="45dip"
        android:background="@drawable/segment_bar_bg"
        android:gravity="center_vertical|center_horizontal"
        android:orientation="horizontal" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >

                <Button
                android:id="@+id/backBtn"
                android:layout_width="wrap_content"
                android:layout_height="32dip"
                android:layout_centerVertical="true"
                android:layout_marginLeft="5dip"
                android:background="@drawable/bar_btn_bg"
                android:padding="0dip"
                android:text="Cancel"
                android:textColor="#FFF" />

                <Button
                android:id="@+id/addBtn"
                android:layout_width="wrap_content"
                android:layout_height="32dip"
                android:layout_centerVertical="true"
                android:layout_marginLeft="250dip"
                android:background="@drawable/bar_btn_bg"
                android:padding="0dip"
                android:text="Done"
                android:textColor="#FFF" />

                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentTop="true"
                    android:gravity="center_vertical|center_horizontal"
                    android:text="Convert Amount"
                    android:textColor="#FFFFFF"
                    android:textSize="20sp"
                    android:textStyle="bold" />

        </RelativeLayout>
</LinearLayout>

When I do draw the buttons, according to following design, I face problem in aligments,
As I used TableLayout, and rows for displaying them, as following

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:binding="http://www.gueei.com/android-binding/"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:gravity="right|top"
        binding:text="FormattedDisplay"
        android:text="Value"
        android:textSize="45dip" />

    <TableLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:stretchColumns="0,1,2">

        <TableRow >

            <Button
                binding:onClick="Number7"
                android:text="7" />

            <Button
                binding:onClick="Number8"
                android:text="8" />

            <Button
                binding:onClick="Number9"
                android:text="9" />
        </TableRow>

        <TableRow >

            <Button
                binding:onClick="Number4"
                android:text="4" />

            <Button
                binding:onClick="Number5"
                android:text="5" />

            <Button
                binding:onClick="Number6"
                android:text="6" />
        </TableRow>

        <TableRow >

            <Button
                binding:onClick="Number1"
                android:text="1" />

            <Button
                binding:onClick="Number2"
                android:text="2" />

            <Button
                binding:onClick="Number3"
                android:text="3" />
        </TableRow>

        <TableRow >

            <Button
                android:layout_span="2"
                binding:onClick="Number0"
                android:text="0" />

            <Button
                binding:onClick="Dot"
                android:text="." />
        </TableRow>

        <TableRow >

            <Button
                binding:onClick="Equal"
                android:text="Convert" />
        </TableRow>
    </TableLayout>

</LinearLayout>

but it not aligning the buttons properly

how to resolve the issue and get desired output?

Can anyone tell me how to choose Layout, so that we can get proper output?

XML output shows are

enter image description here

  • 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-27T19:32:11+00:00Added an answer on May 27, 2026 at 7:32 pm

    Take your Convert Button out of the TableLayout and paste it at last place inside LinearLayout after TableLayout as:

    <LinearLayout ...  >
        <TextView/>
        <TableLayout>
            <TableRows etc>
        </TableLayout>
        <Button android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            binding:onClick="Equal"
            android:text="Convert" />
    </LinearLayout>
    

    and this is giving me the result:

    ScreenShot

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

Sidebar

Related Questions

I have an xml as below < Image>ImageValue1 <Type>png</Type> <Value>ImageValue1</ Value> </ Image> Here
I have a symmetric matrix like shown in the image attached below. I've made
I have made a similar kind of image viewer mentioned in below site for
This is my css for a paypal sprite I have made.. Image below shows
I have made an android application where image will save to local database when
In the image below, the top image is what I currently have on a
I have to represent graphically an oriented graph like in the image below. alt
I want to create an example like the image below but instead have a
I have an interface that has large numbers of controls, see image below. Interface
I have three tables as shown in below image. Note: Lead column of projectheader

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.