appcompat-v7-r22.2

How to add shadow to the FAB provided with the android support design library?

不问归期 提交于 2019-11-26 22:19:33
The title is pretty self explaining. The following code does not render shadow below the Floating Action Button. What can be done to render shadow? Is this feature really not supported even on API 21+? <android.support.design.widget.FloatingActionButton android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/ic_add" android:clickable="true" /> Note: Adding android:elevation does not add shadow on API 21. Screenshot taken from the example by dandar3: https://github.com/dandar3/android-support-design Simply setting app:borderWidth="0dp" resolve this issues

Flinging with RecyclerView + AppBarLayout

一个人想着一个人 提交于 2019-11-26 14:48:17
I am using the new CoordinatorLayout with AppBarLayout and CollapsingToolbarLayout. Below AppBarLayout, I have a RecyclerView with a list of content. I have verified that fling scrolling works on the RecyclerView when I am scrolling up and down the list. However, I would also like the AppBarLayout to smoothly scroll during expansion. When scrolling up to expand the CollaspingToolbarLayout, scrolling immediately stops once lifting your finger off the screen. If you scroll up in a quick motion, sometimes the CollapsingToolbarLayout re-collapses as well. This behavior with the RecyclerView seems