Skip to content

Commit 9b5b8db

Browse files
committed
Build156
- Added two new splash screens - Fixed marker resizing issue when custom location is on - Updated dependencies
1 parent ec9d887 commit 9b5b8db

File tree

9 files changed

+1882
-12
lines changed

9 files changed

+1882
-12
lines changed

.idea/misc.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ dependencies {
141141
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
142142

143143
// Google Services and Default android libs
144-
implementation 'com.google.android.gms:play-services-location:19.0.0'
144+
implementation 'com.google.android.gms:play-services-location:19.0.1'
145145
implementation 'com.google.android.play:core-ktx:1.8.1'
146-
implementation 'com.google.android.gms:play-services-maps:18.0.1'
146+
implementation 'com.google.android.gms:play-services-maps:18.0.2'
147147
implementation 'com.google.android.material:material:1.4.0'
148148
implementation 'com.google.maps.android:android-maps-utils:2.2.4'
149149

@@ -153,9 +153,9 @@ dependencies {
153153
implementation 'com.github.vipulasri:timelineview:1.1.5'
154154

155155
// Room components
156-
implementation "androidx.room:room-ktx:2.4.0-rc01"
157-
kapt "androidx.room:room-compiler:2.4.0-rc01"
158-
androidTestImplementation "androidx.room:room-testing:2.4.0-rc01"
156+
implementation "androidx.room:room-ktx:2.4.1"
157+
kapt "androidx.room:room-compiler:2.4.1"
158+
androidTestImplementation "androidx.room:room-testing:2.4.1"
159159

160160
// Leak Canary -- debugImplementation because LeakCanary should only run in debug builds.
161161
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.5'

app/src/full/java/app/simple/positional/constants/LauncherBackground.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ object LauncherBackground {
7878
R.drawable.launcher_day_71,
7979
R.drawable.launcher_day_72,
8080
R.drawable.launcher_day_73,
81+
R.drawable.launcher_day_74,
82+
R.drawable.launcher_day_75,
8183
)
8284

8385
val vectorBackgroundNight = intArrayOf(
@@ -178,6 +180,8 @@ object LauncherBackground {
178180
intArrayOf(parseColor("#FFE66716"), parseColor("#FFFA8E10")), // 71
179181
intArrayOf(parseColor("#FFE24949"), parseColor("#FFB52C2C")), // 72
180182
intArrayOf(parseColor("#FF5F8E55"), parseColor("#FFB5B784")), // 73
183+
intArrayOf(parseColor("#FFF16000"), parseColor("#FFF0C549")), // 74
184+
intArrayOf(parseColor("#FF696E12"), parseColor("#FFB79521")), // 75
181185
)
182186

183187
val vectorNightColors: Array<IntArray> = arrayOf(
File renamed without changes.

app/src/full/res/drawable/launcher_day_74.xml

Lines changed: 1232 additions & 0 deletions
Large diffs are not rendered by default.

app/src/full/res/drawable/launcher_day_75.xml

Lines changed: 609 additions & 0 deletions
Large diffs are not rendered by default.

app/src/main/java/app/simple/positional/decorations/maps/Maps.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,11 @@ class Maps(context: Context, attributeSet: AttributeSet) : CustomMaps(context, a
307307
if (googleMap.isNotNull()) {
308308
runCatching {
309309
if (isCustomCoordinate) {
310-
throw IllegalStateException()
310+
marker!!.apply {
311+
setAnchor(0.5F, 1F)
312+
setIcon(BitmapDescriptorFactory.fromBitmap(markerBitmap!!))
313+
isFlat = false
314+
}
311315
} else {
312316
marker!!.apply {
313317
setAnchor(0.5F, if (location!!.speed > 0F) 0.5F else 1F)

app/src/main/java/app/simple/positional/util/LocationExtension.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ object LocationExtension {
5656
return distance
5757
}
5858

59+
/**
60+
* Calculated distance in meters
61+
*/
5962
fun measureDisplacement(list: Array<LatLng>): Float {
6063
val result = floatArrayOf(0f)
6164
var distance = 0F

app/src/main/java/app/simple/positional/viewmodels/viewmodel/LocationViewModel.kt

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@ class LocationViewModel(application: Application) : WrappedViewModel(application
8989

9090
graphData(this)
9191

92-
if (!MainPreferences.isCustomCoordinate()) {
93-
targetData(
94-
LatLng(GPSPreferences.getTargetMarkerCoordinates()[0].toDouble(),
95-
GPSPreferences.getTargetMarkerCoordinates()[1].toDouble()),
96-
LatLng(this.latitude, this.longitude))
97-
}
92+
targetData(
93+
LatLng(GPSPreferences.getTargetMarkerCoordinates()[0].toDouble(),
94+
GPSPreferences.getTargetMarkerCoordinates()[1].toDouble()),
95+
LatLng(this.latitude, this.longitude))
9896
}
9997
}
10098
"provider" -> {
@@ -222,6 +220,24 @@ class LocationViewModel(application: Application) : WrappedViewModel(application
222220
}
223221
}
224222

223+
private fun targetETA(target: LatLng, current: LatLng, speed: Double): StringBuilder {
224+
return StringBuilder().also {
225+
it.append("<b>ETA: </b>")
226+
227+
if (GPSPreferences.isTargetMarkerSet()) {
228+
val p0 = LocationExtension.measureDisplacement(arrayOf(target, current))
229+
230+
val time = p0 / speed
231+
232+
233+
} else {
234+
it.append(getString(R.string.not_available))
235+
}
236+
237+
it.append("<br>")
238+
}
239+
}
240+
225241
private fun dms(location: Location) {
226242
with(getApplication<Application>()) {
227243
dms.postValue(Pair(

0 commit comments

Comments
 (0)