Compare commits

..

2 Commits

Author SHA1 Message Date
Johan von Forstner
87421e450a fix missing API key in Google variant, hotfix release 2020-08-28 15:17:05 +02:00
johan12345
479917fad1 fix wrong position of layers button in case of display cutout (fixes #51) 2020-08-24 22:57:02 +02:00
4 changed files with 18 additions and 2 deletions

View File

@@ -13,8 +13,8 @@ android {
applicationId "net.vonforst.evmap"
minSdkVersion 21
targetSdkVersion 29
versionCode 25
versionName "0.3.4"
versionCode 26
versionName "0.3.4a"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@@ -2,7 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.vonforst.evmap">
<application>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
</application>
</manifest>

View File

@@ -169,6 +169,18 @@ class MapFragment : Fragment(), OnMapReadyCallback, MapsActivity.FragmentCallbac
binding.detailAppBar.toolbar.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = insets.systemWindowInsetTop
}
// margin of layers button
val density = resources.displayMetrics.density
// status bar height + toolbar height + margin
val margin =
insets.systemWindowInsetTop + (48 * density).toInt() + (24 * density).toInt()
binding.fabLayers.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = margin
}
binding.layersSheet.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = margin
}
insets
}

View File

@@ -0,0 +1,2 @@
Crash fixed
Fix wrong position of layers button on devices with camera cutout