예제 #1
0
        public void Update()
        {
            if (notSupported)
            {
                return;
            }
            var color = AlterColor.GetAccent(_element).ToAndroid();

            _progress.SetColorFilter(color, PorterDuff.Mode.SrcIn);
            _seekbar.ProgressBackgroundTintList = new ColorStateList(
                new int[][]
            {
                new int[] {}
            },
                new int[]
            {
                color,
            });

            _thumb.SetTint(color);
        }
예제 #2
0
        /// <summary>
        /// This changes the colour of a view's background, and if needed, gets the xml drawable used.
        /// </summary>
        /// <param name="view">The view to get its background changed.</param>
        public static void SetDrawableBackground(this View view)
        {
            LayerDrawable gd = (LayerDrawable)view.Background;

            gd.SetColorFilter(controlColor, PorterDuff.Mode.SrcAtop);
        }