parent
2944273a01
commit
c4d6a0479b
12 changed files with 88 additions and 164 deletions
|
@ -3,9 +3,7 @@
|
|||
package="org.y20k.trackbook">
|
||||
|
||||
<!-- USE GPS AND NETWORK - EXCLUDE NON-GPS DEVICES -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.location.gps"
|
||||
android:required="true" />
|
||||
<uses-feature android:name="android.hardware.location.gps" android:required="true" />
|
||||
<uses-feature android:name="android.hardware.location.network" />
|
||||
|
||||
<!-- NORMAL PERMISSIONS, automatically granted -->
|
||||
|
@ -38,8 +36,8 @@
|
|||
<!-- TRACKER SERVICE -->
|
||||
<service
|
||||
android:name=".TrackerService"
|
||||
android:exported="false"
|
||||
android:foregroundServiceType="location">
|
||||
android:foregroundServiceType="location"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="org.y20k.trackbook.action.START" />
|
||||
<action android:name="org.y20k.trackbook.action.STOP" />
|
||||
|
@ -50,8 +48,8 @@
|
|||
<!-- TRACKING TOGGLE SERVICE SYSTEM QUICK SETTINGS -->
|
||||
<service
|
||||
android:name=".TrackingToggleTileService"
|
||||
android:icon="@drawable/ic_notification_icon_small_24dp"
|
||||
android:label="@string/quick_settings_tile_title_default"
|
||||
android:icon="@drawable/ic_notification_icon_small_24dp"
|
||||
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||
<intent-filter>
|
||||
<action android:name="android.service.quicksettings.action.QS_TILE" />
|
||||
|
|
|
@ -41,17 +41,11 @@ class NotificationHelper(private val trackerService: TrackerService) {
|
|||
|
||||
|
||||
/* Main class variables */
|
||||
private val notificationManager: NotificationManager =
|
||||
trackerService.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
private val notificationManager: NotificationManager = trackerService.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
|
||||
/* Creates notification */
|
||||
fun createNotification(
|
||||
trackingState: Int,
|
||||
trackLength: Float,
|
||||
duration: Long,
|
||||
useImperial: Boolean
|
||||
): Notification {
|
||||
fun createNotification(trackingState: Int, trackLength: Float, duration: Long, useImperial: Boolean): Notification {
|
||||
|
||||
// create notification channel if necessary
|
||||
if (shouldCreateNotificationChannel()) {
|
||||
|
@ -59,8 +53,7 @@ class NotificationHelper(private val trackerService: TrackerService) {
|
|||
}
|
||||
|
||||
// Build notification
|
||||
val builder =
|
||||
NotificationCompat.Builder(trackerService, Keys.NOTIFICATION_CHANNEL_RECORDING)
|
||||
val builder = NotificationCompat.Builder(trackerService, Keys.NOTIFICATION_CHANNEL_RECORDING)
|
||||
builder.setContentIntent(showActionPendingIntent)
|
||||
builder.setSmallIcon(R.drawable.ic_notification_icon_small_24dp)
|
||||
builder.setContentText(getContentString(trackerService, duration, trackLength, useImperial))
|
||||
|
@ -70,23 +63,13 @@ class NotificationHelper(private val trackerService: TrackerService) {
|
|||
Keys.STATE_TRACKING_ACTIVE -> {
|
||||
builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_running))
|
||||
builder.addAction(stopAction)
|
||||
builder.setLargeIcon(
|
||||
AppCompatResources.getDrawable(
|
||||
trackerService,
|
||||
R.drawable.ic_notification_icon_large_tracking_active_48dp
|
||||
)!!.toBitmap()
|
||||
)
|
||||
builder.setLargeIcon(AppCompatResources.getDrawable(trackerService, R.drawable.ic_notification_icon_large_tracking_active_48dp)!!.toBitmap())
|
||||
}
|
||||
else -> {
|
||||
builder.setContentTitle(trackerService.getString(R.string.notification_title_trackbook_not_running))
|
||||
builder.addAction(resumeAction)
|
||||
builder.addAction(showAction)
|
||||
builder.setLargeIcon(
|
||||
AppCompatResources.getDrawable(
|
||||
trackerService,
|
||||
R.drawable.ic_notification_icon_large_tracking_stopped_48dp
|
||||
)!!.toBitmap()
|
||||
)
|
||||
builder.setLargeIcon(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 */
|
||||
private fun getContentString(
|
||||
context: Context,
|
||||
duration: Long,
|
||||
trackLength: Float,
|
||||
useImperial: Boolean
|
||||
): String {
|
||||
return "${LengthUnitHelper.convertDistanceToString(
|
||||
trackLength,
|
||||
useImperial
|
||||
)} • ${DateTimeHelper.convertToReadableTime(context, duration)}"
|
||||
private fun getContentString(context: Context, duration: Long, trackLength: Float, useImperial: Boolean): String {
|
||||
return "${LengthUnitHelper.convertDistanceToString(trackLength, useImperial)} • ${DateTimeHelper.convertToReadableTime(context, duration)}"
|
||||
}
|
||||
|
||||
|
||||
/* Checks if notification channel should be created */
|
||||
private fun shouldCreateNotificationChannel() =
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !nowPlayingChannelExists()
|
||||
private fun shouldCreateNotificationChannel() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !nowPlayingChannelExists()
|
||||
|
||||
|
||||
/* Checks if notification channel exists */
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun nowPlayingChannelExists() =
|
||||
notificationManager.getNotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING) != null
|
||||
private fun nowPlayingChannelExists() = notificationManager.getNotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING) != null
|
||||
|
||||
|
||||
/* Create a notification channel */
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun createNotificationChannel() {
|
||||
val notificationChannel = NotificationChannel(
|
||||
Keys.NOTIFICATION_CHANNEL_RECORDING,
|
||||
val notificationChannel = NotificationChannel(Keys.NOTIFICATION_CHANNEL_RECORDING,
|
||||
trackerService.getString(R.string.notification_channel_recording_name),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
)
|
||||
.apply {
|
||||
description =
|
||||
trackerService.getString(R.string.notification_channel_recording_description)
|
||||
}
|
||||
NotificationManager.IMPORTANCE_LOW)
|
||||
.apply { description = trackerService.getString(R.string.notification_channel_recording_description) }
|
||||
notificationManager.createNotificationChannel(notificationChannel)
|
||||
}
|
||||
|
||||
|
||||
/* Notification pending intents */
|
||||
private val stopActionPendingIntent = PendingIntent.getService(
|
||||
trackerService, 14,
|
||||
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_STOP), 0
|
||||
)
|
||||
trackerService,14,
|
||||
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_STOP),0)
|
||||
private val resumeActionPendingIntent = PendingIntent.getService(
|
||||
trackerService, 16,
|
||||
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_RESUME), 0
|
||||
)
|
||||
private val showActionPendingIntent: PendingIntent? =
|
||||
TaskStackBuilder.create(trackerService).run {
|
||||
addNextIntentWithParentStack(Intent(trackerService, MainActivity::class.java))
|
||||
getPendingIntent(10, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
}
|
||||
Intent(trackerService, TrackerService::class.java).setAction(Keys.ACTION_RESUME),0)
|
||||
private val showActionPendingIntent: PendingIntent? = TaskStackBuilder.create(trackerService).run {
|
||||
addNextIntentWithParentStack(Intent(trackerService, MainActivity::class.java))
|
||||
getPendingIntent(10, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
}
|
||||
|
||||
|
||||
/* Notification actions */
|
||||
private val stopAction = NotificationCompat.Action(
|
||||
R.drawable.ic_notification_action_stop_24dp,
|
||||
trackerService.getString(R.string.notification_stop),
|
||||
stopActionPendingIntent
|
||||
)
|
||||
stopActionPendingIntent)
|
||||
private val resumeAction = NotificationCompat.Action(
|
||||
R.drawable.ic_notification_action_resume_36dp,
|
||||
trackerService.getString(R.string.notification_resume),
|
||||
resumeActionPendingIntent
|
||||
)
|
||||
resumeActionPendingIntent)
|
||||
private val showAction = NotificationCompat.Action(
|
||||
R.drawable.ic_notification_action_show_36dp,
|
||||
trackerService.getString(R.string.notification_show),
|
||||
showActionPendingIntent
|
||||
)
|
||||
showActionPendingIntent)
|
||||
|
||||
}
|
|
@ -80,10 +80,7 @@ object PreferencesHelper {
|
|||
// get preferences
|
||||
val settings = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
// load length unit system
|
||||
return settings.getBoolean(
|
||||
Keys.PREF_USE_IMPERIAL_UNITS,
|
||||
LengthUnitHelper.useImperialUnits()
|
||||
)
|
||||
return settings.getBoolean(Keys.PREF_USE_IMPERIAL_UNITS, LengthUnitHelper.useImperialUnits())
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,10 +97,7 @@ object PreferencesHelper {
|
|||
// get preferences
|
||||
val settings = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
// load tracking state
|
||||
return settings.getInt(
|
||||
Keys.PREF_LOCATION_ACCURACY_THRESHOLD,
|
||||
Keys.DEFAULT_THRESHOLD_LOCATION_ACCURACY
|
||||
)
|
||||
return settings.getInt(Keys.PREF_LOCATION_ACCURACY_THRESHOLD, Keys.DEFAULT_THRESHOLD_LOCATION_ACCURACY)
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,23 +105,15 @@ object PreferencesHelper {
|
|||
fun loadCurrentBestLocation(context: Context): Location {
|
||||
// get preferences
|
||||
val settings = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val provider: String = settings.getString(
|
||||
Keys.PREF_CURRENT_BEST_LOCATION_PROVIDER,
|
||||
LocationManager.NETWORK_PROVIDER
|
||||
) ?: LocationManager.NETWORK_PROVIDER
|
||||
val provider: String = settings.getString(Keys.PREF_CURRENT_BEST_LOCATION_PROVIDER, LocationManager.NETWORK_PROVIDER) ?: LocationManager.NETWORK_PROVIDER
|
||||
// create location
|
||||
val currentBestLocation = Location(provider)
|
||||
// load location attributes
|
||||
currentBestLocation.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.accuracy =
|
||||
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)
|
||||
currentBestLocation.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.accuracy = 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
|
||||
}
|
||||
|
||||
|
@ -149,9 +135,7 @@ object PreferencesHelper {
|
|||
|
||||
/* Load currently selected app theme */
|
||||
fun loadThemeSelection(context: Context): String {
|
||||
return PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getString(Keys.PREF_THEME_SELECTION, Keys.STATE_THEME_FOLLOW_SYSTEM)
|
||||
?: Keys.STATE_THEME_FOLLOW_SYSTEM
|
||||
return PreferenceManager.getDefaultSharedPreferences(context).getString(Keys.PREF_THEME_SELECTION, Keys.STATE_THEME_FOLLOW_SYSTEM) ?: Keys.STATE_THEME_FOLLOW_SYSTEM
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,25 +51,18 @@ import org.y20k.trackbook.helpers.PreferencesHelper
|
|||
/*
|
||||
* MapFragmentLayoutHolder class
|
||||
*/
|
||||
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
|
||||
) {
|
||||
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) {
|
||||
|
||||
/* Define log tag */
|
||||
private val TAG: String = LogHelper.makeLogTag(MapFragmentLayoutHolder::class.java)
|
||||
|
||||
|
||||
/* Main class variables */
|
||||
val rootView: View = inflater.inflate(R.layout.fragment_map, container, false)
|
||||
private val mapView: MapView
|
||||
val rootView: View
|
||||
val mapView: MapView
|
||||
val currentLocationButton: FloatingActionButton
|
||||
val recordingButton: FloatingActionButton
|
||||
private val recordingButtonSubMenu: Group
|
||||
val recordingButtonSubMenu: Group
|
||||
val saveButton: FloatingActionButton
|
||||
val clearButton: FloatingActionButton
|
||||
val resumeButton: FloatingActionButton
|
||||
|
@ -84,6 +77,7 @@ data class MapFragmentLayoutHolder(
|
|||
/* Init block */
|
||||
init {
|
||||
// find views
|
||||
rootView = inflater.inflate(R.layout.fragment_map, container, false)
|
||||
mapView = rootView.findViewById(R.id.map)
|
||||
currentLocationButton = rootView.findViewById(R.id.fab_location_button)
|
||||
recordingButton = rootView.findViewById(R.id.fab_main_button)
|
||||
|
@ -108,19 +102,14 @@ data class MapFragmentLayoutHolder(
|
|||
}
|
||||
|
||||
// add compass to map
|
||||
val compassOverlay =
|
||||
CompassOverlay(context, InternalCompassOrientationProvider(context), mapView)
|
||||
val compassOverlay = CompassOverlay(context, InternalCompassOrientationProvider(context), mapView)
|
||||
compassOverlay.enableCompass()
|
||||
compassOverlay.setCompassCenter(36f, 60f)
|
||||
|
||||
mapView.overlays.add(compassOverlay)
|
||||
|
||||
// add my location overlay
|
||||
currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay(
|
||||
context,
|
||||
startLocation,
|
||||
trackingState
|
||||
)
|
||||
currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay(context, startLocation, trackingState)
|
||||
mapView.overlays.add(currentPositionOverlay)
|
||||
centerMap(startLocation)
|
||||
|
||||
|
@ -138,7 +127,7 @@ data class MapFragmentLayoutHolder(
|
|||
/* Listen for user interaction */
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private fun addInteractionListener() {
|
||||
mapView.setOnTouchListener { _, _ ->
|
||||
mapView.setOnTouchListener { v, event ->
|
||||
userInteraction = true
|
||||
false
|
||||
}
|
||||
|
@ -159,7 +148,7 @@ data class MapFragmentLayoutHolder(
|
|||
/* Save current best location and state of map to shared preferences */
|
||||
fun saveState(currentBestLocation: Location) {
|
||||
PreferencesHelper.saveCurrentBestLocation(context, currentBestLocation)
|
||||
PreferencesHelper.saveZoomLevel(context, mapView.zoomLevelDouble)
|
||||
PreferencesHelper.saveZoomLevel(context, mapView.getZoomLevelDouble())
|
||||
// reset user interaction state
|
||||
userInteraction = false
|
||||
}
|
||||
|
@ -168,8 +157,7 @@ data class MapFragmentLayoutHolder(
|
|||
/* Mark current position on map */
|
||||
fun markCurrentPosition(location: Location, trackingState: Int = Keys.STATE_TRACKING_NOT) {
|
||||
mapView.overlays.remove(currentPositionOverlay)
|
||||
currentPositionOverlay =
|
||||
MapOverlay(markerListener).createMyLocationOverlay(context, location, trackingState)
|
||||
currentPositionOverlay = MapOverlay(markerListener).createMyLocationOverlay(context, location, trackingState)
|
||||
mapView.overlays.add(currentPositionOverlay)
|
||||
}
|
||||
|
||||
|
@ -180,8 +168,7 @@ data class MapFragmentLayoutHolder(
|
|||
mapView.overlays.remove(currentTrackOverlay)
|
||||
}
|
||||
if (track.wayPoints.isNotEmpty()) {
|
||||
currentTrackOverlay =
|
||||
MapOverlay(markerListener).createTrackOverlay(context, track, trackingState)
|
||||
currentTrackOverlay = MapOverlay(markerListener).createTrackOverlay(context, track, trackingState)
|
||||
mapView.overlays.add(currentTrackOverlay)
|
||||
}
|
||||
}
|
||||
|
@ -214,13 +201,10 @@ data class MapFragmentLayoutHolder(
|
|||
}
|
||||
|
||||
|
||||
|
||||
/* Toggles content and visibility of the location error snackbar */
|
||||
fun toggleLocationErrorBar(gpsProviderActive: Boolean, networkProviderActive: Boolean) {
|
||||
if (ContextCompat.checkSelfPermission(
|
||||
context,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
) == PackageManager.PERMISSION_DENIED
|
||||
) {
|
||||
if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_DENIED) {
|
||||
// CASE: Location permission not granted
|
||||
locationErrorBar.setText(R.string.snackbar_message_location_permission_denied)
|
||||
locationErrorBar.show()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
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" />
|
||||
<path
|
||||
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"/>
|
||||
</vector>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="96.0"
|
||||
android:viewportHeight="96.0">
|
||||
android:height="24dp"
|
||||
android:viewportHeight="96.0"
|
||||
android:viewportWidth="96.0"
|
||||
android:width="24dp">
|
||||
<path
|
||||
android:fillAlpha="0.33"
|
||||
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
|
||||
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>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="96.0"
|
||||
android:viewportHeight="96.0">
|
||||
android:height="24dp"
|
||||
android:viewportHeight="96.0"
|
||||
android:viewportWidth="96.0"
|
||||
android:width="24dp">
|
||||
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -31,21 +31,17 @@
|
|||
|
||||
|
||||
<!-- COLOR NAMES -->
|
||||
|
||||
<!-- derived from recommended dark theme surface color -->
|
||||
<color name="trackbook_grey">#FF595959</color>
|
||||
<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>
|
||||
|
||||
<!-- Slightly muted variant of -> Material Design 2: Red 600 -->
|
||||
<color name="trackbook_red">#DC3D33</color>
|
||||
<color name="trackbook_red">#DC3D33</color> <!-- Slightly muted variant of -> Material Design 2: Red 600 -->
|
||||
<color name="trackbook_red_dark">#FFCA2D23</color>
|
||||
|
||||
<!-- Material Design recommended dark theme surface color -->
|
||||
<color name="trackbook_black">#FF121212</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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue