android-appbarlayout

Hiding Toolbar on scroll with recyclerview inside fragment

余生颓废 提交于 2019-12-03 22:12:35
I'm trying to get the toolbar to collapse on scroll when a recyclerview inside a fragment is scrolled. To start, heres my main layout: <DrawerLayout> <RelativeLayout android:id="@+id/mainRelativeLayout" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="wrap_content" > <android.support.design.widget.AppBarLayout android:id="@+id/appBarLayout" android:layout_width="match_parent" android:layout_height="wrap_content" > <Toolbar android:id="@+id/toolbar" android

AppBarLayout child doesn't collapse when scrolling

冷暖自知 提交于 2019-12-03 21:11:52
I have a AppBarLayout which contains an horizontal RecyclerView among its children. The sibling of the AppBarLayout is a ViewPager (which contains a vertical RecyclerView ). Here is the XML: <android.support.design.widget.CoordinatorLayout android:id="@+id/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" tools:context=".ui.search.SearchResultFragment"> <android.support.v4.view.ViewPager android

CoordinatorLayout custom behavior with AppBarLayout

允我心安 提交于 2019-12-03 18:22:30
问题 I am trying to achieve a similar behavior to that of Telegram, on the settings page, that is, there is a CircleImage that when scrolling up goes to the left of the Topbar title, and when scrolling down goes to the middle of the expanded AppBarLayout. I was basing my work on this example: https://github.com/saulmm/CoordinatorBehaviorExample But in this case the original coder is recreating the Topbar twice. I dont want to do that, the default behavior of the topbar is what I need and also I

How can BottomSheetBehavior, AppBarLayout.ScrollingViewBehavior, and AppBarLayout.Behavior work together in unison?

不想你离开。 提交于 2019-12-03 16:27:19
In the GIF below you'll see I'm having trouble coordinating (heh) an AppBarLayout , containing a CollapsingToolbarLayout , and a Persistent BottomSheet in such a way that they play nicely together Goal: Have the fragment contents , seen above in turquoise ( #26999f ), remain above, yet scroll behind, the BottomSheet, seen above in dark green (#12783e) , while also respecting the AppBarLayout and its Behavior Again, as you can see from the GIF I'm close; the fragment contents is using a custom layout_behavior , MyScrollingViewBehavior , which extends AppBarLayout.ScrollingViewBehavior In the

Detecting when AppBarLayout/CollapsingToolbarLayout is completely expanded

只愿长相守 提交于 2019-12-03 15:20:21
问题 I have a fragment that uses the new CoordinatorLayout/AppBarLayout/CollapsingToolbarLayout paradigm, and I'd like to be able to detect when the collapsing toolbar is fully expanded so that I can perform an operation on the entire fragment it's in, e.g. popping the fragment off the stack and going to a new one, dismissing the fragment. I have the dismissing code working, I just need to know when and when not to use it. I've experimented a bit with AppBarLayout.OnOffsetChangedListener, but didn

Detecting when AppBarLayout/CollapsingToolbarLayout is completely expanded

给你一囗甜甜゛ 提交于 2019-12-03 05:52:05
I have a fragment that uses the new CoordinatorLayout/AppBarLayout/CollapsingToolbarLayout paradigm, and I'd like to be able to detect when the collapsing toolbar is fully expanded so that I can perform an operation on the entire fragment it's in, e.g. popping the fragment off the stack and going to a new one, dismissing the fragment. I have the dismissing code working, I just need to know when and when not to use it. I've experimented a bit with AppBarLayout.OnOffsetChangedListener , but didn't have much luck. Is there a way to use it to determine when things are completely expanded, or is

CollapsingToolbarLayout flickers while scrolling down

寵の児 提交于 2019-12-02 14:19:41
问题 I have a detail page which includes CollapsingToolbarLayout and NestedScrollView in CoordinatorLayout. When I scroll up from CollapsingToolbarLayout and scroll down from NestedScrollView very fast and immediately, it flickers and not provide me a smooth scroll. It also happens in Cheesesquare demo app. However, in Whatsapp profile page, it doesn't happen. Here is a video for better understanding: http://sendvid.com/4xsrya3w This is the layout of my page: <?xml version="1.0" encoding="utf-8"?>

Set Toolbar Icon Colour Programmatically

大兔子大兔子 提交于 2019-12-01 09:29:01
How can I set the colour of icons (home and overflow menu icon) in a Toolbar / AppBarLayout programmatically ? I want to change the toolbar's colour scheme for a single fragment in an activity. Setting the AppBarLayout 's background to a light colour (e.g. light gray with appBarLayout.setBackgroundResource(..); ) results in white icons and a white title which are barely visible. Its layout is as follows: <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true"> <android.support

Collapsing AppBarLayout not scrolling with TabLayout and NestedScrollView

家住魔仙堡 提交于 2019-12-01 07:32:21
I have an issue with scrolling Collapsing AppBar, when I am trying to scroll it touching the AppBarLayout part. And also it sometimes scrolling not smoothly. Here is short (1m 30s) video of issue : https://www.youtube.com/watch?v=n32N9Z4S3SA&feature=youtu.be Here is link to simple project (only this issue on github): https://github.com/yozhik/Reviews/tree/master/app/src/main/java/com/ylet/sr/review I'm using: com.android.support:appcompat-v7:27.1.1 There is issue on offsite: https://issuetracker.google.com/issues/37050152 How it is: https://www.youtube.com/watch?v=xWadOVEaTSY&feature=youtu.be

Collapsing AppBarLayout not scrolling with TabLayout and NestedScrollView

廉价感情. 提交于 2019-12-01 04:20:12
问题 I have an issue with scrolling Collapsing AppBar, when I am trying to scroll it touching the AppBarLayout part. And also it sometimes scrolling not smoothly. Here is short (1m 30s) video of issue : https://www.youtube.com/watch?v=n32N9Z4S3SA&feature=youtu.be Here is link to simple project (only this issue on github): https://github.com/yozhik/Reviews/tree/master/app/src/main/java/com/ylet/sr/review I'm using: com.android.support:appcompat-v7:27.1.1 There is issue on offsite: https:/