How to consistently set EditText Selected Underline Color Programmatically

前端 未结 5 2095
情深已故
情深已故 2021-02-20 09:05

I\'m trying to build a renderer for Xamarin Forms. The renderer needs to set the EditText underline color to \"Active Color\" when selected and \"Hint Color\" when

5条回答
  •  天涯浪人
    2021-02-20 09:46

    Why don't you change the tint colour at runtime using this (May be in your text changed event):

    ViewCompat.SetBackgroundTintList(_YourView , ColorStateList.ValueOf(Color.ParseColor(Resources.GetString(Resource.Color.blueLine))));
    

    Anyways Goodluck!

提交回复
热议问题