android-collapsingtoolbarlayout

Android CollapsingToolbarLayout collapse Listener

时光怂恿深爱的人放手 提交于 2019-11-27 09:10:34
问题 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 回答1: I share the full implementation, based on @Frodio Beggins and @Nifhel code: public abstract class

CollapsingToolbarLayout setTitle() does not update unless collapsed

我的梦境 提交于 2019-11-27 08:01:27
With the new Design Library, we're supposed to set the toolbar title on the CollapsingToolbarLayout , not the Toolbar itself(at least when using the collapsing toolbar). But setTitle() only updates the title in the following specific circumstances: 1) When the CollapsingToolbarLayout does not have a title yet 2) At the moment the CollapsingToolbarLayout becomes fully collapsed 3) At the moment the CollapsingToolbarLayout starts to expand What I'm actually trying to do is make the title become an EditText when fully expanded, allowing the user to give his/her character a name, which then

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

偶尔善良 提交于 2019-11-27 05:52:13
问题 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

Add icon with title in CollapsingToolbarLayout

我只是一个虾纸丫 提交于 2019-11-27 05:29:30
问题 I am using CoordinatorLayout to get this effect : Here is the layout code: <?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:id="@+id/coordinatorRootLayout" android:background="@android:color/background_light" android:fitsSystemWindows="true" > <android.support

Android Material Design - How to change background color of Toolbar after CollapsingToolbarLayout is collapsed

天涯浪子 提交于 2019-11-27 05:19:18
问题 After the user scrolls down the screen, the image in the CollapsingToolbarLayout disappears and is left with a toolbar with the back button, content title, and settings menu. I want to know how to change the background color of that toolbar only when its in a 'collapsed' state. The action I am referring to is similar to this where the toolbar background color changes to green: Below the CollapsingToolbarLayout I have a NestedScrollView with CardViews 回答1: I think you're after app:contentScrim

How to avoid CollapsingToolbarLayout not being snapped or being “wobbly” when scrolling?

ε祈祈猫儿з 提交于 2019-11-27 05:07:00
问题 Background Suppose you have an app you've created that has a similar UI as the one you can create via the wizard of "scrolling activity", yet you wish the scrolling flags to have snapping, as such: <android.support.design.widget.CollapsingToolbarLayout ... app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" > The problem As it turns out, on many cases it has issues of snapping. Sometimes the UI doesn't snap to top/bottom, making the CollapsingToolbarLayout stay in between. Sometimes it

Design lib - CoordinatorLayout/CollapsingToolbarLayout with GridView/listView

时光毁灭记忆、已成空白 提交于 2019-11-27 04:29:25
This might be silly question but I didn't understand Design lib well. I am following this reference to create below layout. The Blue area should work as parallax when I scroll the GridView . But when I scroll grid View nothing happens in AppBarLayout. But This works with NestedScrollView and RecyclerView Below is My Layout file- <?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:id="@+id/main_content" android:layout_width="match_parent"

CollapsingToolbarLayout setTitle() does not update unless collapsed

北城余情 提交于 2019-11-27 04:00:12
问题 With the new Design Library, we're supposed to set the toolbar title on the CollapsingToolbarLayout , not the Toolbar itself(at least when using the collapsing toolbar). But setTitle() only updates the title in the following specific circumstances: 1) When the CollapsingToolbarLayout does not have a title yet 2) At the moment the CollapsingToolbarLayout becomes fully collapsed 3) At the moment the CollapsingToolbarLayout starts to expand What I'm actually trying to do is make the title become

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

强颜欢笑 提交于 2019-11-27 03:51:40
问题 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=

Set starting height of CollapsingToolbarLayout

扶醉桌前 提交于 2019-11-27 03:31:51
I want to be able to scroll on the ImageView inside the CollapsingToolbarLayout. So how that would be possible, and How to set a starting height of that Image view? My ImageView height is 280p, at the start of the activity I want to show 200p and then I can scroll down to see the rest of the Image. I have seen something similar in WhatsApp application. Here is a link to see what I want : My code : <?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"