RuntimeException: Could not inflate Behavior subclass
Add the following two constructors to your FooterBehavior: public FooterBehavior() { } public FooterBehavior(Context context, AttributeSet attrs) { super(context, attrs); }
Add the following two constructors to your FooterBehavior: public FooterBehavior() { } public FooterBehavior(Context context, AttributeSet attrs) { super(context, attrs); }
This is happening because the Espresso scrollTo() method explicitly checks the layout class and only works for ScrollView & HorizontalScrollView. Internally it’s using View.requestRectangleOnScreen(…) so I’d expect it to actually work fine for many layouts. My workaround for NestedScrollView was to take ScrollToAction and modify that constraint. The modified action worked fine for NestedScrollView with … Read more
Set the scroll behavior to the SwipeRefreshLayout not the RecyclerView. <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id=”@+id/swipe_container” android:layout_width=”match_parent” android:layout_height=”match_parent” app:layout_behavior=”@string/appbar_scrolling_view_behavior”> <androidx.recyclerview.widget.RecyclerView android:id=”@+id/cardList” android:layout_width=”match_parent” android:layout_height=”match_parent” android:scrollbars=”vertical” /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
The ScrollView does not cooperate with the CoordinatorLayout. You have to use NestedScrollView instead of ScrollView
Disable nested scrolling on the scrolling fragment content: recyclerView.setNestedScrollingEnabled(false); Use this if you’re using the support library: ViewCompat.setNestedScrollingEnabled(recyclerView, false);
CoordinatorLayout is a super-powered FrameLayout. CoordinatorLayout CoordinatorLayout is intended for two primary use cases: As a top-level application decor or chrome layout As a container for a specific interaction with one or more child views By default, if you add multiple children to a FrameLayout, they would overlap each other. A FrameLayout should be used … Read more