Ich habe eine FAB-Taste in einer Coordinator Layout
, und ich habe Snackbars in der Coordinator Layout
Pop-up-Popup eingestellt. Wenn jedoch eine Snackbar sichtbar ist und ich eine Aktion ausführe, die eine weitere Snackbar auslöst, während die erste noch sichtbar ist, stört die FAB-Taste und fällt hinter die Snackbar. Anstatt sich mit der Snackbar zu bewegen.Snackbar und FloatingActionButton Bug
Ich habe die Coordinator Layout
innerhalb einer Relative Layout
obwohl mit einer adview
unter der Coordinator Layout
.
Dies ist der layout.xml
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/background">
<RelativeLayout
android:id="@+id/circle2"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/container2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/adView"
android:background="#FFF3E0"
tools:context=".MainActivity"
android:orientation="vertical">
<SurfaceView
android:layout_width="0px"
android:layout_height="0px"
android:visibility="gone" />
<include
android:id="@+id/circle"
layout="@layout/periodictablelayout" />
<include
android:id="@+id/toolbar_actionbar"
layout="@layout/toolbar_default"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="?android:attr/actionBarSize"
/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/periodbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:elevation="3dp"
android:onClick="onClick"
app:layout_anchorGravity="bottom|right|end"
app:layout_anchor="@+id/container2"
android:src="@drawable/ic_view_comfy_white_24dp"
app:backgroundTint="@color/accent"
android:layout_gravity="bottom|end"
app:layout_behavior="ibochemistry.titomo.timetoolay.google.com.ibchemistry.ScrollAwareFABBehaviour" />
</android.support.design.widget.CoordinatorLayout>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"
app:layout_anchorGravity="bottom" />
</RelativeLayout>
<!-- android:layout_marginTop="?android:attr/actionBarSize"-->
<fragment
android:id="@+id/fragment_drawer"
android:name="ibo.NavigationDrawerFragment"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginTop="@dimen/abc_action_bar_default_height_material"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
ein glück? Ich habe den gleichen Bug selbst – EviatarS