[assembly: ExportRenderer(typeof(CustomClass), typeof(CustomRendererAndroid))]
[assembly: ExportRenderer(typeof(CustomClass), typeof(MaterialSfAutoCompleteRenderer), new[] { typeof(VisualMarker.MaterialVisual) })]
namespace CustomRenderer.Droid
{
public class CustomRendererAndroid : SfAutoCompleteRenderer
{
public CustomRendererAndroid(Context context) : base(context)
{
}
public CustomRendererAndroid(Context context, IVisual visual) : base(context, visual)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.SfAutoComplete.XForms.SfAutoComplete> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.GetAutoEditText().ImeOptions = Android.Views.InputMethods.ImeAction.Done;
Control.InputType = Android.Text.InputTypes.TextFlagCapWords;
}
}
}
internal class MaterialSfAutoCompleteRenderer : SfAutoCompleteRenderer
{
public MaterialSfAutoCompleteRenderer(Context context) : base(context, VisualMarker.Material)
{
}
}
} |