I set accentColor yellow and on API > 21 everything works, however problems appeared on the API below - some controls are blue
- Progressbar
Correct view:
Invalid API < 21 view API < 21
It was possible to fix using the following lines:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { progressbar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(this, R.color.accent), PorterDuff.Mode.SRC_ATOP); } How to fix this problem by overriding the ProgressBar style?
- The same problem with
Activitysettings, with switches and namesPreferenceCategory- how I can’t fix it at all
If it helps to extract from xml , where I form elements
<PreferenceCategory android:title="@string/pref_category_start"> ... <SwitchPreference android:defaultValue="@string/pref_welcome_default_switch" android:key="@string/pref_welcome_key_switch" android:summary="@string/pref_welcome_summary" android:title="@string/pref_title_welcome_string" /> ... </PreferenceCategory> Partitioning progress bar
<ProgressBar android:id="@+id/progressbar" style="@style/Widget.AppCompat.ProgressBar.Horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/appbar" android:indeterminate="true" /> I would be grateful for any help. Thanks in advance.


