android-coordinatorlayout

onNestedScroll called only once

纵饮孤独 提交于 2019-12-21 04:33:24
问题 I have a class public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior { public ScrollAwareFABBehavior(Context context, AttributeSet attrs) { super(); } public ScrollAwareFABBehavior() { super(); } @Override public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final FloatingActionButton child,final View directTargetChild, final View target, final int nestedScrollAxes) { return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL; } @Override public

CoordinatorLayout children are not fullscreen

邮差的信 提交于 2019-12-20 23:08:11
问题 I have an Activity which is displayed fullscreen. This works perfectly with many layouts I have tried, except for when the CoordinatorLayout is the root ViewGroup . The CoordinatorLayout itself has both width and height set to match_parent and it takes the whole screen as it should. But the child views that should have the same size as the CoordinatorLayout are laid as if the navigation bar was still visible. Is there a way to make the child views resize with the CoordinatorLayout ? Obviously

CollapsingToolbarLayout not collapsing when EditText get focused

不想你离开。 提交于 2019-12-20 17:35:47
问题 I am using CollapsingToolBar inside CoordinatorLayout and I've NestScrollView containing some EditText as child views. What i am facing is when edittext get focused and keybaoard appear my complete view doesn't scroll up. Below is the code and image as output of that layout. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/app_bar_height" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android

AppBarLayout + TabLayout + CollapsingToolbarLayout + SwipeToRefresh

怎甘沉沦 提交于 2019-12-20 10:53:16
问题 I met a lot of issues related with my problem but nobody I found wanted the behaviour I'm looking for. I want a view pager with tabs and app bar, when the contained fragments are scrollable and are scrolled (toward bottom), I want the app bar to disapear but leave the tabs, when scrolled toward top, to re-apear. some of these fragments contain a SwipeToRefresh Layout (sometimes it causes problems). I tried a lot of configurations that always leave something wrong. for now I don't have the

AppBarLayout + TabLayout + CollapsingToolbarLayout + SwipeToRefresh

故事扮演 提交于 2019-12-20 10:53:08
问题 I met a lot of issues related with my problem but nobody I found wanted the behaviour I'm looking for. I want a view pager with tabs and app bar, when the contained fragments are scrollable and are scrolled (toward bottom), I want the app bar to disapear but leave the tabs, when scrolled toward top, to re-apear. some of these fragments contain a SwipeToRefresh Layout (sometimes it causes problems). I tried a lot of configurations that always leave something wrong. for now I don't have the

Non-Scrolling Fragment in a ViewPager inside CoordinatorLayout

若如初见. 提交于 2019-12-20 10:35:03
问题 I am using a ViewPager in a CoordinatorLayout (from latest version of Design Library) in an Activity. Some fragments for this ViewPager have layouts such as RecyclerView or NestedScrollView, but some just cannot scroll given their small content. <android.support.design.widget.AppBarLayout android:id="@+id/tabanim_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/MyTheme"> <android.support.v7.widget.Toolbar android:id="@+id/tabanim_toolbar"

Clickable CardView inside NestedScroll doesn't trigger scrolling

╄→尐↘猪︶ㄣ 提交于 2019-12-20 09:36:46
问题 I have a layout with a CoordinatorLayout, and AppBarLayout and a NestedScrollView, inside the NestedScrollView I have multiple CardViews, everything works ok until I set the CardViews to be clickable, then if I start a scroll within a CardView, scroll doesn't work. This is my layout: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width=

How to get Adview below Viewpager in CoordinatorLayout

孤街浪徒 提交于 2019-12-20 08:25:46
问题 At the moment the AdView is appearing inside the ViewPager so its blocking the content in the app. How can I get the AdView to appear below the ViewPager and not inside. I have tried to put the AdView in a RelativeLayout below the ViewPager but then the AdView doesn't show at all. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:ads="http://schemas.android.com/apk

CoordinatorLayout is not visible in Design view

余生长醉 提交于 2019-12-20 07:35:39
问题 Say I have a fragment: <?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" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" > <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay" >

CoordinatorLayout status bar padding disappears during fragment transactions

家住魔仙堡 提交于 2019-12-19 09:16:14
问题 With the 22.2.1 Design Support Library and API 22(have not tested on earlier versions yet), I'm running into issues with the status bar padding when switching between fragments. The initial fragment loads fine, but after a fragment transaction, the status bar padding disappears, pushing all the views up where they shouldn't be. The same thing happens to the original fragment after popping the back stack. Rotating the device fixes it, as does opening the soft keyboard(but only in portrait, not