Beispiel #1
0
        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);
        }
Beispiel #2
0
        private void Init(Context context)
        {
            var type = TypefaceHelper.GeTypeface(context);

            SetTypeface(type, TypefaceStyle.Normal);
            this.AfterTextChanged += (sender, args) =>
            {
                this.SetSelection(this.Text.Length);
            };
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        private void Initialize(Context context)
        {
            var type = TypefaceHelper.GeTypeface(context);

            SetTypeface(type, TypefaceStyle.Normal);
        }