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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:07:43+00:00 2026-06-09T13:07:43+00:00

I have a screen with 4 ImageButton in a 2×2 Grid (using TableLayout). I

  • 0

I have a screen with 4 ImageButton in a 2×2 Grid (using TableLayout).

I need to give support to all the different screen sizes. So I created the 4 layout folders (small, medium, large and extralarge).

It worked ok for the position of the ImageButton. But on large and extralarge screens the ImageButton’s size are too small.

I tried to solve this problem using the 4 folders for diferents density (drawable-ldpi, drawable-mdpi, drawable-hdpi and drawable-xhdpi) using the x0.75, x1, x1.5 and x2 relation between mdpi and the others folders.

But I thinks that is not working or is not the right way to resolve this.

It is that the right way to resolved?

I worry about small screen but with Hight Density. Or Medium screen with low density. In those cases maybe is not working, right?

Other idea that I have, is to force the ImageButton’s size (measure in dips) on every layout of every sizes folder. It that a better way to resolved?

I really lost with this. I want to apply the best/correct solution.

Can somebody help me?

Thanks and sorry for my poor english

Update:

This is the layout:

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

    <TableRow
        android:gravity="center"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:layout_marginTop="60dip"  >

        <ImageButton
            android:id="@+id/newCard_button"
            android:layout_margin="10dip"    
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"             
            android:background="@drawable/selector_new_card_button"/>

        <ImageButton
            android:id="@+id/showLastTicket_button"
            android:layout_margin="10dip"      
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"          
            android:background="@drawable/selector_show_last_ticket_button"/>

    </TableRow>

    <TableRow
        android:gravity="center"        
        android:layout_height="fill_parent"
        android:layout_width="fill_parent">

         <ImageButton
            android:id="@+id/cancelLastTransaction_button"
            android:layout_margin="10dip"      
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"           
            android:background="@drawable/selector_anulla_button"/>

        <ImageButton
            android:id="@+id/searchCustomer_button"
            android:layout_margin="10dip"      
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:background="@drawable/selector_search_customer_button"/>

    </TableRow>
</TableLayout>
  • 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-09T13:07:44+00:00Added an answer on June 9, 2026 at 1:07 pm

    You could try to adjust ImageButton’s width and height values in your layout by giving exact values like 50dip instead of wrap content. dip value is going to appear in different sizes in different screens as dip means Density Independent Pixels.

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

Sidebar

Related Questions

i have a screen with multiple little widgets (all with different divs around them).
Does Python have screen scraping libraries that offer JavaScript support? I've been using pycurl
I have a FrameLayout (all the screen is the FL) wich haves a openGLview
I have a small Android ImageButton on a screen representing an icon. The problem
I have 9 screen coordinates, each representing one of 9 positions. From the top
i have a screen and it is i want the buttons to put under
I have search screen which has 10 fields and involves around 5 to 6
I have a screen that is supposed to have a few large sections of
i have a screen contains just two components 1-textView 2-button the textView starts from
I have a screen with pivot functionality, and I'd very much like just one

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.