Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Xamarin.Forms 5.0: RadioButton content layout on iOS #13374

Closed
davidbritch opened this issue Jan 12, 2021 · 0 comments · Fixed by #13382
Closed

[Bug] Xamarin.Forms 5.0: RadioButton content layout on iOS #13374

davidbritch opened this issue Jan 12, 2021 · 0 comments · Fixed by #13382

Comments

@davidbritch
Copy link

davidbritch commented Jan 12, 2021

Description

In Xamarin.Forms 5.0.0.1558-pre3, RadioButton content was left aligned by default on iOS and Android:

iOS:
Simulator Screen Shot - iPhone 11 - 2021-01-12 at 09 52 13

Android:
Screenshot_1610446430

This is based on the following code, which doesn't set any alignment options:

        <RadioButton Content="Cat"
                     CheckedChanged="OnAnimalRadioButtonCheckedChanged" />
        <RadioButton Content="Dog"
                     CheckedChanged="OnAnimalRadioButtonCheckedChanged" />
        <RadioButton Content="Elephant"
                     CheckedChanged="OnAnimalRadioButtonCheckedChanged" />
        <RadioButton Content="Monkey"
                     IsChecked="True"
                     CheckedChanged="OnAnimalRadioButtonCheckedChanged" />

However, in Xamarin.Forms 5.0.0.1874, RadioButton content is centred by default on iOS:

Simulator Screen Shot - iPhone 11 - 2021-01-12 at 09 49 34

On Android, the content is still left-aligned by default.

I tried different pre-releases and the RadioButton content became centred by default on iOS in 5.0.0.1709-pre4.

Steps to Reproduce

  1. Run the attached sample.
  2. Browse to the "Basic RadioButtons" page on iOS.

Expected Behavior

RadioButton content is left-aligned by default.

Actual Behavior

RadioButton content is centred by default.

Basic Information

  • Version with issue: 5.0.0.1874
  • Last known good version: 5.0.0.1558-pre3
  • Platform Target Frameworks:
    • iOS: 14.2

Environment

Show/Hide Visual Studio info
=== Visual Studio Enterprise 2019 for Mac ===

Version 8.8.4 (build 30)
Installation UUID: e691732d-c462-4fe8-b688-f13ac2cc1ab3
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000113

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.113 (2020-02/4fdfb5b1fd5) (64-bit)
	Package version: 612000113

=== Roslyn (Language Service) ===

3.8.0-5.20519.18+4c195c3ac1974edcefa76774d7a59a2350ec55fa

=== NuGet ===

Version: 5.8.0.6860

=== Xamarin Designer ===

Version: 16.8.0.510
Hash: 44e3f3ce9
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:06:14 UTC

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.101/Sdks
SDK Versions:
	5.0.101
	5.0.100
	3.1.404
	3.1.403
	3.1.402
	3.1.401
	3.1.302
	3.1.301
	3.1.300
	3.1.202
	3.1.200
	3.1.102
	3.1.101
	3.1.100
	3.0.101
	3.0.100
	2.1.701
	2.1.700
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	5.0.1
	5.0.0
	3.1.10
	3.1.9
	3.1.8
	3.1.7
	3.1.6
	3.1.5
	3.1.4
	3.1.2
	3.1.1
	3.1.0
	3.0.1
	3.0.0
	2.1.23
	2.1.22
	2.1.21
	2.1.20
	2.1.19
	2.1.18
	2.1.17
	2.1.16
	2.1.15
	2.1.14
	2.1.13
	2.1.12
	2.1.11

=== .NET Core 3.1 SDK ===

SDK: 3.1.404

=== Xamarin.Profiler ===

Version: 1.6.12.26
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 11.1.0.17 (Visual Studio Enterprise)
Commit: xamarin-android/d16-8/c0e2b8e
Android SDK: /Users/davidbritch/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		7.0 (API level 24)
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2

Build Information: 
Mono: be2226b
Java.Interop: xamarin/java.interop/d16-8@79d9533
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-8@2fb1cbc

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/davidbritch/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.8.0.32
Hash: 01a7774
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:24 UTC

=== Android Device Manager ===

Version: 16.8.0.46
Hash: 0a81419
Branch: remotes/origin/d16-8
Build date: 2020-12-10 00:32:44 UTC

=== Apple Developer Tools ===

Xcode 12.2 (17535)
Build 12B45b

=== Xamarin.Mac ===

Version: 7.0.0.15 (Visual Studio Enterprise)
Hash: 87a1b18d8
Branch: d16-8
Build date: 2020-11-16 21:39:40-0500

=== Xamarin.iOS ===

Version: 14.6.0.15 (Visual Studio Enterprise)
Hash: 87a1b18d8
Branch: d16-8
Build date: 2020-11-16 21:39:41-0500

=== Build Information ===

Release ID: 808040030
Git revision: eaa21a8983aa5c4bcf6a665892478b4f3d413418
Build date: 2020-12-10 11:06:12-05
Build branch: release-8.8
Xamarin extensions: eaa21a8983aa5c4bcf6a665892478b4f3d413418

=== Operating System ===

Mac OS X 10.15.4
Darwin 19.4.0 Darwin Kernel Version 19.4.0
    Wed Mar  4 22:28:40 PST 2020
    root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

Reproduction Link

RadioButtonDemos.zip

Workaround

Set HorizontalOptions to Start:

<RadioButton Content="Cat" HorizontalOptions="Start"  />
@davidbritch davidbritch added t/bug 🐛 s/unverified New report that has yet to be verified labels Jan 12, 2021
@samhouts samhouts added this to New in Triage Jan 12, 2021
@hartez hartez added a/radiobutton 🔘 and removed s/unverified New report that has yet to be verified labels Jan 12, 2021
@hartez hartez self-assigned this Jan 12, 2021
@hartez hartez added this to To do in iOS Ready For Work via automation Jan 12, 2021
@hartez hartez removed this from New in Triage Jan 12, 2021
@hartez hartez added 5.0.0 Regression on 5.0.0 i/regression labels Jan 12, 2021
@hartez hartez added this to the 5.0.0 milestone Jan 12, 2021
@hartez hartez added this to To do in vNext+1 (5.0.0) via automation Jan 12, 2021
@hartez hartez moved this from To do to In progress in iOS Ready For Work Jan 12, 2021
@hartez hartez moved this from To do to In Review in vNext+1 (5.0.0) Jan 12, 2021
@PureWeen PureWeen moved this from In Review to In Progress in vNext+1 (5.0.0) Jan 13, 2021
iOS Ready For Work automation moved this from In progress to Done Jan 15, 2021
vNext+1 (5.0.0) automation moved this from In Progress to Done Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants