coordinator-layout

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

dx during scrolling with BottomSheetBehavior is zero

痴心易碎 提交于 2020-01-15 03:22:26
问题 I have my custom BottomSheetBehavior: public class CustomBehavior extends BottomSheetBehavior { public CustomBehavior(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dx, int dy, int[] consumed) { super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed); } } And I use it in my xml code. <android.support.design.widget.CoordinatorLayout xmlns:android="http:

CoordinatorLayout with NestedScrollView doesn't resize with adjustResize

主宰稳场 提交于 2020-01-14 13:38:06
问题 I have a view which contains a CoordinatorLayout which wraps an AppBarLayout and a NestedScrollView . Inside the NestedScrollView there is an EditText I'm having problems showing the soft input keyboard and having it correctly resize the view . With the usual flag android:windowSoftInputMode="adjustResize" everything seems to work fine, apart from when you hide the input. With the input open (image 2), the NestedScrollView (with the boring grey background) has shrunk so you can scroll to the

NestedScrolling with NestedScrollView, RecyclerView (Horizontal), inside a CoordinatorLayout

拥有回忆 提交于 2019-12-30 04:05:20
问题 I have a UI design with CollapsingToolbarLayout, like following. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/detail_backdrop_height" android:fitsSystemWindows="true" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android

Create an Overlay view to cover whole activity including toolbar in coordinator layout

寵の児 提交于 2019-12-24 03:01:32
问题 I want to create an overlay kind of layout to be displayed above an activity including toolbar. I cannot use any library to do this as everything that I've written is custom. I was able to achieve it by adding my view to decor view directly, by using this code : ViewGroup vg = (ViewGroup)(getWindow().getDecorView().getRootView()); tutorialViewContainer = (RelativeLayout) View.inflate(this, R.layout.layout_simple_overlay, null); vg.addView(tutorialViewContainer, params); but this code has an

Android support design library CoordinatorLayout with webview problem

元气小坏坏 提交于 2019-12-22 09:25:19
问题 I am using CoordinatorLayout with webview in my app. but I have a problem like the image : (source: duitang.com) on 4.4+. I don't know what's the problem with my layout. this is my xml layout. <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swipelayout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.CoordinatorLayout xmlns

How to use coordinator layout with fragment as “scrolling view”

余生长醉 提交于 2019-12-22 04:22:12
问题 I'm trying to use a coordinator layout with an appbar layout that hosts a fragment as the "scrolling view". The fragment consists of a recyclerView and a bottom aligned layout holding a button, like so: However, the bottom section is hidden by default: and only shows up after I scroll. From my activity class: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TestFragment fragment = (TestFragment)

How to use coordinator layout with fragment as “scrolling view”

一笑奈何 提交于 2019-12-22 04:22:07
问题 I'm trying to use a coordinator layout with an appbar layout that hosts a fragment as the "scrolling view". The fragment consists of a recyclerView and a bottom aligned layout holding a button, like so: However, the bottom section is hidden by default: and only shows up after I scroll. From my activity class: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TestFragment fragment = (TestFragment)

Espresso, scrolling not working when NestedScrollView or RecyclerView is in CoordinatorLayout

老子叫甜甜 提交于 2019-12-18 11:52:44
问题 It looks like CoordinatorLayout breaks the behaviour of Espresso actions such as scrollTo() or RecyclerViewActions.scrollToPosition() . Issue with NestedScrollView For a layout like this one: <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_behavior="@string/appbar_scrolling_view_behavior"> ...