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

  • Home
  • SEARCH
  • 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 6253959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:06:47+00:00 2026-05-24T14:06:47+00:00

I am a total noob so I might have gotten the basics wrong but

  • 0

I am a total noob so I might have gotten the basics wrong but this is just confusing the heck out of me.

I have one image button and one background image here
(note: bikini girl so might be NSFW – I figured if i was going to be seeing this screen for a long time i might as well have something interesting there ;D )

http://imageshack.us/photo/my-images/6/finaldi.jpg/

As you can see at different screen sizes the background image scales fine, but my image button at first has a weird border around it and then it just starts shrinking.

I have made the same image button in 36×36,48×48,72×72 and 96×96 and put them in the
drawable-ldpi,drawable-mdpi,drawable-hdpi directories without any change 🙁

How can I get that button to be the same on all screens?
I was reading on DIP but where do i declare that?

Thanks!

EDIT, The XML code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" android:background="@drawable/background_ass">
    <TableLayout android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:layout_width="fill_parent">
        <TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content">
            <ImageButton android:src="@drawable/level1" 
                android:id="@+id/imageButton1" 
                android:onClick="button_clicked1"
                android:background="#00000000"  android:layout_width="48dip" android:layout_height="48dip">
            </ImageButton>
        </TableRow>
        <TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content">
            <TextView android:text="TextView" android:id="@+id/textView1" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content"></TextView>
        </TableRow>
        <TableRow android:id="@+id/tableRow3" android:layout_width="wrap_content" android:layout_height="wrap_content">
        </TableRow>
        <TableRow android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
    </TableLayout>

</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-24T14:06:48+00:00Added an answer on May 24, 2026 at 2:06 pm

    Afaik the ImageButton has a minimal size, that’s the visible border. You can get rid of it by defining a transparent background and zero padding:

    <ImageButton ... background="#00000000" padding="0px"/>
    

    update after having the code:
    The problem here is that the width and height of the ImageButton are fixed and the image is not told to scale.

    The SDK docs give some explanation about handling multiple screen sizes/resolutions, but it’s not a trivial issue!
    My recommendation would be, depending on your needs:

    • If the relative size (dip) should be exactly the same on all devices, add scaleType=”fitXY” to the declaration of the ImageButton
    • If it’s ok to have the size slighly change, set layout_width and layout_height to “wrap_content”.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this might sound very stupid but I am a total noob in
Total noob question, but here. CSS .product__specfield_8_arrow { /*background-image:url(../../upload/orng_bg_arrow.png); background-repeat:no-repeat;*/ background-color:#fc0; width:50px !important; height:33px
OK, total noob question, for msysgit on Windows 7, but I have a remote
So, i'm a total noob with codeigniter but i'm getting by. I have a
I am a total noob on this issue, and I wonder if I have
I am a total NOOB in programming (but this is only my second question
This one is killing me,i'm a total noob with regex. Im trying to make
This might be a pretty simple question but I'm a Crystal Reports newbie...I have
Hey! Total CakePHP noob here. Updated at bottom / This is sort of a
Total newbie question but this is driving me mad! I'm trying this: myInt =

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.