android-coordinatorlayout

BottomSheet sliding very slowly

▼魔方 西西 提交于 2021-02-11 18:19:28
问题 Hello , i want to change a view's padding according to bottomSheet's slideOffset. But when i tried to change view's padding on BoottomSheetBehaviour Callback, BottomSheet sliding speed goes slow down. here is my code: View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet); behavior = BottomSheetBehavior.from(bottomSheet); behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) {

BottomSheet sliding very slowly

前提是你 提交于 2021-02-11 18:19:23
问题 Hello , i want to change a view's padding according to bottomSheet's slideOffset. But when i tried to change view's padding on BoottomSheetBehaviour Callback, BottomSheet sliding speed goes slow down. here is my code: View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet); behavior = BottomSheetBehavior.from(bottomSheet); behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) {

bottom view below RecyclerView in CoordinatorLayout on android

走远了吗. 提交于 2021-02-11 14:56:52
问题 I switched from ConstraintLayout to CoordinatorLayout to avoid snackbar overlapping with my bottom view. While it worked very well in a screen with only a toolbar, RecyclerView and Floating button, in the second screen i am having a really hard time to add a view below the RecyclerView while avoiding it being overlapped with the RecyclerView My best solution yet (below) was to add paddingBottom attribute of about 80dp to the recyclerView. This looks like it solves the problem but when the

AppBarLayout.ScrollingViewBehavior - bottom of view off screen

谁说我不能喝 提交于 2021-01-27 16:01:44
问题 When using an AppBarLayout with the standard ScrollingViewBehavior , the AppBarLayout's sibling will by default be the height of the CoordinatorLayout and the sibling's bottom will be offscreen by the height of the AppBarLayout. In my use case, the NestedScrollView is merely a vehicle to allow for the collapsing of the toolbar, while displaying another scrollable view (fragment in this case) beneath the collapsible toolbar. The fragment is the one who contains the bottom-pinned view (FAB in

AppBarLayout.ScrollingViewBehavior - bottom of view off screen

人走茶凉 提交于 2021-01-27 15:40:43
问题 When using an AppBarLayout with the standard ScrollingViewBehavior , the AppBarLayout's sibling will by default be the height of the CoordinatorLayout and the sibling's bottom will be offscreen by the height of the AppBarLayout. In my use case, the NestedScrollView is merely a vehicle to allow for the collapsing of the toolbar, while displaying another scrollable view (fragment in this case) beneath the collapsible toolbar. The fragment is the one who contains the bottom-pinned view (FAB in

Can CoordinatorLayout Behavior be applied only on direct children of CoordinatorLayout?

时光总嘲笑我的痴心妄想 提交于 2021-01-27 07:26:37
问题 Based on my reading so far, Behavior can only be applied to direct children of CoordinatorLayout . But the following code is confusing me: <?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/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools

Can CoordinatorLayout Behavior be applied only on direct children of CoordinatorLayout?

為{幸葍}努か 提交于 2021-01-27 07:24:47
问题 Based on my reading so far, Behavior can only be applied to direct children of CoordinatorLayout . But the following code is confusing me: <?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/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools

CoordinatorLayout as top-level decor when NavHostFragment contains non-scrolling views

Deadly 提交于 2020-12-12 10:15:53
问题 I'm attempting to make a single-activity app with shared chrome (toolbar, etc) in the activity. I'd like to use Google's components ( CoordinatorLayout and AppBarLayout ) to make use of the toolbar's auto-hide feature, which hides/reveals when content is scrolled. This is crucial for the "home" destination of the app which has a view pager with scrollable content on each page. I've set the NavHostFragment 's layout_behavior to the suggested scrolling behavior, but this doesn't work well when

CoordinatorLayout as top-level decor when NavHostFragment contains non-scrolling views

一笑奈何 提交于 2020-12-12 10:14:11
问题 I'm attempting to make a single-activity app with shared chrome (toolbar, etc) in the activity. I'd like to use Google's components ( CoordinatorLayout and AppBarLayout ) to make use of the toolbar's auto-hide feature, which hides/reveals when content is scrolled. This is crucial for the "home" destination of the app which has a view pager with scrollable content on each page. I've set the NavHostFragment 's layout_behavior to the suggested scrolling behavior, but this doesn't work well when