feat!: Application outline

This commit is contained in:
Piotr Dec 2024-07-23 00:55:59 +02:00
parent 80dfa6ab4e
commit 01fbf32042
Signed by: stawros
GPG key ID: F89F27AD8F881A91
9 changed files with 1440 additions and 190 deletions

View file

@ -0,0 +1,59 @@
package eu.ztsh.garmin
import android.content.res.Resources
import com.mapbox.maps.EdgeInsets
import eu.ztsh.garmin.databinding.ActivityMainBinding
class UI(b: ActivityMainBinding) {
companion object {
const val BUTTON_ANIMATION_DURATION = 1500L
private val pixelDensity = Resources.getSystem().displayMetrics.density
val overviewPadding: EdgeInsets by lazy {
EdgeInsets(
140.0 * pixelDensity,
40.0 * pixelDensity,
120.0 * pixelDensity,
40.0 * pixelDensity
)
}
val landscapeOverviewPadding: EdgeInsets by lazy {
EdgeInsets(
30.0 * pixelDensity,
380.0 * pixelDensity,
110.0 * pixelDensity,
20.0 * pixelDensity
)
}
val followingPadding: EdgeInsets by lazy {
EdgeInsets(
180.0 * pixelDensity,
40.0 * pixelDensity,
150.0 * pixelDensity,
40.0 * pixelDensity
)
}
val landscapeFollowingPadding: EdgeInsets by lazy {
EdgeInsets(
30.0 * pixelDensity,
380.0 * pixelDensity,
110.0 * pixelDensity,
40.0 * pixelDensity
)
}
}
val mapView = b.mapView
val maneuverView = b.maneuverView
val tripProgressView = b.tripProgressView
val tripProgressCard = b.tripProgressCard
val recenter = b.recenter
val soundButton = b.soundButton
val routeOverview = b.routeOverview
val stop = b.stop
}