android-coordinatorlayout

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

ⅰ亾dé卋堺 提交于 2019-12-18 12:35:04
问题 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

Scrolling with Collapsing Toolbar and Tabs

人盡茶涼 提交于 2019-12-18 11:56:57
问题 I'm trying to make a layout with a CollapsingToolbarLayout which has scroll|exitUntilCollapsed flag, and a TabLayout which has scroll|enterAlways scrollFlag property. Basically I want my toolbar to be pinned and show and hide the tabs while scrolling. I've modified the cheesesquare app from https://github.com/chrisbanes/cheesesquare. Here is my layout xml; <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res

Coordinator layout custom layout behavior never getting called

随声附和 提交于 2019-12-17 22:38:26
问题 Firstly, I'd like to preface this with my lack of knowledge about the coordinator layout. I'm merely following tutorials I found online and am curious why my behavior isn't working. Does the child view inside of coordinator layout have to be app bar layout? Or are you able to put any view inside there. Also, when I define the res-auto namespace it doesn't give me the option for layout_behavior. Usually android studio will auto-complete if a function is available and it didn't. Although, if I

Coordinator layout custom layout behavior never getting called

北慕城南 提交于 2019-12-17 22:28:25
问题 Firstly, I'd like to preface this with my lack of knowledge about the coordinator layout. I'm merely following tutorials I found online and am curious why my behavior isn't working. Does the child view inside of coordinator layout have to be app bar layout? Or are you able to put any view inside there. Also, when I define the res-auto namespace it doesn't give me the option for layout_behavior. Usually android studio will auto-complete if a function is available and it didn't. Although, if I

Scroll behavior in nested RecyclerView with horizontal scroll

喜你入骨 提交于 2019-12-17 22:27:00
问题 I have to create vertical RecyclerView with nested horizontal RecyclerView in every item. Everything is within CoordinatorLayout . When I scroll by tapping outside nested RecyclerView toolbar hides, but when I scroll parent Recycler by tapping on nested one toolbar stays. Any help would be appreciated. Here is my xml layouts: main_activity.xml: <android.support.design.widget.CoordinatorLayout ...> <FrameLayout android:id="@+id/fragment_frame" ... android:fitsSystemWindows="true" app:layout

Where should 'app:layout_behavior' be set?

荒凉一梦 提交于 2019-12-17 21:52:17
问题 Should it be set at the AppBarLayout sibling's parent or at the first Scrollable View inside its sibling? With Material Design for Android, there are Views that let us work with the behavior of the layout depending on its surroundings, one of them is the CoordinatorLayout, as this CodePath guide mentions: CoordinatorLayout extends the ability to accomplish many of the Google's Material Design scrolling effects. Currently, there are several ways provided in this framework that allow it to work

Toolbar in AppBarLayout is scrollable although RecyclerView has not enough content to scroll

a 夏天 提交于 2019-12-17 21:43:24
问题 Is it really intended that the Toolbar in a AppBarLayout is scrollable although the main container with the "appbar_scrolling_view_behavior" has not enough content to really scroll? What I have tested so far: When I use a NestedScrollView (with "wrap_content" attribute) as main container and a TextView as child, the AppBarLayout works properly and does not scroll. However, when I use a RecyclerView with only a few entries and the "wrap_content" attribute (so that there is no need to scroll),

Content behind CoordinatorLayout AppBarLayout

a 夏天 提交于 2019-12-17 19:17:31
问题 I was creating a settings activity/layout for my app. I have a CoordinatorLayout with an AppBarLayout and Toolbar , then beneath that it includes content_settings.xml . When the content loads the .xml file is behind the app bar. I'm using this same setup to load the main content and it works fine, but for some reason isn't rendering correctly within the Settings section. activity_settings.xml <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height

Failed to find style 'coordinatorLayoutStyle' in current theme

孤街醉人 提交于 2019-12-17 02:44:15
问题 I'm using the latest version of android studio (3.0), along with latest build tools (27) and similar API level. The layout does not get rendered in the design tab and it's causing a lot of trouble especially that I'm using coordinator layout. How do I get around this problem? 回答1: I solved this rendering problem by simply inserting this line into the application theme (the app theme is usually placed in styles.xml ). [ SDK 28 ] <style name="AppTheme"> <item name="coordinatorLayoutStyle">

ToolbarAlphaScrollBehavior CoordinatorLayout

这一生的挚爱 提交于 2019-12-13 20:17:40
问题 Hi I've been following this link to accomplish the opacity effect on the toolbar My Layout File : <?xml version="1.0" encoding="utf-8"?> <layout> <android.support.design.widget.CoordinatorLayout android:id="@+id/coordinator_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".ProductDetailActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="?attr