MobileEntryRenderer.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. using Android.Content;
  2. using Android.Graphics.Drawables;
  3. using Android.Text;
  4. using Xamarin.Forms;
  5. using Xamarin.Forms.Platform.Android;
  6. using InABox.Mobile;
  7. using InABox.Mobile.Android;
  8. [assembly: ExportRenderer(typeof(MobileEntry), typeof(MobileEntryRenderer))]
  9. namespace InABox.Mobile.Android
  10. {
  11. class MobileEntryRenderer : EntryRenderer
  12. {
  13. public MobileEntryRenderer(Context context) : base(context)
  14. {
  15. }
  16. protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
  17. {
  18. base.OnElementChanged(e);
  19. if (Control != null)
  20. {
  21. GradientDrawable gd = new GradientDrawable();
  22. gd.SetColor(global::Android.Graphics.Color.Transparent);
  23. this.Control.SetBackgroundDrawable(gd);
  24. //this.Control.SetRawInputType(InputTypes.TextFlagNoSuggestions);
  25. //Control.SetHintTextColor(ColorStateList.ValueOf(global::Android.Graphics.Color.White));
  26. }
  27. }
  28. }
  29. }