Hello,
The reason why your custom control is not visible is that the Google.Android.Material.TextField.TextInputLayout
is a layout class.
Therefore, if you didn't add some view to the layout, it would be blank.
You can try to add the following code into your IMaterialEntryHandler
file, it would make the entry visible.
private TextInputEditText _inputEditText;
public static void MapPlaceholder(MaterialEntryHandler handler, IEntry entry)
{
handler._inputEditText.Hint = entry.Placeholder;
}
protected override TextInputLayout CreatePlatformView()
{
var layout = new TextInputLayout(Context);
_inputEditText = new TextInputEditText(layout.Context);
layout.AddView(_inputEditText);
return layout;
}
Best Regards,
Alec Liu.
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.