-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Theme
Jiaheng Ge edited this page May 10, 2017
·
2 revisions
There are two built-in themes:
- Zhihu (light blue theme)
- Dracula (dark theme)
Use either theme invoking theme(@StyleRes int themeId)
while launching Matisse:
Matisse.from(MainActivity.this)
...
.theme(R.style.Matisse_Zhihu | R.style.Matisse_Dracula)
.forResult(REQUEST_CODE_CHOOSE);
Derive a custom theme from the two built-in themes or even their parent theme. You can customize looks of Matisse.
These are attributes (defined in attrs.xml) you can modify:
- colorPrimary: branding color for the app bar
- colorPrimaryDark: darker variant for the status bar
- toolbar: toolbar style
- album.dropdown.title.color: album title's color in the album dropdown list
- album.dropdown.count.color: album media file count's color in the album dropdown list
- album.element.color: toolbar elements' color, elements includes navigation icon, selected album title and a dropdown arrow icon to the right of it
- album.thumbnail.placeholder: album thumbnail's placeholder
- album.emptyView: drawable of the empty view for images
- album.emptyView.textColor: text color of the empty view
- item.placeholder: placeholder color or drawable of the media grid
- page.bg: background color or drawable of the Activity or Fragment page
- bottomToolbar.bg: background color or drawable of the bottom toolbar
- bottomToolbar.preview.textColor: preview button text's color on the bottom toolbar
- bottomToolbar.apply.textColor: apply button text's color on the bottom toolbar
- listPopupWindowStyle: style of the album list's dropdown
- capture.textColor: text color of the capture grid which may appear on the top