Forum Xamarin Xamarin.Android

How to solve problem with functions in ARI 29?

I use some functions(API 29) and have the same problem. For example, I have a custom button and want to use BlendModeColorFilter to change the color of the icon

protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
            _defaultColor = CustomRoundButton.GetTintColor(Element).ToAndroid();
            var defaultColorFilter = new BlendModeColorFilter(_defaultColor, BlendMode.SrcIn);
            var whiteColorFilter = new BlendModeColorFilter(Color.White, BlendMode.SrcIn);

          Control.GetCompoundDrawables()[0].SetColorFilter(Control.GetCompoundDrawables()[0].ColorFilter == defaultColorFilter
                ? whiteColorFilter
                : defaultColorFilter);

But I have a mistake

I updated my Target Framework but I do not know to do


  • ColeXColeX Member, Xamarin Team Xamurai
    1. Ensure that API 29 sdk is already installed .

    2. Close and Rebuild your entire solution after setting Target Framework to Android 10.0 .

Sign In or Register to comment.