Reverts code style changes introduced in 4dcea979 and 66f4865d

master
y20k 2020-08-03 11:13:25 +02:00
parent 2944273a01
commit c4d6a0479b
No known key found for this signature in database
GPG Key ID: 824D4259F41FAFF6
12 changed files with 88 additions and 164 deletions

View File

@ -3,9 +3,7 @@
package="org.y20k.trackbook"> package="org.y20k.trackbook">
<!-- USE GPS AND NETWORK - EXCLUDE NON-GPS DEVICES --> <!-- USE GPS AND NETWORK - EXCLUDE NON-GPS DEVICES -->
<uses-feature <uses-feature android:name="android.hardware.location.gps" android:required="true" />
android:name="android.hardware.location.gps"
android:required="true" />
<uses-feature android:name="android.hardware.location.network" /> <uses-feature android:name="android.hardware.location.network" />
<!-- NORMAL PERMISSIONS, automatically granted --> <!-- NORMAL PERMISSIONS, automatically granted -->
@ -38,8 +36,8 @@
<!-- TRACKER SERVICE --> <!-- TRACKER SERVICE -->
<service <service
android:name=".TrackerService" android:name=".TrackerService"
android:exported="false" android:foregroundServiceType="location"
android:foregroundServiceType="location"> android:exported="false">
<intent-filter> <intent-filter>
<action android:name="org.y20k.trackbook.action.START" /> <action android:name="org.y20k.trackbook.action.START" />
<action android:name="org.y20k.trackbook.action.STOP" /> <action android:name="org.y20k.trackbook.action.STOP" />
@ -50,8 +48,8 @@
<!-- TRACKING TOGGLE SERVICE SYSTEM QUICK SETTINGS --> <!-- TRACKING TOGGLE SERVICE SYSTEM QUICK SETTINGS -->
<service <service
android:name=".TrackingToggleTileService" android:name=".TrackingToggleTileService"
android:icon="@drawable/ic_notification_icon_small_24dp"
android:label="@string/quick_settings_tile_title_default" android:label="@string/quick_settings_tile_title_default"
android:icon="@drawable/ic_notification_icon_small_24dp"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter> <intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" /> <action android:name="android.service.quicksettings.action.QS_TILE" />

View File

