Hello,
EntryRenderer
and EditorRenderer
is deprecated, please use handler to implement it. you can add following code to your layout background code to make a test. It works in Android 11 or 13
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping(nameof(Entry), (handler, view) =>
{
if (view is CustomEntry)
{
#if ANDROID
handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent); handler.PlatformView.SetRawInputType(InputTypes.TextFlagNoSuggestions);
#endif
}
});
Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping(nameof(Editor), (handler, view) =>
{
if (view is CustomNoUnderLineEditor)
{
#if ANDROID
handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent); handler.PlatformView.SetRawInputType(Android.Text.InputTypes.TextFlagNoSuggestions);
handler.PlatformView.SetHintTextColor(Android.Graphics.Color.Gray);
#endif
}
});
By the way, if you use custom renderer and set Background="Transparent"
, you will get the blank result, if you remove Background="Transparent"
, it is working as well.
>entry text is not visible.
You can set text color in the handler with handler.PlatformView.SetTextColor(Android.Graphics.Color.ParseColor("Black"));
,
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.