I have a snackbar that runs when I click on a marker, the problem I have is the position where the snackbar opens:
is interrupted with the android action buttons and my idea is to move it a little higher, then the code I'm using
map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
View v1 = getWindow().getDecorView().getRootView();
Snackbar.make(v1,"Nombre de la ciclovía: "+marker.getTitle()+ System.getProperty ("line.separator")+"Caracteristicas de la vía: "+marker.getSnippet(),Snackbar.LENGTH_INDEFINITE).show();
return false;
}
});
here is the layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_main"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.ciclomapp.ciclomapp.ciclomapp.MainActivity"
tools:showIn="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/background_light">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>