feat!: Application outline
This commit is contained in:
parent
80dfa6ab4e
commit
01fbf32042
9 changed files with 1440 additions and 190 deletions
59
app/src/main/java/eu/ztsh/garmin/UI.kt
Normal file
59
app/src/main/java/eu/ztsh/garmin/UI.kt
Normal 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
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue