0

Before, I didn't set the minSDKVersion in my manifest file and all works good. But now as I'm using a ScaleGestureDetector, I'd like to set it:

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>

My phone is in 2.2 so the launch is ok, but when I'm on the activity which uses the ScaleGestureDetector, all the user interface is strange: it seems that it's displayed for another screen resolution ! The image I resize to fit the screen is smaller than the screen (but the ImageView in which the image is is at the good size), and the layout I set in the bottom of the screen is stretched (in fact its width is always the screen width but it's less heighter than usal). What's the problem?

Imotep
  • 2,006
  • 2
  • 25
  • 38
  • Do you set this layout in XML or code? Show us this snippet – Blundell Aug 19 '11 at 08:56
  • both of them in fact :/ I tried to replace "fill_parent" with "match_parent" but that did'nt change anything. The bottom layout is added to the main layout with (fill_parent,22), so the height should be the same, which is not the case > – Imotep Aug 19 '11 at 09:11
  • Your not helping much, without a code example it's just guess work. – Blundell Aug 19 '11 at 09:25

1 Answers1

0

Probably that your hardcoding 22pixels in your footer view height.

You'll be wanting to read this:

What is the correct way to specify dimensions in DIP from Java code?

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233
  • well, the screen size didn't change so 22px are 22px, it should be the same height (and in code I can't give the layoutparams dps, just px). And that don't explain the image problems. – Imotep Aug 19 '11 at 09:20
  • Your 2nd question: I like the way you read what I linked ... this would convert your 22px to the relevant dip. – Blundell Aug 19 '11 at 09:24
  • oh, didn't see the link --' this work good for the bottom layout thx, i'll try the same trick for the image – Imotep Aug 19 '11 at 09:37
  • but that sound strange.... the density of the screen can change with a different system version? – Imotep Aug 19 '11 at 09:42
  • Nope but it removes that issue from the possibilities – Blundell Aug 19 '11 at 09:45