Exemple #1
0
        private void OnLetterSpacingChanged(TextView textView, double letterSpacing)
        {
            if (!Material.IsLollipop)
            {
                return;
            }

            textView.LetterSpacing = MaterialHelper.ConvertToSp(letterSpacing) / textView.TextSize;
        }
Exemple #2
0
        protected override void OnAttached()
        {
            base.OnAttached();

            if (!Material.IsLollipop)
            {
                return;
            }

            if (this.Control is Android.Widget.TextView textView)
            {
                var rawLetterSpacing = this.MaterialEffect.LetterSpacing / textView.TextSize;
                textView.LetterSpacing = MaterialHelper.ConvertToSp(rawLetterSpacing);
            }
        }
Exemple #3
0
        private void SetTextLetterSpacing()
        {
            var rawLetterSpacing = _materialButton.LetterSpacing / Control.TextSize;

            Control.LetterSpacing = MaterialHelper.ConvertToSp(rawLetterSpacing);
        }