Repository navigation
Customize Styles
Beyond colors, you can change your app's fonts, the bottom navigation labels and the shape of its components. This is optional: the defaults look good.
Styles live in app/src/main/res/values/styles.xml. It has these styles:
| Style | Used for |
|---|---|
MyApp.SplashScreen |
The launch screen |
MyApp.Default |
The app, in light and dark themes |
MyApp.Default.Amoled |
The app, with the AMOLED dark theme |
MyApp.BottomNavigationView |
The bottom navigation bar |
Their Material You versions, for Android 12 and newer, are in app/src/main/res/values/m3_styles.xml. If you change something in one file, make the same change in the other.
Important
Don't change the parent of these styles. The app relies on them.
Blueprint uses two fonts: customFontNormal for regular text and customFontBold for titles. The sample uses Manrope.
-
Create a
fontfolder inapp/src/main/res, if it doesn't exist. -
Add your font files (
.ttfor.otf) to it. File names can only have lowercase letters, numbers and underscores. -
In the same folder, create a font family XML file for each font. See Fonts in XML to learn how.
-
In every style, point both items to your font family files, not to the font files:
<item name="customFontBold">@font/my_bold_font_family</item> <item name="customFontNormal">@font/my_normal_font_family</item>
These fonts apply to specific parts of the interface, not every single text in the app.
labelVisibilityMode in MyApp.BottomNavigationView decides which tabs show their label:
| Value | Labels shown |
|---|---|
labeled |
All tabs |
selected |
Only the selected tab |
unlabeled |
None |
auto |
All tabs if there are 3 or fewer, only the selected one otherwise |
<item name="labelVisibilityMode">labeled</item>You can change how rounded the corners of buttons, cards and other components are, in app/src/main/res/values/shape_styles.xml (and m3_shape_styles.xml for Material You):
-
cornerFamilyis eitherroundedorcut(diagonal corners). -
cornerSizepoints to a size inapp/src/main/res/values/dimens.xml. Change the size there.
<item name="cornerFamily">rounded</item>
<item name="cornerSize">@dimen/cards_corner_size</item>Don't rename the styles in this file, only change their items. Learn more in the Shape theming guide.
With Android styles and themes you can customize much more, but anything beyond this page is up to you, and we can't offer support for it. These are good places to start:
Note
Would you like to help improve this wiki?
It is advised that you contribute to jahirfiquitiva/dashboards-wikis, which is the repository that holds the contents of this wiki. Please open an issue or a pull request in that repo instead.
Wiki by Jahir Fiquitiva, with contributions from Patryk Goworowski, Lumiq Creative and Jackson Hayes. Special thanks to Sanchith Hegde.
Licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.