FloatingTextEntry icon indicating copy to clipboard operation
FloatingTextEntry copied to clipboard

Solution for SetErrorColor() Android

Open Antolllkabilyi opened this issue 7 years ago • 0 comments

Hi Alejandro! Thanks for your great solution. I have found a code for SetErrorColor method https://stackoverflow.com/questions/33709066/how-to-set-textinputlayout-error-message-colour.

if (Element.ErrorColor != null) { AColor errorColor = Element.ErrorColor.ToAndroid();

            var fErrorView = Control.Class.GetDeclaredField("mErrorView");
            fErrorView.Accessible = true;
            var mErrorView =(TextView)fErrorView.Get(Control);
            mErrorView.SetTextColor(errorColor);
            mErrorView.RequestLayout();  
        }   

Antolllkabilyi avatar Jun 22 '18 08:06 Antolllkabilyi