@ -41,17 +41,11 @@ class NotificationHelper(private val trackerService: TrackerService) {
/* Main class variables */ /* Main class variables */
private val notificationManager: NotificationManager = private val notificationManager: NotificationManager = trackerService.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
trackerService.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
/* Creates notification */ /* Creates notification */
fun createNotification( fun createNotification(trackingState: Int, trackLength: Float, duration: Long, useImperial: Boolean): Notification {
trackingState: Int,
trackLength: Float,
duration: Long,
useImperial: Boolean
): Notification {
// create notification channel if necessary // create notification channel if necessary
if (shouldCreateNotificationChannel()) { if (shouldCreateNotificationChannel()) {
@ -59,8 +53,7 @@ class NotificationHelper(private val trackerService: TrackerService) {
} }
// Build notification // Build notification
val builder = val builder = NotificationCompat.Builder(trackerService, Keys.NOTIFICATION_CHANNEL_RECORDING)
NotificationCompat.Builder(trackerService, Keys.NOTIFICATION_CHANNEL_RECORDING)
builder.setContentIntent(showActionPendingIntent) builder.setContentIntent(showActionPendingIntent)
builder.setSmallIcon(R.drawable.ic_notification_icon_small_24dp) builder.setSmallIcon(R.drawable.ic_notification_icon_small_24dp)
builder.setContentText(getContentString(trackerService, duration, trackLength, useImperial)) builder.setContentText(getContentString(trackerService, duration, trackLength, useImperial))
@ -70,23 +63,13 @@ class NotificationHelper(private val trackerService: TrackerService) {
Keys.STATE_TRACKING_ACTIVE -> { Keys.STATE_TRACKING_ACTIVE -> {
builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_running)) builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_running))
builder.addAction(stopAction) builder.addAction(stopAction)
builder.setLargeIcon( builder.setLargeIcon(AppCompatResources.getDrawable(trackerService, R.drawable.ic_notification_icon_large_tracking_active_48dp)!!.toBitmap())
AppCompatResources.getDrawable(
trackerService,
R.drawable.ic_notification_icon_large_tracking_active_48dp
)!!.toBitmap()
)
} }
else -> { else -> {
builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_not_running)) builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_not_running))
builder.addAction(resumeAction) builder.addAction(resumeAction)
builder.addAction(showAction) builder.addAction(showAction)
builder.setLargeIcon( builder.setLargeIcon(AppCompatResources.getDrawable(trackerService, R.drawable.ic_notification_icon_large_tracking_stopped_48dp)!!.toBitmap())
AppCompatResources.getDrawable(
trackerService,
R.drawable.ic_notification_icon_large_tracking_stopped_48dp
)!!.toBitmap()
)
} }
} }
@ -96,77 +79,56 @@ class NotificationHelper(private val trackerService: TrackerService) {
/* Build context text for notification builder */ /* Build context text for notification builder */
private fun getContentString( private fun getContentString(context: Context, duration: Long, trackLength: Float, useImperial: Boolean): String {
context: Context, return "${LengthUnitHelper.convertDistanceToString(trackLength, useImperial)}${DateTimeHelper.convertToReadableTime(context, duration)}"
duration: Long,
trackLength: Float,
useImperial: Boolean
): String {
return "${LengthUnitHelper.convertDistanceToString(
trackLength,
useImperial
)} ${DateTimeHelper.convertToReadableTime(context, duration)}"
} }
/* Checks if notification channel should be created */ /* Checks if notification channel should be created */
private fun shouldCreateNotificationChannel() = private fun shouldCreateNotificationChannel() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !nowPlayingChannelExists()
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !nowPlayingChannelExists()
/* Checks if notification channel exists */ /* Checks if notification channel exists */
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
private fun nowPlayingChannelExists() = private fun nowPlayingChannelExists() = notificationManager.getNotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING) != null
notificationManager.getNotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING) != null
/* Create a notification channel */ /* Create a notification channel */
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
private fun createNotificationChannel() { private fun createNotificationChannel() {
val notificationChannel = NotificationChannel( val notificationChannel = NotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING,
Keys.NOTIFICATION_CHANNEL_RECORDING,
trackerService.getString(R.string.notification_channel_recording_name), trackerService.getString(R.string.notification_channel_recording_name),
NotificationManager.IMPORTANCE_LOW NotificationManager.IMPORTANCE_LOW)
) .apply { description = trackerService.getString(R.string.notification_channel_recording_description) }
.apply {
description =
trackerService.getString(R.string.notification_channel_recording_description)
}
notificationManager.createNotificationChannel(notificationChannel) notificationManager.createNotificationChannel(notificationChannel)
} }
/* Notification pending intents */ /* Notification pending intents */
private val stopActionPendingIntent = PendingIntent.getService( private val stopActionPendingIntent = PendingIntent.getService(
trackerService, 14, trackerService,14,
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_STOP), 0 Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_STOP),0)
)
private val resumeActionPendingIntent = PendingIntent.getService( private val resumeActionPendingIntent = PendingIntent.getService(
trackerService, 16, trackerService, 16,
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_RESUME), 0 Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_RESUME),0)
) private val showActionPendingIntent: PendingIntent? = TaskStackBuilder.create(trackerService).run {
private val showActionPendingIntent: PendingIntent? = addNextIntentWithParentStack(Intent(trackerService, MainActivity::class.java))
TaskStackBuilder.create(trackerService).run { getPendingIntent(10, PendingIntent.FLAG_UPDATE_CURRENT)
addNextIntentWithParentStack(Intent(trackerService, MainActivity::class.java)) }
getPendingIntent(10, PendingIntent.FLAG_UPDATE_CURRENT)
}
/* Notification actions */ /* Notification actions */
private val stopAction = NotificationCompat.Action( private val stopAction = NotificationCompat.Action(
R.drawable.ic_notification_action_stop_24dp, R.drawable.ic_notification_action_stop_24dp,
trackerService.getString(R.string.notification_stop), trackerService.getString(R.string.notification_stop),
stopActionPendingIntent stopActionPendingIntent)
)
private val resumeAction = NotificationCompat.Action( private val resumeAction = NotificationCompat.Action(
R.drawable.ic_notification_action_resume_36dp, R.drawable.ic_notification_action_resume_36dp,
trackerService.getString(R.string.notification_resume), trackerService.getString(R.string.notification_resume),
resumeActionPendingIntent resumeActionPendingIntent)
)
private val showAction = NotificationCompat.Action( private val showAction = NotificationCompat.Action(
R.drawable.ic_notification_action_show_36dp, R.drawable.ic_notification_action_show_36dp,
trackerService.getString(R.string.notification_show), trackerService.getString(R.string.notification_show),
showActionPendingIntent showActionPendingIntent)
)
} }

