Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialogs may break hide animation #20

Open
MFlisar opened this issue Jan 15, 2018 · 0 comments
Open

Dialogs may break hide animation #20

MFlisar opened this issue Jan 15, 2018 · 0 comments
Labels

Comments

@MFlisar
Copy link
Contributor

MFlisar commented Jan 15, 2018

After opening a dialog it sometimes happens that this breaks the fab animation and the fab vanishes and is not shown again. The video shows that the fab does not appear anymore after opening the dialog the second time. I think this is related to using focus while animating, but I'm not 100% sure about this. Often the fab is not shown after shwoing the dialog the first time as well...

I could observe, that this only happens if the dialog has an EditText that instantly requests focus and opens the keyboard.

For your information, I'm not doing anything with the fab myself like hidding it or pinning it, it's placed at a fix position and is not shown/hidden while scrolling the list - as you can see in my example layout.

Here's a video showing the behaviour:

ezgif-3-d8010fe5bb

Example layout

<layout xmlns:android="http://schemas.android.com/apk/res/android"
		xmlns:app="http://schemas.android.com/apk/res-auto">

	<android.support.design.widget.CoordinatorLayout
		android:id="@+id/coord"
		android:layout_width="match_parent"
		android:layout_height="match_parent">

		<android.support.v7.widget.RecyclerView
			android:id="@+id/rvSidebar"
			android:clipToPadding="false"
			android:layout_width="match_parent"
			android:layout_height="match_parent"
			android:paddingBottom="@dimen/page_padding_plus_extra_space_for_fab"
			android:paddingTop="@dimen/page_padding"/>

		<TextView
			android:id="@+id/tvEmpty"
			android:text="@string/no_items"
			android:padding="8dp"
			android:layout_gravity="center"
			android:layout_width="match_parent"
			android:layout_height="wrap_content" />

		<android.support.design.widget.FloatingActionButton
			android:id="@+id/fab"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="bottom|right|end"
			android:layout_margin="16dp"
			app:backgroundTint="?attr/colorPrimary"
			app:fabSize="normal"
			app:ico_color="@color/md_white_1000"
			app:ico_icon="@string/gmd_add"
			app:ico_size="24dp"
			app:ico_padding="4dp"/>

		<com.hlab.fabrevealmenu.view.IconicsFABRevealMenu
			android:id="@+id/fabMenu"
			android:layout_width="match_parent"
			android:layout_height="match_parent"
			app:animateItems="true"
			app:menuBackgroundColor="?attr/colorPrimary"
			app:menuDirection="up"
			app:menuRes="@menu/fab_menu_sidebar"
			app:menuTitleTextColor="@color/md_white_1000"
			app:menuTitleDisabledTextColor="@color/md_grey_400"
			app:menuSize="small"
			app:showOverlay="true"
			app:showTitle="true"
			app:overlayBackground="#00000000"/>

	</android.support.design.widget.CoordinatorLayout>

</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants