Customizing checkbox colors
From v10.1.3, FilePicker supports checkbox color customization through DialogProperties.
This is useful when the default checkbox colors do not match your app theme, or when the unchecked checkbox blends into a white/light background.
import android.graphics.Color;
DialogProperties properties = new DialogProperties();
properties.selection_mode = DialogConfigs.MULTI_MODE;
properties.selection_type = DialogConfigs.DIR_SELECT;
// Checked checkbox fill color
properties.checkbox_checked_color = Color.parseColor("#6750A4");
// Unchecked checkbox outer/background color
properties.checkbox_unchecked_color = Color.parseColor("#6750A4");
// Tick/checkmark color shown when checked
properties.checkbox_checkmark_color = Color.WHITE;
// Inner color shown when unchecked
properties.checkbox_unchecked_inner_color = Color.parseColor("#F3E8FF");
FilePickerDialog dialog = new FilePickerDialog(MainActivity.this, properties);
dialog.setTitle("Select Directory");
dialog.show();Notes
checkbox_checked_colorcontrols the selected checkbox fill color.checkbox_unchecked_colorcontrols the unchecked checkbox outer/background color.checkbox_checkmark_colorcontrols the tick/checkmark color.checkbox_unchecked_inner_colorcontrols the inner unchecked color.- If
checkbox_checked_coloris not set, FilePicker uses the existingR.color.colorAccentfallback. - This works for file selection, directory selection, and file + directory selection.