android-collapsingtoolbarlayout

Android Toolbar collapseMode issue

烂漫一生 提交于 2019-11-27 02:54:09
问题 I have an Issue making " toolbar with Title text " Not to Collapse while scrolling upwards in CollapsingToolbarLayout. I have tried a few tweaks, by using app:layout_collapseMode="none" as attribute in my android.support.v7.widget.Toolbar but its not working. Maybe there is a problem with my layout. Below is what i am trying to achieve. But when i scroll to the top, the Toolbar also collapse, and the tabBar also scrolls inside, and become non-visible. below is what i have now. This is my

webview height grows indefinitely inside a nestedScrollView

╄→尐↘猪︶ㄣ 提交于 2019-11-27 02:53:30
问题 This is my layout. When i load google.com, the webview's height keeps growing indefinitely. The onSizeChange function of the webview keeps getting called and i can see the webview keeps expanding indefinitely. I've tried 22.2.1 and 23.1.0 of the design and appcompat libraries and no effect. Any solution ? :-| <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=

Show CollapsingToolbarLayout Title ONLY when collapsed

放肆的年华 提交于 2019-11-26 23:48:42
问题 the title says it all. I've tried setExpandedTitleColor and setCollapsedTitleColor (switching to and from transparent) with no luck. I can't see any built in methods that'll do what I'm looking for, either. I only want to show the title when the CollapsingToolbarLayout is fully collapsed, otherwise, I need it hidden. Any hints? 回答1: You can add OnOffsetChangedListener to AppBarLayout to determine when CollapsingToolbarLayout is collapsed or expanded and set it's title. final

Overlap scrolling view with AppBarLayout

百般思念 提交于 2019-11-26 23:15:27
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.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="match

How can i determine that CollapsingToolbar is collapsed?

ぐ巨炮叔叔 提交于 2019-11-26 22:41:26
问题 I need to know when CollapsingToolbar from material design library is collapsed. 回答1: UPDATE : Since support versions of 23.1.1+ the issue is no longer there, no need to use the listener and disable the swipe refresh layout, it will work as it should (link). Implement AppBarLayout.OnOffsetChangedListener listener on your AppBarLayout AppBarLayout appBarLayout = (AppBarLayout) view.findViewById(R.id.app_bar_layout); appBarLayout.addOnOffsetChangedListener(this); And check if offset is 0,

Prevent CollapsingToolbarLayout collapse if not needed

回眸只為那壹抹淺笑 提交于 2019-11-26 19:58:40
问题 Using: compile 'com.android.support:design:23.0.0' compile 'com.android.support:appcompat-v7:23.0.0' compile 'com.android.support:cardview-v7:23.0.0' compile 'com.android.support:recyclerview-v7:23.0.0' With the project Cheesesquare updated. Into the detail of cheese, I remove 2 cards (to have only one). Is there a way to prevent the collapsing of the toolbar that show a blank space? 回答1: To implement such behaviour in Cheesesquare example just modify android:layout_height param of the

Android: CollapsingToolbarLayout and SwipeRefreshLayout get stuck

半腔热情 提交于 2019-11-26 19:31:17
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="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget

How to change CollapsingToolbarLayout typeface and size?

左心房为你撑大大i 提交于 2019-11-26 18:49:27
问题 I want to change CollapsingToolbarLayout font size and its typeface. How I can achieve that? 回答1: Update Before we dive into the code let's first decide the textSize for our CollapsingToolbarLayout . Google published a website called material.io , this website also explains the best way on how to deal with Typography. The article mentioned about "Heading" category which also explains the recommended font size to use in sp . Although the article never mentioned the recommended

How to mimic Google Maps' bottom-sheet 3 phases behavior?

点点圈 提交于 2019-11-26 18:43:03
问题 Background I'm assigned to make a UI that behaves similar to how Google Maps shows a bottom-sheet for a found result. It has three different phases: Bottom content. The upper area is still touchable and won't scroll anything at the bottom Full screen content, while the upper area has a large header. Full screen content, while the upper area has just the toolbar. Here's what I'm talking about on Google Maps: The problem Thing is, the bottom sheet isn't a part of the design library yet (though

How to disable scrolling of AppBarLayout in CoordinatorLayout?

喜欢而已 提交于 2019-11-26 15:59:42
问题 I have MapFragment with parallax effect inside AppBarLayout : I want to disable scrolling on AppBarLayout , because it is not possible to move across map, since touch evenys on the map are always handled as scroll events. I would like to handle collapsing of AppBarLayout by scrolling RecyclerView only, which is on the bottom of the screen. This is my xml: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match