android-collapsingtoolbarlayout

Android CollapsingToolbarLayout with custom View

落爺英雄遲暮 提交于 2019-11-26 15:26:19
问题 I'm following the Cheesesquare example project to understand the new design material library. I'm wondering if there's a way to use a custom view (like Telegram) with ImageView, title and subtitle instead of the simple Title provided by CollapsingToolbarLayout widget. Thanks. 回答1: I had the same problem and spend many hours trying to find a solution. My solution was to add the collapsing Views (ImageView and TextView) inside the CollapsingToolbarLayout and then handle the transition in code.

Design lib - CoordinatorLayout/CollapsingToolbarLayout with GridView/listView

帅比萌擦擦* 提交于 2019-11-26 11:12:16
问题 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=\

Set starting height of CollapsingToolbarLayout

孤街浪徒 提交于 2019-11-26 10:29:31
问题 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

Overlap scrolling view with AppBarLayout

三世轮回 提交于 2019-11-26 08:57:37
问题 I want to implement the \'Flexible Space with overlapping content\' pattern from the Material design scrolling techniques, such as in this video: My XML layout right now looks like: <android.support.design.widget.CoordinatorLayout android:layout_width=\"match_parent\" android:layout_height=\"match_parent\"> <android.support.design.widget.AppBarLayout android:layout_width=\"match_parent\" android:layout_height=\"192dp\" android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"> <android

Android: CollapsingToolbarLayout and SwipeRefreshLayout get stuck

好久不见. 提交于 2019-11-26 06:59:05
问题 I use CollapsingToolbarLayout, RecyclerView and SwipeRefreshLayout together: Xml: <android.support.v4.widget.DrawerLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" xmlns:app=\"http://schemas.android.com/apk/res-auto\" android:id=\"@+id/drawer_layout\" android:layout_width=\"match_parent\" android:layout_height=\"match_parent\" android:fitsSystemWindows=\"true\"> <android.support.design.widget.CoordinatorLayout android:id=\"@+id/coordinator_layout\" android:layout_width=\

Programmatically collapse or expand CollapsingToolbarLayout

↘锁芯ラ 提交于 2019-11-26 06:04:46
问题 Simple question, but I can\'t find an answer. How can I collapse or expand the CollapsingToolbarLayout programmatically? ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 回答1: Using Support Library v23, you can call appBarLayout.setExpanded(true/false) . Further reading: AppBarLayout.setExpanded(boolean) 回答2: I use this code for collapsing toolbar. Still cannot find a way to expand it. public void collapseToolbar(){ CoordinatorLayout.LayoutParams params =