There are 2 issues that I have encountered so far with this approach: - on a Samsung tablet running Android 4, setting to portrait in code will ignore the current portrait orientation and show the device upside down (if I held it in one way with the logo on left). This does not happen if setting the portrait in the manifest file.
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) - on HTC Jetstream running Android 3.x, it will always report width and height regardless of whether the device in portrait and landscape. i.e., you might be holding the device in portrait but yet the width is more than height! 在 2012年7月27日星期五UTC+8下午3时57分34秒,Zsolt Vasvari写道: > > You should be checking the DPI, not the absolute pixel count. I dont know > about the upside down part. > > -- 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