Implementation
This is the most exciting part of this chapter. In a nutshell, our application has a single activity with four fragments. Also, it has a SQLite database with a single table to store marker data.
Defining the app theme
The app theme can be customized by using the styles.xml
file in res
| values
| styles.xml
.
The primary color is the color of the action bar. The primary dark color is the color of the status bar. The accent color is the color for FAB. The sample app looks like the following image:
In the preceding screenshot, you can see the usage of primary, primary dark, and accent colors.
The style is defined as:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">#2196F3</item> <item name="colorPrimaryDark">#1976D2</item> <item name="colorAccent">#FF4081</item> </style>
For more material design colors, you can...