0

I have a background image of size 720x1280 for larger screen phones like the LG Nitro P930. However, when I have an application that displays this image, it doesn't cover about half an inch at the bottom of the screen. The image looks fine on normal and small screen sizes, and I have included all of the support screens in my manifest file.

Is there something that I can do that will allow me to stretch the image to fit the screen, or am I doing something wrong?

wattostudios
  • 8,666
  • 13
  • 43
  • 57
  • add android:scaleType="fitXY" http://stackoverflow.com/a/9478320/1012284 – Padma Kumar Apr 09 '12 at 15:01
  • I think you should use `fill_parent` for height and width both in you layout xml. – Ravi1187342 Apr 09 '12 at 15:02
  • I'm using background not an imageview. Should I switch? – UndercoverGeek Apr 09 '12 at 15:04
  • Please don't use `fitXY` unless your background image has no details whatsoever. It will stretch it without regard to aspect ratio and will distort the image. Use `centerInside` or `centerCrop` instead, which will fit the image while maintaining aspect ratio (some cropping will occur). – Kevin Coppock Apr 09 '12 at 15:25
  • My application consist of tabs, another thing I see is if I remove the background image and just change the color that half of inch is still black at the bottom. Any thoughs? – UndercoverGeek Apr 09 '12 at 15:52

2 Answers2

0

add android:scaleType="fitXY" and fill_parent for height and width both in you layout xml


You don't have to use image view background should work fine, are you using a scroll view per chance somewhere?

Broak
  • 4,161
  • 4
  • 31
  • 54
0

I figured it out. It was actually a setting on the phone that optimizes the application.