android-collapsingtoolbarlayout

Using windowTranslucentStatus with CollapsingToolbarLayout

落花浮王杯 提交于 2019-11-28 20:11:59
I'm trying to get a similar effect to what is seen on google play. I've got the below layout to show a transparent toolbar with an image behind it. When the user scrolls there is a parallax effect on the imageview as it scrolls off the screen. The toolbar returns when ever the user scrolls up, with the imageview only returning when the user gets to the lop of the list. This all works great. <android.support.design.widget.CoordinatorLayout android:id="@+id/main" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width=

CollapsingToolbarLayout | Scrolling and layout issues 2

谁说胖子不能爱 提交于 2019-11-28 17:58:52
问题 Related Questions CollapsingToolbarLayout | Scrolling and layout issues Backgroud I want to use 2 different fragments that will allow me to change the layout based on orientation and screen size Header Image (Currently just an ImageView ) Scrollable content Issues The CollapsingToolbarLayout does not allow me to expand the Toolbar to see the full Header Image It shows a majority of the image, but not all. Top is cut, but the bottom is visible. The Toolbar is set to Pin but it is hidden when

Show view when toolbar collapses

[亡魂溺海] 提交于 2019-11-28 17:22:36
问题 I have an activity with a CoordinatorLayout , AppBarLayout , CollapsingToolbarLayout and Toolbar . So, basically, a view that collapses when scrolling a RecyclerView . What I need to do is to show a custom view when the view of the expanded layout is hidden due to collapsing. 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:layout_width="match_parent"

CollapsingToolbarLayout with a custom view

二次信任 提交于 2019-11-28 16:02:50
问题 I'm trying to implement the CollapsingToolbarLayout with a custom view, but I'm unable to do it : What I want to do (sorry I can't post images so it's on imgur) : Expanded, the header is a profile screen with image and title Not expanded (on scroll), the image and title will be on the toolbar But everything I saw wasn't working as I expected I'm new to this and lollipop animations so if someone could help me I'll be very grateful ! (I don't post sample code because I don't have something

Android CollapsingToolbarLayout Title background

妖精的绣舞 提交于 2019-11-28 15:58:27
I'm working with the CollapsingToolbarLayout from the new Android Design Support Library. I have set its title and it is working fine, the only problem I still have is that when you scroll, the text is lost, depending on the image in the background. What I'd like to do, is set a background to the CollapsingToolbarLayout title, but I haven't find a way to do it. Is there anyway to achieve this? Thanks! Layout: <android.support.design.widget.CoordinatorLayout android:id="@+id/main_content" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res

How to disable scrolling of NestedScrollView&CollapsingToolbarLayout, for example when there is no more content below?

青春壹個敷衍的年華 提交于 2019-11-28 15:38:24
Background I try to add the same functionality as shown on many apps, where the upper area of the screen shrinks&expands according to the scrolled content. For this, I use Google's design library, as shown on the CheeseSquare sample . The problem Thing is, no matter how much content there is in the NestedScrollView , it lets me scroll way below the last view of the content, just to let me see the final state of the actionbar, having the minimal size of itself. In short, this is what I see when scrolling to the bottom (modified content of CheeseSquare sample): while this is what I'd like to

Android CollapsingToolbarLayout collapse Listener

梦想的初衷 提交于 2019-11-28 15:27:05
I am using CollapsingToolBarLayout alongside with AppBarLayout and CoordinatorLayout , and they are working Fine altogether. I set my Toolbar to be fixed when I scroll up, I want to know if there is a way to change the title text of the Toolbar, when CollapsingToolBarLayout it is collapsed. Wrapping up, I want two different titles when scrolled and when expanded . Thank you all in advance I share the full implementation, based on @Frodio Beggins and @Nifhel code: public abstract class AppBarStateChangeListener implements AppBarLayout.OnOffsetChangedListener { public enum State { EXPANDED,

Add app bar scrolling view behavior to multiple views in CoordinatorLayout

与世无争的帅哥 提交于 2019-11-28 15:08:28
I am looking to add scroll support to more than just a single, scrollable, child view of CoordinatorLayout in conjunction with an AppBarLayout and CollapsingToolbarLayout . When scrolling the RecyclerView or the AppBarLayout (condensed code below), the app bar and its contents successfully scroll and collapse. However, when attempting to initiate a scroll event on the LinearLayout above the RecyclerView , nothing happens because the LinearLayout does not know to scroll or collapse the view. The goal is to have the LinearLayout act as a sticky header to the RecyclerView and footer to the

How to disable CollapsingToolbar's collapse when scroll has not content?

删除回忆录丶 提交于 2019-11-28 10:52:13
I am using android support design 'com.android.support:design:22.2.1' my problem is that when the scroll has no content in it, the collapsing toolbar still enables the collapse action. I need to remove the collapsing of the view if the scroll has no content in it. My 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 android:id="@

How to add a gradient to a ImageView nested in a CollapsingToolbar

谁说胖子不能爱 提交于 2019-11-28 10:00:07
I'am working on an Android app with material design. I have a detail view with a CollapsingToolbarLayout and a ImageView (works fine so far). Unfortunately the title is not readable if there is a bright image. So far I tried to add a gradient ( Add gradient to imageview ) but this solution didn't work for me because of the CollapsingToolbarLayout. Here you can see my code: <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