Bug 29379 - Device.Idiom returns incorrect value when in landscape
Summary: Device.Idiom returns incorrect value when in landscape
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-24 13:01 UTC by Cody Beyer (MSFT)
Modified: 2015-05-20 20:46 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Cody Beyer (MSFT) 2015-04-24 13:01:46 UTC
### Description

The below linked test app displays what idiom is being used at runtime. On a tablet, it displays the correct Idiom when launched on portrait, but if in Landscape, it claims to be a phone. 

### Test Case 

https://www.dropbox.com/s/y5vyqfa5cmvzocs/TestIdiom.zip?dl=0

### Test Cloud Link

https://testcloud.xamarin.com/test/testidiom.droid_3af433aa-cec2-4c8e-908e-3b052d101b0e/

### Steps to Reproduce

1. Download and open Test Case
2. Deploy to Tablet

### Expected Results

App should display the correct idiom (Tablet)

### Actual Results

App displays incorrect idiom (Phone)

### Versions

=== Xamarin Studio ===

Version 5.9 (build 431)
Installation UUID: ad159da4-fe22-4bfe-8be6-52e4b844ec90
Runtime:
	Mono 4.0.0 ((detached/d136b79)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000143

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: 8.10.0.266 (Business Edition)
Hash: c8648f0
Branch: master
Build date: 2015-04-21 12:22:24-0400

=== Xamarin.Android ===

Version: 5.1.0.115 (Business Edition)
Android SDK: /Users/beyerc/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.262 (Business Edition)

=== Build Information ===

Release ID: 509000431
Git revision: 7560726734fc7267de2fa9abed2509968deefaa8
Build date: 2015-04-17 19:25:48-04
Xamarin addins: 2e772c734ab3148054eae7bf8949f340fdeb5e5e

=== Operating System ===

Mac OS X 10.10.3
Darwin Codys-MBP 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 1 Cody Beyer (MSFT) 2015-04-28 00:28:13 UTC
I have confirmed this bug with the provided sample
Comment 2 Jason Smith [MSFT] 2015-05-20 20:46:35 UTC
This is due to the reported screen size by android changing. Unfortunately this causes it to fall into a different size category which we then end up classifying as a phone. Due to this and other issues we are looking for ways to deprecate device.idiom and replace it with a more adaptive solution.