PATRIK27 / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Galaxy Tablet: map view is not drawn using entire screen #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Problem when I execute my app on the large screen of the Samsung Galaxy 
tablet
2. App draws ok on a typical Android phone (such as Samsung Galaxy)

What is the expected output? What do you see instead?
I expect to see the map view use the entire screen of the tablet.
However, it only uses a portion of the screen.

What version of the product are you using? On what operating system?
I am using the Android 2.2 OS on the Galaxy Tablet.
I am using osmdroid jar Version 3.0

Please provide any additional information below.

Original issue reported on code.google.com by olub...@gmail.com on 17 Jan 2011 at 6:22

GoogleCodeExporter commented 8 years ago
I see the same thing on an emulator with a screen resolution of 1024x600.

I think it's because OpenStreetMapViewer has sdk version 3 (1.5) which doesn't 
support large screens.  If I change to 4 then it uses the full screen.  Perhaps 
someone can confirm this.  Then it's "by design".

Original comment by neilboyd on 18 Jan 2011 at 9:02

GoogleCodeExporter commented 8 years ago
Neil, this is likely the case. I've had similar experiences in other projects 
where not setting a min sdk version wouldn't utilize the maximum resolution of 
the screen, and then once I set the min sdk (to 4 in my case) it would 
magically go hi-res. Personally, I'm in favor of bumping the API requirements 
to Android version 1.6, but I think there were some reservations in the past to 
doing this, but I don't remember what they were.

Original comment by kurtzm...@gmail.com on 20 Jan 2011 at 5:03

GoogleCodeExporter commented 8 years ago
The reservations are that 1.5 is still quite widely used. So if there's no 
reason to increase to 1.6 then don't do so. But if this is a reason, then 
perhaps it's time. 1.6 is better at handling screen resolutions.

Original comment by neilboyd on 20 Jan 2011 at 6:14

GoogleCodeExporter commented 8 years ago
Neil,

I am using an X10 which I believe has a medium-density screen. When I bump up 
the API to 4, the map is "smaller" which translates to that it is using the 
real resolution of the device now. Also the MyLocation "person" icon is 
correctly sized.

And I'm not so sure that 1.5 is widely used anymore:
http://developer.android.com/resources/dashboard/platform-versions.html

Original comment by kurtzm...@gmail.com on 21 Jan 2011 at 1:57

GoogleCodeExporter commented 8 years ago
4.7% of a very large number is a lot of phones!  The old osmdroid was 
downloaded from Market approximately 15000 times, which makes about 700 users.  
I don't know how many users have tablets, but I'd guess it's much less than 
4.7%.

So basically I'd prefer to defer this until the 1.5 users drop some more.

Original comment by neilboyd on 21 Jan 2011 at 11:06

GoogleCodeExporter commented 8 years ago
I may have a solution - in API 4 they added a targetSdkVersion attribute 
(http://developer.android.com/guide/topics/manifest/uses-sdk-element.html). We 
can compile against API 4, set our minSdkVersion to 3 and set our 
targetSdkVersion to 4. This works in an 1.5 emulator, and it allows my phone 
(API 7) to properly scale the screen.

The only downside I can see is that we have to be careful to not use API 4 
calls. If we do they will compile without complaint and run on all API 4+ 
phones. However if it runs on an API 3 phone it will throw a VerifyError. Maybe 
there is a way to make eclipse throw a warning if we use an API 4 call.

Original comment by kurtzm...@gmail.com on 30 Jan 2011 at 7:01

GoogleCodeExporter commented 8 years ago
Neil - I think it's time to pull the trigger on this. I've been using this 
solution for the past two weeks and it seems like a good solution. It keeps 
compatibility with API 3 and allows the app to run at full resolution. Agreed?

Original comment by kurtzm...@gmail.com on 13 Feb 2011 at 6:58

GoogleCodeExporter commented 8 years ago
Agreed. It means we have to remember to switch back to API 3 now and then to 
make sure it still compiles.

Original comment by neilboyd on 13 Feb 2011 at 7:02

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r803.

Original comment by neilboyd on 13 Feb 2011 at 7:08

GoogleCodeExporter commented 8 years ago
Thanks!!

Will this fix be in the next jar?
Olaf

Original comment by olub...@gmail.com on 14 Feb 2011 at 3:57