android-appbarlayout

CollapsingToolbarLayout with a ViewPager

和自甴很熟 提交于 2019-11-30 20:33:21
I'm trying to use the CollapsingToolbarLayout to have a collapsible toolbar with a ViewPager that fades away while scrolling up but I seem to lose the ability to scroll up if the ViewPager is present. The ViewPager is supposed to show multiple images in the Toolbar. Here's the XML: <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

Stop AppBarLayout scrolling off screen when NestedScrollView is empty

耗尽温柔 提交于 2019-11-30 08:30:56
I have a fairly typical List functionality using a CoordinatorLayout, AppBarLayout, SwipeRefreshLayout and RecyclerView - When the RecyclerView has enough content to scroll, the page seems fine. When the RecyclerView is empty or doesn't have enough content to scroll however, the behavior is that the AppBarLayout children with app:layout_scrollFlags="scroll|enterAlwaysCollapsed" will continue to scroll - which looks odd. Is there a way to stop the AppBarLayout children scrolling when the NestedScrollView is empty? <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas

Smooth scroll and Fling with NestedScrollView,AppBarLayout and CoordinatorLayout

别说谁变了你拦得住时间么 提交于 2019-11-30 08:17:27
I am working on an application where I'm using AppBarLayout with CollapsingToolbarLayout and NestedScrollView. I have successfully implemented this and it is working fine. Now what i am trying to do is, that on fling(fast swipe up) on the Nestedscrollview it should scroll completely to top. Similarly, on fling(fast swipe down) towards the bottom of the screen, it must scroll all the way to the bottom smoothly. However now, it only gets stuck in between which makes it look ugly. I have tried many available solutions available here but nothing worked for me. My current setup is below. <android

How to show Toolbar's logo, icon, title, subtitle when wrapped in a CollapsingToolbarLayout?

断了今生、忘了曾经 提交于 2019-11-30 07:29:26
After Android Support Design Library was released, I wanted to implement an effect like a page of Twitter Profile , in which Toolbar 's title and subtitle could be changed as screen scrolled vertically. So I tried to use CoordinatorLayout , AppBarLayout , CollapsingToolbarLayout and Toolbar from Android Support Design Library to achieve this effect. Everything worked as expected except that Toolbar 's content couldn't be showed or changed as I wanted. I should have been wanting to display collapseIcon , navigationIcon , title , subtitle of Toolbar , but they didn't show up even though I had

Prevent RecyclerView from scrolling under AppBarLayout before AppBarLayout is collapsed

牧云@^-^@ 提交于 2019-11-30 05:19:54
问题 I'm creating a RecyclerView with header where the header collapses as you scroll up the RecyclerView . I can achieve this very closely with the layout below, with a transparent AppBarLayout , and MyCoolView which is the header. The parallax effect works great. However, if the header is still visible and I fling the RecyclerView , the RV scrolls slowly to the top and some of the items are under the Toolbar until the RV reaches the top of the view. I've been playing around with the scrollFlags

Recyclerviews and SwipeRefreshLayout using support library 23.2.0

浪子不回头ぞ 提交于 2019-11-30 04:54:02
问题 Has anyone figured out a way to get recyclerviews, AppbarLayouts and SwipeRefreshLayout to work together on 23.2 yet? I am using a pretty standard method I think, but the swiperefreshlayout keeps grabbing the scroll gesture when trying to move up the recyclerview. <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent"

CollapsingToolbarLayout with a ViewPager

淺唱寂寞╮ 提交于 2019-11-30 04:39:06
问题 I'm trying to use the CollapsingToolbarLayout to have a collapsible toolbar with a ViewPager that fades away while scrolling up but I seem to lose the ability to scroll up if the ViewPager is present. The ViewPager is supposed to show multiple images in the Toolbar. Here's the XML: <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

Nested RecyclerView in ViewHolder breaks Collapsing Toolbar Layout

荒凉一梦 提交于 2019-11-30 04:07:14
问题 I have a vertical RecyclerView hosted in a CoordinatorLayout featuring a collapsing toolbar layout. The ViewHolder for this RecyclerView contains yet another RecyclerView with a GridLayoutManager. The reason for this nesting is that the inner RecyclerView displays a collection of pictures that can have anywhere between 1 - 20 pictures. I don't know how many pictures there will be, but the span of the Grid must always be 3. Every time I bind the ViewHolder I adjust the layout params of the

AppBarLayout and CollapsingToolbarLayout not able to contain Button?

試著忘記壹切 提交于 2019-11-29 23:27:42
问题 I am working with this following Repository here: CheeseSquare Repo via Chris Banes Overall it is good repository but lacks complex layout schemes. I want to achieve something like this: Where the "DO SOMETHING" button is contained inside AppBarLayout and nested inside CollapsingToolbarLayout , and it collapses as you scroll up. That is my original thought, but it doesn't seem to give me the behavior I am looking for. This is what my XML Layout looks like: <android.support.design.widget

CoordinatorLayout custom behavior with AppBarLayout

本小妞迷上赌 提交于 2019-11-29 20:30:33
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 want to take advantage of the hamburger menu and the options menu that come out of the box. This is my