private void Initialize(Context context, IAttributeSet attrs) { var array = context.ObtainStyledAttributes(attrs, Resource.Styleable.CustomTextView); var textStyle = array.GetString(Resource.Styleable.CustomTextView_textStyle); var type = TypefaceHelper.GeTypeface(context, textStyle); SetTypeface(type, TypefaceStyle.Normal); }
private void Init(Context context) { var type = TypefaceHelper.GeTypeface(context); SetTypeface(type, TypefaceStyle.Normal); this.AfterTextChanged += (sender, args) => { this.SetSelection(this.Text.Length); }; }
private void Init(Context context, IAttributeSet attrs) { ; var array = context.ObtainStyledAttributes(attrs, Resource.Styleable.CustomTextView); var textStyle = array.GetString(Resource.Styleable.CustomTextView_textStyle); var type = TypefaceHelper.GeTypeface(context, textStyle); SetTypeface(type, TypefaceStyle.Normal); var background = attrs.GetAttributeValue("http://schemas.android.com/apk/res/android", "background"); if (String.IsNullOrEmpty(background)) { SetBackgroundResource(Android.Resource.Color.Transparent); } }
private void Initialize(Context context) { var type = TypefaceHelper.GeTypeface(context); SetTypeface(type, TypefaceStyle.Normal); }