[android-developers] Re: Wrong resolution ???

2012-11-23 Thread RichardC
What does android.util.DisplayMetrics:
http://developer.android.com/reference/android/util/DisplayMetrics.html

give you?


On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote:

 Hi there, 

 I have an emulator instance that seems to be reporting wrong resolution, 
 but I am not sure if it is a problem of the emulator or may be also a 
 problem in an actual device with same setup since I have no one. I use 
 this code to get the resolution: 

 getWindowManager().getDefaultDisplay().getWidth() 
 getWindowManager().getDefaultDisplay().getHeight() 

 The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches 
 screen and 1280x800 resolution, with software buttons. The problem is 
 that putting it on landscape mode (pressing ctrl+f12, you know), and 
 executing my app, it reports following resolution: 

 1238x752 

 I would understand that 752 due these 48 pixels being reserved for the 
 software buttons, but the 1238 has no sense at all: software buttons are 
 put just in one position depending on device orientation, not both... 

 Do you think it is just an emulator bug or may I found this situation on 
 actual devices? 

 Thanks a lot in advance, 





-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Wrong resolution ???

2012-11-23 Thread jtoolsdev
Probably confusion.  It's kind of hard to sort out information from those 
documents.  In fact I found that emulators and real devices were picking up 
different dimens.xml files I was using for setting font sizes than what the 
documentation claimed.  Fortunately this had also been discovered by other 
developers on Stackoverflow and with provided solutions.

Samsung seems to be a major culprit in designing devices that are tricky to 
create emulators for.  They really need to supply emulator images for the 
devices that don't fall in line with Android standard pixel densities.  
However as I read recently Google is changing the licensing to prevent 
this.  If you are familiar with the hardware industry they do this to 
differentiate their different models which benefits marketing but not 
developers or consumers.

On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote:

 What does android.util.DisplayMetrics:
 http://developer.android.com/reference/android/util/DisplayMetrics.html

 give you?


 On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote:

 Hi there, 

 I have an emulator instance that seems to be reporting wrong resolution, 
 but I am not sure if it is a problem of the emulator or may be also a 
 problem in an actual device with same setup since I have no one. I use 
 this code to get the resolution: 

 getWindowManager().getDefaultDisplay().getWidth() 
 getWindowManager().getDefaultDisplay().getHeight() 

 The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches 
 screen and 1280x800 resolution, with software buttons. The problem is 
 that putting it on landscape mode (pressing ctrl+f12, you know), and 
 executing my app, it reports following resolution: 

 1238x752 

 I would understand that 752 due these 48 pixels being reserved for the 
 software buttons, but the 1238 has no sense at all: software buttons are 
 put just in one position depending on device orientation, not both... 

 Do you think it is just an emulator bug or may I found this situation on 
 actual devices? 

 Thanks a lot in advance, 





-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Wrong resolution ???

2012-11-23 Thread Francisco Marzoa

On 11/23/2012 07:52 PM, jtoolsdev wrote:
Probably confusion.  It's kind of hard to sort out information from 
those documents.  In fact I found that emulators and real devices were 
picking up different dimens.xml files I was using for setting font 
sizes than what the documentation claimed. Fortunately this had also 
been discovered by other developers on Stackoverflow and with provided 
solutions.
Erm... do yo think that any of those may be useful for my case? have you 
got any links?


Thanks in advance,



Samsung seems to be a major culprit in designing devices that are 
tricky to create emulators for.  They really need to supply emulator 
images for the devices that don't fall in line with Android standard 
pixel densities.  However as I read recently Google is changing the 
licensing to prevent this.  If you are familiar with the hardware 
industry they do this to differentiate their different models which 
benefits marketing but not developers or consumers.


On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote:

What does android.util.DisplayMetrics:
http://developer.android.com/reference/android/util/DisplayMetrics.html
http://developer.android.com/reference/android/util/DisplayMetrics.html

give you?


On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote:

Hi there,

I have an emulator instance that seems to be reporting wrong
resolution,
but I am not sure if it is a problem of the emulator or may be
also a
problem in an actual device with same setup since I have no
one. I use
this code to get the resolution:

getWindowManager().getDefaultDisplay().getWidth()
getWindowManager().getDefaultDisplay().getHeight()

The emulator tries to be like a Samsung Galaxy Tablet with
10'1 inches
screen and 1280x800 resolution, with software buttons. The
problem is
that putting it on landscape mode (pressing ctrl+f12, you
know), and
executing my app, it reports following resolution:

1238x752

