private void SetBorderColor(LogInEntry view) { GradientDrawable gd = new GradientDrawable(); gd.SetColor(Android.Graphics.Color.White); gd.SetStroke(view.BorderThinkness, view.BorderColor.ToAndroid()); gd.SetCornerRadius(10); Control.SetBackgroundDrawable(gd); Control.SetRawInputType(InputTypes.TextFlagNoSuggestions); }
private void SetIcon(LogInEntry view) { if (string.IsNullOrEmpty(view.Icon)) { Control.SetCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0); } else { try { var context = Forms.Context; var resId = context.Resources.GetIdentifier(System.IO.Path.GetFileNameWithoutExtension(view.Icon), "drawable", context.PackageName); Control.SetCompoundDrawablesWithIntrinsicBounds(resId, 0, 0, 0); } catch (Exception) { } } }