Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms 4.1: Device.GetNamedSize throws exception on Android #6517

Closed
davidbritch opened this issue Jun 13, 2019 · 2 comments
Closed

Forms 4.1: Device.GetNamedSize throws exception on Android #6517

davidbritch opened this issue Jun 13, 2019 · 2 comments
Assignees
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/2 🕑 2 p/Android t/bug 🐛
Milestone

Comments

@davidbritch
Copy link

davidbritch commented Jun 13, 2019

Description

In Forms 4.1-pre1, calling Device.GetNamedSize on Android fails (ArgumentOutOfRangeException) for the following NamedSizes: Body, Header, Title, Subtitle, Caption.

            var size1 = Device.GetNamedSize(NamedSize.Default, typeof(Label));
            var size2 = Device.GetNamedSize(NamedSize.Micro, typeof(Label));
            var size3 = Device.GetNamedSize(NamedSize.Small, typeof(Label));
            var size4 = Device.GetNamedSize(NamedSize.Medium, typeof(Label));
            var size5 = Device.GetNamedSize(NamedSize.Large, typeof(Label));
            var size6 = Device.GetNamedSize(NamedSize.Body, typeof(Label));
            var size7 = Device.GetNamedSize(NamedSize.Header, typeof(Label));
            var size8 = Device.GetNamedSize(NamedSize.Title, typeof(Label));
            var size9 = Device.GetNamedSize(NamedSize.Subtitle, typeof(Label));
            var size10 = Device.GetNamedSize(NamedSize.Caption, typeof(Label));

Steps to Reproduce

  1. On Android, call Device.GetNamedSize for Body, Header, Title, Subtitle, and Caption.

Expected Behavior

double values are returned.

Actual Behavior

An ArgumentOutOfRangeException is thrown.

Basic Information

  • Version with issue: 4.1.0.483098
  • IDE: VS for Mac 8.0.9
  • Platform Target Frameworks:
    • Android: 9.0
  • Android Support Library Version: Transitive restore from the Forms NuGet
@davidbritch davidbritch added t/bug 🐛 s/unverified New report that has yet to be verified labels Jun 13, 2019
@pauldipietro pauldipietro added this to New in Triage Jun 13, 2019
@davidbritch
Copy link
Author

Looks like #5985 didn't do all the required modifications for Android (https://github.com/xamarin/Xamarin.Forms/blob/4.1.0/Xamarin.Forms.Platform.Android/Forms.cs#L629).

@samhouts samhouts added this to the 4.1.0 milestone Jun 13, 2019
@samhouts samhouts added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Jun 13, 2019
@samhouts samhouts added this to To do in Sprint 154 via automation Jun 13, 2019
@samhouts samhouts added e/2 🕑 2 and removed s/unverified New report that has yet to be verified labels Jun 13, 2019
@samhouts samhouts moved this from New to Ready For Work in Triage Jun 13, 2019
@samhouts samhouts added this to To do in v4.1.0 Jun 13, 2019
@StephaneDelcroix
Copy link
Member

/cc @Clancey

@jfversluis jfversluis self-assigned this Jun 19, 2019
@samhouts samhouts moved this from To do to In Progress in v4.1.0 Jun 19, 2019
@samhouts samhouts moved this from To do to Ready for Review (Issues) in Sprint 154 Jun 19, 2019
@samhouts samhouts removed this from Ready For Work in Triage Jun 19, 2019
@samhouts samhouts moved this from In Progress to Done in v4.1.0 Jun 20, 2019
@samhouts samhouts moved this from Ready for Review (Issues) to Done in Sprint 154 Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. e/2 🕑 2 p/Android t/bug 🐛
Projects
No open projects
Sprint 154
  
Done
v4.1.0
  
Done
Development

No branches or pull requests

4 participants