I can set up navigation icon with tint in toolbar from code:
Toolbar toolbar = findViewById(R.id.biometry_agreement_toolbar);
Drawable drawable = AppCompatResources.getDrawable(requireContext(), R.drawable.ic_24_close);
drawable.setColorFilter(ColorGenerator.buildColorFilterByAttr(toolbar.getContext(), R.attr.colorMaskColored));
toolbar.setNavigationIcon(drawable);
or I can set icon like this in xml, but in this case i can't set tint since there is no attribute navigationIconTint:
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="@drawable/ic_24_close"
app:titleTextColor="@color/color_primary"
tools:title="@string/title"/>
Is it possible to somehow set a tint for navigation icon, without java code? or setting custom icon into toolbar clears all tints and colours?
I don't like setting icons from java because there is no nice code reuse for toolbar initialisation.
I've tried different custom styles, overriding colorControlNormal, but no luck.
Thanks in advance