Hello,
Welcome to our Microsoft Q&A platform!
Here is an workaround to add the text-element appear.
using Android.Content;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(RadioButton), typeof(ProjectName.Droid.Renderers.PatchedRadioButtonRenderer))]
namespace ProjectName.Droid.Renderers
{
/// <summary>
/// A workaround for the issue in the in-box renderer.
/// https://github.com/xamarin/Xamarin.Forms/issues/11700
/// </summary>
public class PatchedRadioButtonRenderer : RadioButtonRenderer
{
public PatchedRadioButtonRenderer(Context context) : base(context) {}
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
// Apply text to native radio button
this.Control.Text = e.NewElement.Text;
base.OnElementChanged(e);
}
}
}
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.