I would understand that 752 due these 48 pixels being reserved
for the
software buttons, but the 1238 has no sense at all: software
buttons are
put just in one position depending on device orientation, not
both...

Do you think it is just an emulator bug or may I found this
situation on
actual devices?

Thanks a lot in advance,



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Wrong resolution ???

2012-11-23 Thread Francisco Marzoa
Exactly the same wrong resolution, and dpi at 160 in all cases as 
expected since it is a mdpi device.


metricsDisplayMetrics  (id=830019718568)
density1.0
densityDpi160
heightPixels752
noncompatDensity1.0
noncompatHeightPixels752
noncompatScaledDensity1.0
noncompatWidthPixels1238
noncompatXdpi160.0
noncompatYdpi160.0
scaledDensity1.0
widthPixels1238
xdpi160.0
ydpi160.0

Regards,

On 11/23/2012 07:37 PM, RichardC wrote:

What does android.util.DisplayMetrics:
http://developer.android.com/reference/android/util/DisplayMetrics.html

give you?


On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote:

Hi there,

I have an emulator instance that seems to be reporting wrong
resolution,
but I am not sure if it is a problem of the emulator or may be also a
problem in an actual device with same setup since I have no one. I
use
this code to get the resolution:

getWindowManager().getDefaultDisplay().getWidth()
getWindowManager().getDefaultDisplay().getHeight()

The emulator tries to be like a Samsung Galaxy Tablet with 10'1
inches
screen and 1280x800 resolution, with software buttons. The problem is
that putting it on landscape mode (pressing ctrl+f12, you know), and
executing my app, it reports following resolution:

1238x752

I would understand that 752 due these 48 pixels being reserved for
the
software buttons, but the 1238 has no sense at all: software
buttons are
put just in one position depending on device orientation, not both...

Do you think it is just an emulator bug or may I found this
situation on
actual devices?

Thanks a lot in advance,



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en 


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Wrong resolution ???

2012-11-23 Thread jtoolsdev
I was looking for it earlier but haven't found it yet.  I don't know if you 
are declaring any dimens.xml but do you have a navigation bar on right when 
landscape?  That would account for the 1238 resolution.  Then the top is 
for the status bar or whatever it is being called these days.  And 160 dpi 
is correct.  In my case I need for the app to use the correct dimens.xml 
file but it wasn't working as advertised.

On Friday, November 23, 2012 11:46:12 AM UTC-8, Fran wrote:

  On 11/23/2012 07:52 PM, jtoolsdev wrote:
  
 Probably confusion.  It's kind of hard to sort out information from those 
 documents.  In fact I found that emulators and real devices were picking up 
 different dimens.xml files I was using for setting font sizes than what the 
 documentation claimed.  Fortunately this had also been discovered by other 
 developers on Stackoverflow and with provided solutions.

 Erm... do yo think that any of those may be useful for my case? have you 
 got any links?

 Thanks in advance,


 Samsung seems to be a major culprit in designing devices that are tricky 
 to create emulators for.  They really need to supply emulator images for 
 the devices that don't fall in line with Android standard pixel densities.  
 However as I read recently Google is changing the licensing to prevent 
 this.  If you are familiar with the hardware industry they do this to 
 differentiate their different models which benefits marketing but not 
 developers or consumers.

 On Friday, November 23, 2012 10:37:30 AM UTC-8, RichardC wrote: 

 What does android.util.DisplayMetrics: 
 http://developer.android.com/reference/android/util/DisplayMetrics.html

  give you?


 On Friday, November 23, 2012 6:04:50 PM UTC, Fran wrote: 

 Hi there, 

 I have an emulator instance that seems to be reporting wrong resolution, 
 but I am not sure if it is a problem of the emulator or may be also a 
 problem in an actual device with same setup since I have no one. I use 
 this code to get the resolution: 

 getWindowManager().getDefaultDisplay().getWidth() 
 getWindowManager().getDefaultDisplay().getHeight() 

 The emulator tries to be like a Samsung Galaxy Tablet with 10'1 inches 
 screen and 1280x800 resolution, with software buttons. The problem is 
 that putting it on landscape mode (pressing ctrl+f12, you know), and 
 executing my app, it reports following resolution: 

 1238x752 

 I would understand that 752 due these 48 pixels being reserved for the 
 software buttons, but the 1238 has no sense at all: software buttons are 
 put just in one position depending on device orientation, not both... 

 Do you think it is just an emulator bug or may I found this situation on 
 actual devices? 

 Thanks a lot in advance, 



   -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en 


  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en