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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:55:08+00:00 2026-05-25T20:55:08+00:00

In My Application i have to use the Calculator. The Different Button in Calculator

  • 0

In My Application i have to use the Calculator.
The Different Button in Calculator should be like below image.
enter image description here

So, What should be better to implement such type of the Layout ?
I think gridView is good, but while thinking about the “0” Button and the Button below “C” button, I dont know how to set it in to the gridview.
So Anybudy tell me which one is the Best way to set this type of layout ?
recently i have use the relative layout to set this layout.
Please help me regarding this. and if the GridView is nice with this then tell me what should i have to do with that two buttons: one is “0” button and second is the Button that is below thee Button of “left errow”.

Code to have Use the RelativeLayout:

<RelativeLayout android:id="@+id/calculationButtonLayout"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_below="@+id/totalAmount" android:layout_margin="10dp">

        <RelativeLayout android:id="@+id/linear_layout" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:orientation="vertical"
            android:layout_centerInParent="true" android:gravity="center_horizontal">

            <!-- First row Start -->

                <Button android:id="@+id/sevenNumber" 
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="7" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>

                <Button android:id="@+id/eightNumber" android:layout_toRightOf="@+id/sevenNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="8" android:textColor="#ffffff" android:textSize="22dp"
                    android:background="@drawable/selector_button"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"/>

                <Button android:id="@+id/nineNumber" android:layout_toRightOf="@+id/eightNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="9" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>    

                <Button android:id="@+id/acButton" android:layout_toRightOf="@+id/nineNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="AC" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/brown_button"/>

            <!-- First row Finish -->

            <!-- Second row Start -->

                <Button android:id="@+id/fourNumber" android:layout_below="@+id/sevenNumber" 
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="4" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>

                <Button android:id="@+id/fiveNumber" android:layout_toRightOf="@+id/fourNumber" android:layout_below="@+id/eightNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="5" android:textColor="#ffffff" android:textSize="22dp"
                    android:background="@drawable/selector_button"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"/>

                <Button android:id="@+id/sixNumber" android:layout_toRightOf="@+id/fiveNumber" android:layout_below="@+id/nineNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="6" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>    

                <Button android:id="@+id/clearButton" android:layout_toRightOf="@+id/sixNumber" android:layout_below="@+id/acButton"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="C" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/brown_button"/>

            <!-- Second row finish -->

            <!-- Third row Start -->


                <Button android:id="@+id/oneNumber" android:layout_below="@+id/fourNumber" 
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="1" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>

                <Button android:id="@+id/twoNumber" android:layout_toRightOf="@+id/oneNumber" android:layout_below="@+id/fiveNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="2" android:textColor="#ffffff" android:textSize="22dp"
                    android:background="@drawable/selector_button"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"/>

                <Button android:id="@+id/threeNumber" android:layout_toRightOf="@+id/twoNumber" android:layout_below="@+id/sixNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="3" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>    



            <!-- Third row finish -->

            <!-- Fourth row Start -->


                <Button android:id="@+id/zeroNumber" android:layout_below="@+id/oneNumber"
                    android:layout_height="50dp" android:layout_width="110dp"
                    android:text="0" android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:background="@drawable/selector_button"/>

                <Button android:id="@+id/dotNumber" android:layout_toRightOf="@+id/zeroNumber" android:layout_below="@+id/threeNumber"
                    android:layout_height="50dp" android:layout_width="50dp"
                    android:text="." android:textColor="#ffffff" android:textSize="22dp"
                    android:background="@drawable/selector_button"
                    android:layout_marginTop="5dp" android:layout_marginBottom="5dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"/>

                <Button android:id="@+id/doNothing" android:layout_toRightOf="@+id/threeNumber" android:layout_height="wrap_content" android:layout_width="50dp"
                    android:textColor="#ffffff" android:textSize="22dp"
                    android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
                    android:background="@drawable/do_nothing_button" android:layout_alignBottom="@+id/dotNumber" android:layout_alignTop="@+id/threeNumber"/>

            <!-- Third row finish -->

        </RelativeLayout>

    </RelativeLayout>

The Image that i got after this Layout is:
enter image description here

In this Image the Keypad is not fit to the Whole Middle Window. I want to fit it in to the Window also.
So What should i have to do for it ?

  • 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-25T20:55:09+00:00Added an answer on May 25, 2026 at 8:55 pm

    You should use Relative layout as it will adjust itself with different resolution screens.

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

Sidebar

Related Questions

In my Android application I have to use common string value for all activities.
i have application who use specific process during running and i want to sample
I have started a new web application and have decided to use jquery as
I have application which needs to use a dll (also written by me) which
I have to use an ugly C-library inside my c++ application. In the following
I have an external (.Net) dll that I have to use for an application.
I am creating a chat application. In this chat application, I have to use
I have MVC application configured to use Forms Authentication. I'm signing out users by
I have an application which will use WCF to serve up various chunks of
I have C# application that makes use of some C libaries(which I have written

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.