android-coordinatorlayout

Android collapsing toolbar with RecyclerView

孤街醉人 提交于 2019-12-08 04:34:36
问题 I am attempting to use the collapsing toolbar in conjunction with a RecyclerView , most examples of collapsing toolbar that I can find are usually with a static scrollview and the few I have found with a RecyclerView don't work, has anyone been able to make this work? I will include my xml code below: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/tools"

How to use map fragment correctly in Collapsingtoolbarlayout

妖精的绣舞 提交于 2019-12-07 16:29:10
问题 When I slide a mapview up/down in CoordinatorLayout,this map will also be expanded/collapsed. I want the map can be up/down or the other move events to see other places. just in mapview. How to do this. Thanks in advance. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawerLayout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support

F.A.B Hides but Doesn't Show

依然范特西╮ 提交于 2019-12-07 12:48:05
问题 Trying to implement a Floating Action Button (F.A.B) that hides on scroll down, and shows on scroll up. I have ScrollAwareFABBehavior.java to manage this, and it's connected to the F.A.B in in the XML activity_main . Problem: The F.A.B hides on scroll down, but doesn't show again when I scroll up. I logged the onNestedScroll method and it calls "calling scroll" and "calling to hide" while scrolling down; but after the F.A.B is hidden there are none of the 3x Log 's Question: Why does the F.A

RecyclerView SCROLL_STATE_IDLE is being called late

笑着哭i 提交于 2019-12-07 12:45:12
问题 On RecyclerView addOnScrollListener the property SCROLL_STATE_IDLE takes time to get called at end of the item size and when scrolled up to the top of the RecyclerView. But it works fine in middle of the scrolling. The root view of the layout is CoordinatorLayout. 回答1: Having the same issue, the only workaround I've found is to send a stopScroll() whenever the RecyclerView gets a SCROLL_STATE_SETTLING , though not the ideal solution. Probably would be better to detect if it has reached the

ViewPager with Coordinator Layout

倖福魔咒の 提交于 2019-12-07 11:00:36
问题 I have an activity layout that looks like the following: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.v7.widget

Persistent BottomSheet Below Fragment Contents?

血红的双手。 提交于 2019-12-07 08:19:09
问题 Using a Persistent BottomSheet, within a CoordinatorLayout, how can one prevent the BottomSheet from covering other user interface elements when the BottomSheet is in its COLLAPSED aka peeked state? I've successfully added a BottomSheet to my Navigation Drawer & Fragment based application; however, as mentioned above, the BottomSheet covers user interface elements within my fragment container when it's either COLLAPSED or EXPANDED Covering part of the fragment is ok when the BottomSheet is

CoordinatorLayout adds space between AppBarLayout and RecyclerView

杀马特。学长 韩版系。学妹 提交于 2019-12-07 06:14:04
问题 CoordinatorLayout adds space between AppBarLayout and RecyclerView . Not sure whether its the Toolbar or AppBarLayout . Screenshot of the rendered layout on phone: The design rendering on Studio doesn't how this space. Any idea on what's going on? The Code Itself. <?xml version="1.0" encoding="utf-8"?> <FrameLayout 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

CoordinatorLayout does not hide Toolbar on scrolling despite implementing all required parameters

好久不见. 提交于 2019-12-07 00:01:12
问题 Here is my setup, i am running a DrawerLayout , within it is a CoordinatorLayout containing an AppBarLayout and a nestedscrollview . I am trying to have the nestedscrollview scroll normally and the Toolbar to get hidden on scrolling down and reppear on scrolling up. Attached within is my XML code. Would appreciate any help.. have read all related questions and implemented their answers without any success. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk

Translucent StatusBar on kitkat with FrameLayout above the Toolbar and using CoordinatorLayout

微笑、不失礼 提交于 2019-12-06 15:11:55
问题 I was trying to achieve Translucent StatusBar on kitkat with the following FrameLayout and it's working without CoordinatorLayout like this: Layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:weightSum="1"> <FrameLayout android:id="@+id/statusbar" android:layout_width="match_parent" android:layout_height="25dp"

BottomSheet custom behavior - above BottomBar

此生再无相见时 提交于 2019-12-06 11:49:35
问题 I want to display BottomSheet above my BottomBar . So I have to write custom BottomSheet behavior that will put my BottomSheet above my BottomBar - the BottomBar has shy behavior (hidding during scrolling). There is what I tried to implement: public class BottomSheetBehavior<T extends View> extends android.support.design.widget.BottomSheetBehavior<T> { public BottomSheetBehavior(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean layoutDependsOn