basic Material 3 UI theming

This commit is contained in:
y20k 2021-12-15 14:10:33 +01:00
parent 8ba303d0bd
commit dbb0a7802d
No known key found for this signature in database
GPG key ID: 824D4259F41FAFF6
35 changed files with 167 additions and 137 deletions

View file

@ -58,17 +58,17 @@ dependencies {
// AndroidX
def navigationVersion = "2.3.5"
implementation "androidx.activity:activity-ktx:1.3.1"
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation "androidx.activity:activity-ktx:1.4.0"
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.core:core-ktx:1.7.0'
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.material:material:1.6.0-alpha01'
// Gson
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'com.google.code.gson:gson:2.8.9'
// OpenStreetMap
implementation 'org.osmdroid:osmdroid-android:6.1.11'

View file

@ -19,6 +19,7 @@
package org.y20k.trackbook
import android.app.Application
import com.google.android.material.color.DynamicColors
import org.y20k.trackbook.helpers.AppThemeHelper
import org.y20k.trackbook.helpers.LogHelper
import org.y20k.trackbook.helpers.PreferencesHelper
@ -39,6 +40,7 @@ class Trackbook: Application() {
override fun onCreate() {
super.onCreate()
LogHelper.v(TAG, "Trackbook application started.")
DynamicColors.applyToActivitiesIfAvailable(this);
// initialize single sharedPreferences object when app is launched
initPreferences()
// set Dark / Light theme state

View file

@ -168,6 +168,7 @@ class TrackerService: Service(), SensorEventListener {
if (trackingState == Keys.STATE_TRACKING_ACTIVE) stopTracking()
// remove notification
stopForeground(true)
notificationManager.cancel(Keys.TRACKER_SERVICE_NOTIFICATION_ID) // this call was not necessary prior to Android 12
// stop listening for changes in shared preferences
PreferencesHelper.unregisterPreferenceChangeListener(
sharedPreferenceChangeListener
@ -268,6 +269,7 @@ class TrackerService: Service(), SensorEventListener {
trackingState = Keys.STATE_TRACKING_NOT
PreferencesHelper.saveTrackingState(trackingState)
stopForeground(true)
notificationManager.cancel(Keys.TRACKER_SERVICE_NOTIFICATION_ID) // this call was not necessary prior to Android 12
}

View file

@ -45,7 +45,7 @@ class RenameTrackDialog (private var renameTrackListener: RenameTrackListener) {
/* Construct and show dialog */
fun show(context: Context, trackName: String) {
// prepare dialog builder
val builder: MaterialAlertDialogBuilder = MaterialAlertDialogBuilder(context)
val builder: MaterialAlertDialogBuilder = MaterialAlertDialogBuilder(context, R.style.AlertDialogTheme)
// get input field
val inflater = LayoutInflater.from(context)

View file

@ -186,15 +186,15 @@ data class MapFragmentLayoutHolder(private var context: Context, private var mar
fun updateRecordingButton(trackingState: Int) {
when (trackingState) {
Keys.STATE_TRACKING_NOT -> {
recordingButton.setImageResource(R.drawable.ic_fiber_manual_record_white_24dp)
recordingButton.setImageResource(R.drawable.ic_fiber_manual_record_inactive_24dp)
recordingButtonSubMenu.isGone = true
}
Keys.STATE_TRACKING_ACTIVE -> {
recordingButton.setImageResource(R.drawable.ic_fiber_manual_record_red_24dp)
recordingButton.setImageResource(R.drawable.ic_fiber_manual_record_active_24dp)
recordingButtonSubMenu.isGone = true
}
Keys.STATE_TRACKING_STOPPED -> {
recordingButton.setImageResource(R.drawable.ic_save_white_24dp)
recordingButton.setImageResource(R.drawable.ic_save_24dp)
}
}
}

View file

@ -5,5 +5,5 @@
android:viewportHeight="24.0">
<path
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"
android:fillColor="@color/trackbook_white" />
android:fillColor="@color/recording_button_icon" />
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M21,3L3,10.53v0.98l6.84,2.65L12.48,21h0.98L21,3z"/>
</vector>

View file

@ -5,5 +5,5 @@
android:viewportHeight="24.0">
<path
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"
android:fillColor="@color/trackbook_white" />
android:fillColor="@color/recording_button_icon" />
</vector>

View file

@ -8,6 +8,6 @@
android:fillColor="@color/trackbook_blue"
android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
<path
android:fillColor="@color/trackbook_grey_light"
android:fillColor="@color/trackbook_neutral_medium_light"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector>

View file

@ -8,6 +8,6 @@
android:fillColor="@color/trackbook_red"
android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
<path
android:fillColor="@color/trackbook_grey_light"
android:fillColor="@color/trackbook_neutral_medium_light"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector>

View file

@ -5,6 +5,6 @@
android:width="24dp">
<path
android:fillColor="@color/trackbook_grey_light"
android:fillColor="@color/trackbook_neutral_medium_light"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector>

View file

@ -4,9 +4,9 @@
android:height="24dp"
android:width="24dp">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M44,12.99L20.69,8.74L5.12,5.89C2.29,5.38 0,7.44 0,10.49v67.38c0,3.06 2.29,5.96 5.12,6.47l15.57,2.85l22.19,4.05L44,91.46V12.99z"/>
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M90.88,5.89L75.31,8.74L53.12,12.79L52,12.99v78.46l23.31,-4.26l15.57,-2.85c2.83,-0.52 5.12,-3.41 5.12,-6.47V10.49C96,7.44 93.71,5.38 90.88,5.89z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:width="36dp">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:width="36dp">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:width="36dp">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M6,6h12v12H6z"/>
</vector>

View file

@ -7,6 +7,6 @@
android:fillColor="@color/trackbook_blue"
android:pathData="M96,96m-96,0a96,96 0,1 1,192 0a96,96 0,1 1,-192 0"/>
<path
android:fillColor="@color/trackbook_white"
android:fillColor="@color/trackbook_neutral_white"
android:pathData="M48,96a48,46.5 0,1 0,96 0a48,46.5 0,1 0,-96 0z"/>
</vector>

View file

@ -4,9 +4,9 @@
android:height="24dp"
android:width="24dp">
<path
android:fillColor="@color/trackbook_white"
android:fillColor="@color/trackbook_neutral_white"
android:pathData="M44,12.99L20.69,8.74L5.12,5.89C2.29,5.38 0,7.44 0,10.49v67.38c0,3.06 2.29,5.96 5.12,6.47l15.57,2.85l22.19,4.05L44,91.46V12.99z"/>
<path
android:fillColor="@color/trackbook_white"
android:fillColor="@color/trackbook_neutral_white"
android:pathData="M90.88,5.89L75.31,8.74L53.12,12.79L52,12.99v78.46l23.31,-4.26l15.57,-2.85c2.83,-0.52 5.12,-3.41 5.12,-6.47V10.49C96,7.44 93.71,5.38 90.88,5.89z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/trackbook_white"
android:fillColor="@color/trackbook_neutral_white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13L7,13v-2h10v2z"/>
</vector>

View file

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/icon_default"
android:pathData="M19,12v7L5,19v-7L3,12v7c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2zM13,12.67l2.59,-2.58L17,11.5l-5,5 -5,-5 1.41,-1.41L11,12.67L11,3h2z"/>
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/recording_button_icon"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/icon_default"
android:pathData="M19,12v7L5,19v-7L3,12v7c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2zM13,12.67l2.59,-2.58L17,11.5l-5,5 -5,-5 1.41,-1.41L11,12.67L11,3h2z"/>
</vector>

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/trackbook_white"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

View file

@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/trackbook_black"
android:fillColor="@color/trackbook_neutral_black"
android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z"/>
</vector>

View file

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" android:color="@color/bottom_navigation_element" />
<item android:state_checked="true" android:color="@color/bottom_navigation_element_selected" />
<item
android:state_checked="false"
android:color="@color/bottom_navigation_element" />
<item
android:state_checked="true"
android:color="@color/bottom_navigation_element_selected" />
</selector>

View file

@ -7,7 +7,7 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<fragment
<androidx.fragment.app.FragmentContainerView
android:id="@+id/main_container"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
@ -22,10 +22,8 @@
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation_view"
android:layout_width="match_parent"
android:layout_height="56dp"
app:itemBackground="@color/bottom_navigation_background"
app:itemIconTint="@drawable/selector_bottom_navigation"
app:itemTextColor="@drawable/selector_bottom_navigation"
android:layout_height="wrap_content"
android:background="@color/bottom_navigation_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -36,22 +36,23 @@
app:layout_constraintBottom_toTopOf="@+id/fab_sub_menu_button_clear"
app:layout_constraintEnd_toEndOf="@+id/fab_sub_menu_button_clear"
app:layout_constraintStart_toStartOf="@+id/fab_sub_menu_button_clear"
app:srcCompat="@drawable/ic_save_white_24dp"
app:tint="@color/trackbook_white" />
app:srcCompat="@drawable/ic_save_24dp"
app:tint="@color/recording_button_icon" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/fab_sub_menu_label_save"
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:layout_marginEnd="4dp"
android:clickable="true"
android:focusable="true"
android:visibility="gone"
app:cardBackgroundColor="@color/fab_button_card_background"
app:cardCornerRadius="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:strokeWidth="0dp"
app:layout_constraintBottom_toBottomOf="@+id/fab_sub_menu_button_save"
app:layout_constraintEnd_toStartOf="@+id/fab_sub_menu_button_save"
app:layout_constraintTop_toTopOf="@+id/fab_sub_menu_button_save">
@ -79,30 +80,29 @@
android:clickable="true"
android:contentDescription="@string/descr_fab_sub_menu_button_clear"
android:focusable="true"
app:backgroundTint="@color/trackbook_blue"
app:backgroundTint="@color/recording_button_background"
app:fabSize="mini"
app:layout_constraintBottom_toTopOf="@+id/fab_sub_menu_button_resume"
app:layout_constraintEnd_toEndOf="@+id/fab_sub_menu_button_resume"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/fab_sub_menu_button_resume"
app:srcCompat="@drawable/ic_clear_white_24dp"
app:tint="@color/trackbook_white" />
app:srcCompat="@drawable/ic_clear_24dp"
app:tint="@color/recording_button_icon" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/fab_sub_menu_label_clear"
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="@color/fab_button_card_background"
app:cardCornerRadius="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:strokeWidth="0dp"
app:layout_constraintBottom_toBottomOf="@+id/fab_sub_menu_button_clear"
app:layout_constraintEnd_toStartOf="@+id/fab_sub_menu_button_clear"
app:layout_constraintEnd_toEndOf="@+id/fab_sub_menu_label_save"
app:layout_constraintTop_toTopOf="@+id/fab_sub_menu_button_clear">
<com.google.android.material.textview.MaterialTextView
@ -128,28 +128,28 @@
android:clickable="true"
android:contentDescription="@string/descr_fab_sub_menu_button_resume"
android:focusable="true"
app:backgroundTint="@color/trackbook_blue"
app:backgroundTint="@color/recording_button_background"
app:fabSize="mini"
app:layout_constraintBottom_toTopOf="@+id/fab_main_button"
app:layout_constraintEnd_toEndOf="@+id/fab_main_button"
app:layout_constraintStart_toStartOf="@+id/fab_main_button"
app:srcCompat="@drawable/ic_fiber_manual_record_white_24dp"
app:tint="@color/trackbook_white" />
app:srcCompat="@drawable/ic_fiber_manual_record_inactive_24dp"
app:tint="@color/recording_button_icon" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/fab_sub_menu_label_resume"
style="@style/Widget.MaterialComponents.CardView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="@color/fab_button_card_background"
app:cardCornerRadius="2dp"
app:cardElevation="4dp"
app:cardUseCompatPadding="true"
app:strokeWidth="0dp"
app:layout_constraintBottom_toBottomOf="@+id/fab_sub_menu_button_resume"
app:layout_constraintEnd_toStartOf="@+id/fab_sub_menu_button_resume"
app:layout_constraintEnd_toEndOf="@+id/fab_sub_menu_label_clear"
app:layout_constraintTop_toTopOf="@+id/fab_sub_menu_button_resume">
<com.google.android.material.textview.MaterialTextView
@ -177,11 +177,10 @@
android:clickable="true"
android:contentDescription="@string/descr_fab_main_start"
android:focusable="true"
app:backgroundTint="@color/trackbook_blue"
app:fabSize="normal"
app:backgroundTint="@color/recording_button_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_fiber_manual_record_white_24dp"
app:srcCompat="@drawable/ic_fiber_manual_record_inactive_24dp"
app:tint="@null" /> <!-- necessary hack: to be able to change icon color programmatically -->
<!-- CURRENT LOCATION BUTTON -->
@ -193,6 +192,7 @@
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:clickable="true"
android:contentDescription="@string/descr_fab_location"
android:focusable="true"
android:src="@drawable/ic_current_location_24dp"
app:backgroundTint="@color/location_button_background"

View file

@ -71,7 +71,7 @@
app:layout_constraintBottom_toBottomOf="@+id/statistics_track_name_headline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/statistics_track_name_headline"
app:srcCompat="@drawable/ic_save_24dp" />
app:srcCompat="@drawable/ic_save_to_storage_24dp" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/statistics_p_distance"

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- NIGHT THEME COLORS -->
</resources>

View file

@ -3,30 +3,31 @@
<!-- NIGHT THEME COLORS -->
<color name="app_window_background">@color/trackbook_grey_darker</color>
<color name="app_window_background">@color/trackbook_neutral_very_dark</color>
<color name="bottom_navigation_background">@color/trackbook_neutral_black</color>
<color name="dialog_background">@color/trackbook_neutral_darker</color>
<color name="bottom_navigation_background">@color/trackbook_black</color>
<color name="bottom_navigation_element">@color/trackbook_grey_light</color>
<color name="bottom_navigation_element">@color/trackbook_neutral_medium_light</color>
<color name="bottom_navigation_element_selected">@color/trackbook_blue</color>
<color name="fab_button_card_text">@color/trackbook_white</color>
<color name="fab_button_card_background">@color/trackbook_grey_dark</color>
<color name="fab_button_card_text">@color/trackbook_neutral_white</color>
<color name="fab_button_card_background">@color/trackbook_neutral_darker</color>
<color name="location_button_icon">@color/trackbook_white</color>
<color name="location_button_background">@color/trackbook_black</color>
<color name="location_button_icon">@color/trackbook_neutral_white</color>
<color name="location_button_background">@color/trackbook_neutral_black</color>
<color name="text_default">@color/trackbook_white</color>
<color name="text_lightweight">@color/trackbook_grey_very_light</color>
<color name="text_default">@color/trackbook_neutral_white</color>
<color name="text_lightweight">@color/trackbook_neutral_very_light</color>
<color name="icon_default">@color/trackbook_white</color>
<color name="icon_lightweight">@color/trackbook_grey_very_light</color>
<color name="icon_default">@color/trackbook_neutral_white</color>
<color name="icon_lightweight">@color/trackbook_neutral_very_light</color>
<color name="icon_star_selected">@color/trackbook_blue</color>
<color name="list_card_background">@color/trackbook_grey_dark</color>
<color name="list_card_background">@color/trackbook_neutral_darker</color>
<color name="list_card_delete_background">@color/trackbook_red</color>
<color name="statistic_sheet_background_expanded">@color/trackbook_black_85percent</color>
<color name="statistic_sheet_background_collapsed">@color/trackbook_black</color>
<color name="statistic_sheet_background_border">@color/trackbook_grey_dark</color>
<color name="statistic_sheet_background_collapsed">@color/trackbook_neutral_black</color>
<color name="statistic_sheet_background_border">@color/trackbook_neutral_darker</color>
</resources>

View file

@ -2,14 +2,9 @@
<resources>
<!-- Base application theme. -->
<style name="Theme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<style name="Theme" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Set AppCompats colors -->
<item name="colorPrimary">@color/trackbook_grey_very_light</item>
<item name="colorPrimaryDark">@color/trackbook_white</item>
<item name="colorAccent">@color/trackbook_blue</item>
<!-- Don't show white status bar -->
<!-- Show transparent status bar -->
<item name="android:windowTranslucentStatus">true</item>
</style>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- DAY THEME COLORS -->
<!-- ADAPTIVE BASE COLORS - Android 12 - https://developer.android.com/reference/android/R.color#system_accent1_0 -->
<color name="trackbook_neutral_dark">@android:color/system_neutral1_600</color>
<color name="trackbook_neutral_darker">@android:color/system_neutral1_800</color>
<color name="trackbook_neutral_very_dark">@android:color/system_neutral1_900</color>
<color name="trackbook_neutral_medium_light">@android:color/system_neutral1_300</color>
<color name="trackbook_neutral_light">@android:color/system_neutral1_100</color>
<color name="trackbook_neutral_lighter">@android:color/system_neutral1_50</color>
<color name="trackbook_neutral_very_light">@android:color/system_neutral1_10</color>
<color name="trackbook_accent_intense">@android:color/system_accent1_100</color> <!-- colorPrimary - Light Theme -->
<color name="trackbook_accent_light">@android:color/system_accent1_50</color>
<color name="trackbook_accent_dimmed">@android:color/system_accent1_600</color> <!-- colorSecondary - Light Theme -->
<color name="trackbook_neutral_black">@android:color/system_neutral1_1000</color>
<color name="trackbook_neutral_white">@android:color/system_neutral1_0</color>
</resources>

View file

@ -3,49 +3,59 @@
<!-- DAY THEME COLORS -->
<color name="app_window_background">@color/trackbook_grey_very_light</color>
<color name="bottom_navigation_background">@color/trackbook_white</color>
<color name="app_window_background">@color/trackbook_neutral_very_light</color>
<color name="bottom_navigation_background">@color/trackbook_neutral_white</color>
<color name="dialog_background">@color/trackbook_neutral_very_light</color>
<color name="bottom_navigation_element">@color/trackbook_grey_light</color>
<color name="bottom_navigation_element">@color/trackbook_neutral_medium_light</color>
<color name="bottom_navigation_element_selected">@color/trackbook_blue</color>
<color name="fab_button_card_text">@color/trackbook_grey_dark</color>
<color name="fab_button_card_background">@color/trackbook_white</color>
<color name="fab_button_card_text">@color/trackbook_neutral_darker</color>
<color name="fab_button_card_background">@color/trackbook_neutral_white</color>
<color name="location_button_icon">@color/trackbook_grey</color>
<color name="location_button_background">@color/trackbook_white</color>
<color name="location_button_icon">@color/trackbook_neutral_dark</color>
<color name="location_button_background">@color/trackbook_neutral_white</color>
<color name="text_default">@color/trackbook_grey_dark</color>
<color name="text_lightweight">@color/trackbook_grey</color>
<color name="text_default">@color/trackbook_neutral_darker</color>
<color name="text_lightweight">@color/trackbook_neutral_dark</color>
<color name="icon_default">@color/trackbook_grey</color>
<color name="icon_lightweight">@color/trackbook_grey_light</color>
<color name="icon_default">@color/trackbook_neutral_dark</color>
<color name="icon_lightweight">@color/trackbook_neutral_medium_light</color>
<color name="icon_star_selected">@color/trackbook_blue</color>
<color name="list_card_background">@color/trackbook_white</color>
<color name="recording_button_background">@color/trackbook_accent_intense</color>
<color name="recording_button_icon">@color/trackbook_neutral_very_dark</color>
<color name="list_card_background">@color/trackbook_neutral_white</color>
<color name="list_card_delete_background">@color/trackbook_red</color>
<color name="statistic_sheet_background_expanded">@color/trackbook_white_85percent</color>
<color name="statistic_sheet_background_collapsed">@color/trackbook_white</color>
<color name="statistic_sheet_background_border">@color/trackbook_grey_lighter</color>
<color name="statistic_sheet_background_collapsed">@color/trackbook_neutral_white</color>
<color name="statistic_sheet_background_border">@color/trackbook_neutral_light</color>
<!-- COLOR NAMES -->
<color name="trackbook_grey">#FF595959</color> <!-- derived from recommended dark theme surface color -->
<color name="trackbook_grey_light">#FF7D7D7D</color>
<color name="trackbook_grey_lighter">#FFDADADA</color>
<color name="trackbook_grey_very_light">#FFF2F2F2</color>
<color name="trackbook_grey_dark">#FF414141</color>
<color name="trackbook_grey_darker">#FF2D2D2D</color>
<!-- BASE COLOR NAMES -->
<color name="trackbook_neutral_dark">#FF595959</color> <!-- derived from recommended dark theme surface color -->
<color name="trackbook_neutral_darker">#FF414141</color>
<color name="trackbook_neutral_very_dark">#FF2D2D2D</color>
<color name="trackbook_neutral_medium_light">#FF7D7D7D</color>
<color name="trackbook_neutral_light">#FFDADADA</color>
<color name="trackbook_neutral_lighter">#FFF2F2F2</color>
<color name="trackbook_neutral_very_light">#FFFAFAFA</color>
<color name="trackbook_accent_intense">#FFEADDFF</color> <!-- colorPrimary - Light Theme -->
<color name="trackbook_accent_light">#FFF4EEFF</color>
<color name="trackbook_accent_dimmed">#FF625b71</color> <!-- colorSecondary - Light Theme -->
<color name="trackbook_neutral_black">#FF121212</color> <!-- Material Design recommended dark theme surface color -->
<color name="trackbook_neutral_white">#FFFFFFFF</color>
<color name="trackbook_red">#FFDC3D33</color> <!-- Slightly muted variant of -> Material Design 2: Red 600 -->
<color name="trackbook_red_dark">#FFCA2D23</color>
<color name="trackbook_black">#FF121212</color> <!-- Material Design recommended dark theme surface color -->
<color name="trackbook_white">#FFFFFFFF</color>
<color name="trackbook_transparent">#00ffffff</color>
<color name="trackbook_blue">#FF3C98DB</color>
<color name="trackbook_green">#FF4CAF50</color>

View file

@ -113,9 +113,10 @@
<string name="descr_map_current_track">Mapping of current track</string>
<string name="descr_map_last_track">Mapping of last track</string>
<string name="descr_fab_main_start">Start recording button</string>
<string name="descr_fab_sub_menu_button_save">Save button</string>
<string name="descr_fab_sub_menu_button_clear">Clear button</string>
<string name="descr_fab_sub_menu_button_resume">Resume button</string>
<string name="descr_fab_sub_menu_button_save">Save recording</string>
<string name="descr_fab_sub_menu_button_clear">Clear recording</string>
<string name="descr_fab_sub_menu_button_resume">Resume recording</string>
<string name="descr_fab_location">Center on current location</string>
<string name="descr_mark_starred_button">Mark as starred button</string>
<string name="descr_quick_settings_tile_title_start">Start Recording</string>
<string name="descr_quick_settings_tile_title_stop">Stop Recording</string>

View file

@ -2,29 +2,17 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Set AppCompats colors -->
<item name="colorPrimary">@color/trackbook_grey_dark</item>
<item name="colorPrimaryDark">@color/trackbook_grey_darker</item>
<item name="colorAccent">@color/trackbook_blue</item>
<!-- Show white status bar -->
<style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Do not use primary colored elevation overlays to present a visual hierarchy - TO COLORFUL -->
<item name="elevationOverlayEnabled">false</item>
<!-- Show transparent status bar -->
<item name="android:windowTranslucentStatus">true</item>
</style>
<!-- Override button color in AlertDialog -->
<style name="AlertDialogTheme" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
</style>
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/text_default</item>
</style>
<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/text_default</item>
<!-- Override background color in AlertDialog -->
<style name="AlertDialogTheme" parent="ThemeOverlay.Material3.Dialog.Alert">
<item name="colorSurface">@color/dialog_background</item>
</style>

View file

@ -2,7 +2,7 @@
buildscript {
ext {
kotlin_version = '1.5.31'
kotlin_version = '1.6.10'
navigation_version = '2.3.3'
}
repositories {
@ -10,7 +10,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"