I am using map from Yandex MapKit. When user taps on the map I show him search results, add placemark and show snackbar with location name and button.
Problem
On my Xiaomi device (Xiaomi Mi 9, android 9) snackbar exists, but it is invisible until some action hasn't been done.
Example: Tap on the map Open apps manager Open app again by tap in apps manager
I can also open search edit (top of the map) and snackbar will be shown. When snackbar is invisible, it exists: I can tap on the snackbar button radius and button's action will be run!
There isn't any problem when I use android emulator (Google Pixel in different APIs: 23, 28, 29...)
My activity XML:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/placesMapLayout"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".activities.PlacesMapActivity">
<com.yandex.mapkit.mapview.MapView
android:id="@+id/placesMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/outlinedTextField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxBackgroundColor="@color/white"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_margin="20dp"
android:hint="@null">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/searchEdit"
android:imeOptions="actionSearch"
android:inputType="text"
app:boxBackgroundColor="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
</RelativeLayout>
Snackbar creating (Kotlin):
val snackbar = Snackbar.make(placesMapLayout, foundObject.name.toString(), Snackbar.LENGTH_INDEFINITE)
I tried to set layout_height for mapView to get empty place in activity's bottom. And it have worked: screenshot. One tap and snackbar is visible! But I don't want to crop my map.
So, is there a problem with mapView and how to solve it?