View File

@ -80,10 +80,7 @@ object PreferencesHelper {
// get preferences // get preferences
val settings = PreferenceManager.getDefaultSharedPreferences(context) val settings = PreferenceManager.getDefaultSharedPreferences(context)
// load length unit system // load length unit system
return settings.getBoolean( return settings.getBoolean(Keys.PREF_USE_IMPERIAL_UNITS, LengthUnitHelper.useImperialUnits())
Keys.PREF_USE_IMPERIAL_UNITS,
LengthUnitHelper.useImperialUnits()
)
} }
@ -100,10 +97,7 @@ object PreferencesHelper {
// get preferences // get preferences
val settings = PreferenceManager.getDefaultSharedPreferences(context) val settings = PreferenceManager.getDefaultSharedPreferences(context)
// load tracking state // load tracking state
return settings.getInt( return settings.getInt(Keys.PREF_LOCATION_ACCURACY_THRESHOLD, Keys.DEFAULT_THRESHOLD_LOCATION_ACCURACY)
Keys.PREF_LOCATION_ACCURACY_THRESHOLD,
Keys.DEFAULT_THRESHOLD_LOCATION_ACCURACY
)
} }
@ -111,23 +105,15 @@ object PreferencesHelper {
fun loadCurrentBestLocation(context: Context): Location { fun loadCurrentBestLocation(context: Context): Location {
// get preferences // get preferences
val settings = PreferenceManager.getDefaultSharedPreferences(context) val settings = PreferenceManager.getDefaultSharedPreferences(context)
val provider: String = settings.getString( val provider: String = settings.getString(Keys.PREF_CURRENT_BEST_LOCATION_PROVIDER, LocationManager.NETWORK_PROVIDER) ?: LocationManager.NETWORK_PROVIDER
Keys.PREF_CURRENT_BEST_LOCATION_PROVIDER,
LocationManager.NETWORK_PROVIDER
) ?: LocationManager.NETWORK_PROVIDER
// create location // create location
val currentBestLocation = Location(provider) val currentBestLocation = Location(provider)
// load location attributes // load location attributes
currentBestLocation.latitude = currentBestLocation.latitude = settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_LATITUDE, Keys.DEFAULT_LATITUDE)
settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_LATITUDE, Keys.DEFAULT_LATITUDE) currentBestLocation.longitude = settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_LONGITUDE, Keys.DEFAULT_LONGITUDE)
currentBestLocation.longitude = currentBestLocation.accuracy = settings.getFloat(Keys.PREF_CURRENT_BEST_LOCATION_ACCURACY, Keys.DEFAULT_ACCURACY)
settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_LONGITUDE, Keys.DEFAULT_LONGITUDE) currentBestLocation.altitude = settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_ALTITUDE, Keys.DEFAULT_ALTITUDE)
currentBestLocation.accuracy = currentBestLocation.time = settings.getLong(Keys.PREF_CURRENT_BEST_LOCATION_TIME, Keys.DEFAULT_TIME)
settings.getFloat(Keys.PREF_CURRENT_BEST_LOCATION_ACCURACY, Keys.DEFAULT_ACCURACY)
currentBestLocation.altitude =
settings.getDouble(Keys.PREF_CURRENT_BEST_LOCATION_ALTITUDE, Keys.DEFAULT_ALTITUDE)
currentBestLocation.time =
settings.getLong(Keys.PREF_CURRENT_BEST_LOCATION_TIME, Keys.DEFAULT_TIME)
return currentBestLocation return currentBestLocation
} }
@ -149,9 +135,7 @@ object PreferencesHelper {
/* Load currently selected app theme */ /* Load currently selected app theme */
fun loadThemeSelection(context: Context): String { fun loadThemeSelection(context: Context): String {
return PreferenceManager.getDefaultSharedPreferences(context) return PreferenceManager.getDefaultSharedPreferences(context).getString(Keys.PREF_THEME_SELECTION, Keys.STATE_THEME_FOLLOW_SYSTEM) ?: Keys.STATE_THEME_FOLLOW_SYSTEM
.getString(Keys.PREF_THEME_SELECTION, Keys.STATE_THEME_FOLLOW_SYSTEM)
?: Keys.STATE_THEME_FOLLOW_SYSTEM
} }
@ -170,4 +154,4 @@ object PreferencesHelper {
editor.apply() editor.apply()
} }
} }

View File

@ -51,25 +51,18 @@ import org.y20k.trackbook.helpers.PreferencesHelper
/* /*
* MapFragmentLayoutHolder class * MapFragmentLayoutHolder class
*/ */
data class MapFragmentLayoutHolder( data class MapFragmentLayoutHolder(private var context: Context, private var markerListener: MapOverlay.MarkerListener, private var inflater: LayoutInflater, private var container: ViewGroup?, private val startLocation: Location, private val trackingState: Int) {
private var context: Context,
private var markerListener: MapOverlay.MarkerListener,
private var inflater: LayoutInflater,
private var container: ViewGroup?,
private val startLocation: Location,
private val trackingState: Int
) {
/* Define log tag */ /* Define log tag */
private val TAG: String = LogHelper.makeLogTag(MapFragmentLayoutHolder::class.java) private val TAG: String = LogHelper.makeLogTag(MapFragmentLayoutHolder::class.java)
/* Main class variables */ /* Main class variables */
val rootView: View = inflater.inflate(R.layout.fragment_map, container, false) val rootView: View
private val mapView: MapView val mapView: MapView
val currentLocationButton: FloatingActionButton val currentLocationButton: FloatingActionButton
val recordingButton: FloatingActionButton val recordingButton: FloatingActionButton
private val recordingButtonSubMenu: Group val recordingButtonSubMenu: Group
val saveButton: FloatingActionButton val saveButton: FloatingActionButton
val clearButton: FloatingActionButton val clearButton: FloatingActionButton
val resumeButton: FloatingActionButton val resumeButton: FloatingActionButton
@ -84,6 +77,7 @@ data class MapFragmentLayoutHolder(
/* Init block */ /* Init block */
init { init {
// find views // find views
rootView = inflater.inflate(R.layout.fragment_map, container, false)
mapView = rootView.findViewById(R.id.map) mapView = rootView.findViewById(R.id.map)
currentLocationButton = rootView.findViewById(R.id.fab_location_button) currentLocationButton = rootView.findViewById(R.id.fab_location_button)
recordingButton = rootView.findViewById(R.id.fab_main_button) recordingButton = rootView.findViewById(R.id.fab_main_button)
@ -108,19 +102,14 @@ data class MapFragmentLayoutHolder(
} }
// add compass to map // add compass to map
val compassOverlay = val compassOverlay = CompassOverlay(context, InternalCompassOrientationProvider(context), mapView)
CompassOverlay(context, InternalCompassOrientationProvider(context), mapView)
compassOverlay.enableCompass() compassOverlay.enableCompass()
compassOverlay.setCompassCenter(36f, 60f) compassOverlay.setCompassCenter(36f, 60f)
mapView.overlays.add(compassOverlay) mapView.overlays.add(compassOverlay)
// add my location overlay // add my location overlay
currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay( currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay(context, startLocation, trackingState)
context,
startLocation,
trackingState
)
mapView.overlays.add(currentPositionOverlay) mapView.overlays.add(currentPositionOverlay)
centerMap(startLocation) centerMap(startLocation)
@ -138,7 +127,7 @@ data class MapFragmentLayoutHolder(
/* Listen for user interaction */ /* Listen for user interaction */
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private fun addInteractionListener() { private fun addInteractionListener() {
mapView.setOnTouchListener { _, _ -> mapView.setOnTouchListener { v, event ->
userInteraction = true userInteraction = true
false false
} }
@ -159,7 +148,7 @@ data class MapFragmentLayoutHolder(
/* Save current best location and state of map to shared preferences */ /* Save current best location and state of map to shared preferences */
fun saveState(currentBestLocation: Location) { fun saveState(currentBestLocation: Location) {
PreferencesHelper.saveCurrentBestLocation(context, currentBestLocation) PreferencesHelper.saveCurrentBestLocation(context, currentBestLocation)
PreferencesHelper.saveZoomLevel(context, mapView.zoomLevelDouble) PreferencesHelper.saveZoomLevel(context, mapView.getZoomLevelDouble())
// reset user interaction state // reset user interaction state
userInteraction = false userInteraction = false
} }
@ -168,8 +157,7 @@ data class MapFragmentLayoutHolder(
/* Mark current position on map */ /* Mark current position on map */
fun markCurrentPosition(location: Location, trackingState: Int = Keys.STATE_TRACKING_NOT) { fun markCurrentPosition(location: Location, trackingState: Int = Keys.STATE_TRACKING_NOT) {
mapView.overlays.remove(currentPositionOverlay) mapView.overlays.remove(currentPositionOverlay)
currentPositionOverlay = currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay(context, location, trackingState)
MapOverlay(markerListener).createMyLocationOverlay(context, location, trackingState)
mapView.overlays.add(currentPositionOverlay) mapView.overlays.add(currentPositionOverlay)
} }
@ -180,8 +168,7 @@ data class MapFragmentLayoutHolder(
mapView.overlays.remove(currentTrackOverlay) mapView.overlays.remove(currentTrackOverlay)
} }
if (track.wayPoints.isNotEmpty()) { if (track.wayPoints.isNotEmpty()) {
currentTrackOverlay = currentTrackOverlay = MapOverlay(markerListener).createTrackOverlay(context, track, trackingState)
MapOverlay(markerListener).createTrackOverlay(context, track, trackingState)
mapView.overlays.add(currentTrackOverlay) mapView.overlays.add(currentTrackOverlay)
} }
} }
@ -214,13 +201,10 @@ data class MapFragmentLayoutHolder(
} }
/* Toggles content and visibility of the location error snackbar */ /* Toggles content and visibility of the location error snackbar */
fun toggleLocationErrorBar(gpsProviderActive: Boolean, networkProviderActive: Boolean) { fun toggleLocationErrorBar(gpsProviderActive: Boolean, networkProviderActive: Boolean) {
if (ContextCompat.checkSelfPermission( if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_DENIED) {
context,
Manifest.permission.ACCESS_FINE_LOCATION
) == PackageManager.PERMISSION_DENIED
) {
// CASE: Location permission not granted // CASE: Location permission not granted
locationErrorBar.setText(R.string.snackbar_message_location_permission_denied) locationErrorBar.setText(R.string.snackbar_message_location_permission_denied)
locationErrorBar.show() locationErrorBar.show()
@ -234,4 +218,4 @@ data class MapFragmentLayoutHolder(
} }
} }
} }

View File

@ -3,7 +3,7 @@
android:height="24dp" android:height="24dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="@color/icon_default" android:fillColor="@color/icon_default"
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5s-0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM16,12v3c0,0.22 -0.03,0.47 -0.07,0.7l-0.1,0.65 -0.37,0.65c-0.72,1.24 -2.04,2 -3.46,2s-2.74,-0.77 -3.46,-2l-0.37,-0.64 -0.1,-0.65C8.03,15.48 8,15.23 8,15v-4c0,-0.23 0.03,-0.48 0.07,-0.7l0.1,-0.65 0.37,-0.65c0.3,-0.52 0.72,-0.97 1.21,-1.31l0.57,-0.39 0.74,-0.18c0.31,-0.08 0.63,-0.12 0.94,-0.12 0.32,0 0.63,0.04 0.95,0.12l0.68,0.16 0.61,0.42c0.5,0.34 0.91,0.78 1.21,1.31l0.38,0.65 0.1,0.65c0.04,0.22 0.07,0.47 0.07,0.69v1zM10,14h4v2h-4zM10,10h4v2h-4z" /> android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5s-0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM16,12v3c0,0.22 -0.03,0.47 -0.07,0.7l-0.1,0.65 -0.37,0.65c-0.72,1.24 -2.04,2 -3.46,2s-2.74,-0.77 -3.46,-2l-0.37,-0.64 -0.1,-0.65C8.03,15.48 8,15.23 8,15v-4c0,-0.23 0.03,-0.48 0.07,-0.7l0.1,-0.65 0.37,-0.65c0.3,-0.52 0.72,-0.97 1.21,-1.31l0.57,-0.39 0.74,-0.18c0.31,-0.08 0.63,-0.12 0.94,-0.12 0.32,0 0.63,0.04 0.95,0.12l0.68,0.16 0.61,0.42c0.5,0.34 0.91,0.78 1.21,1.31l0.38,0.65 0.1,0.65c0.04,0.22 0.07,0.47 0.07,0.69v1zM10,14h4v2h-4zM10,10h4v2h-4z"/>
</vector> </vector>

View File

@ -1,13 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:height="24dp"
android:height="24dp" android:viewportHeight="96.0"
android:viewportWidth="96.0" android:viewportWidth="96.0"
android:viewportHeight="96.0"> android:width="24dp">
<path <path
android:fillAlpha="0.33" android:fillAlpha="0.33"
android:fillColor="@color/trackbook_blue" android:fillColor="@color/trackbook_blue"
android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0" /> android:pathData="M48,48m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
<path <path
android:fillColor="@color/trackbook_blue" android:fillColor="@color/trackbook_blue"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0" /> android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector> </vector>

View File

@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:height="24dp"
android:height="24dp" android:viewportHeight="96.0"
android:viewportWidth="96.0" android:viewportWidth="96.0"
android:viewportHeight="96.0"> android:width="24dp">
<path <path
android:fillColor="@color/trackbook_red" android:fillColor="@color/trackbook_red"
android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0" /> android:pathData="M48,48m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"/>
</vector> </vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/icon_default" android:fillColor="@color/icon_default"
android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z" /> android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
</vector> </vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/trackbook_blue" android:fillColor="@color/trackbook_blue"
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z" /> android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector> </vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/icon_star_selected" android:fillColor="@color/icon_star_selected"
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z" /> android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector> </vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/trackbook_red" android:fillColor="@color/trackbook_red"
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z" /> android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector> </vector>

View File

@ -31,21 +31,17 @@
<!-- COLOR NAMES --> <!-- COLOR NAMES -->
<color name="trackbook_grey">#FF595959</color> <!-- derived from recommended dark theme surface color -->
<!-- derived from recommended dark theme surface color -->
<color name="trackbook_grey">#FF595959</color>
<color name="trackbook_grey_light">#FF7D7D7D</color> <color name="trackbook_grey_light">#FF7D7D7D</color>
<color name="trackbook_grey_lighter">#FFDADADA</color> <color name="trackbook_grey_lighter">#FFDADADA</color>
<color name="trackbook_grey_very_light">#FFF2F2F2</color> <color name="trackbook_grey_very_light">#FFF2F2F2</color>
<color name="trackbook_grey_dark">#FF414141</color> <color name="trackbook_grey_dark">#FF414141</color>
<color name="trackbook_grey_darker">#FF2D2D2D</color> <color name="trackbook_grey_darker">#FF2D2D2D</color>
<!-- Slightly muted variant of -> Material Design 2: Red 600 --> <color name="trackbook_red">#DC3D33</color> <!-- Slightly muted variant of -> Material Design 2: Red 600 -->
<color name="trackbook_red">#DC3D33</color>
<color name="trackbook_red_dark">#FFCA2D23</color> <color name="trackbook_red_dark">#FFCA2D23</color>
<!-- Material Design recommended dark theme surface color --> <color name="trackbook_black">#FF121212</color> <!-- Material Design recommended dark theme surface color -->
<color name="trackbook_black">#FF121212</color>
<color name="trackbook_white">#FFFFFFFF</color> <color name="trackbook_white">#FFFFFFFF</color>
<color name="trackbook_transparent">#00ffffff</color> <color name="trackbook_transparent">#00ffffff</color>