android-coordinatorlayout

Stop CollapsingToolbar from collapsing after NestedScrollView runs out of content to scroll

孤者浪人 提交于 2019-12-31 11:40:32
问题 In Android, how can I get the CollapsingToolbar to stop collapsing if the NestedScrollView runs out of content to scroll? This functionality currently exists in the Contacts app on Android 5.1.1. However, in my code when the NestedScrollView stops scrolling the toolbar continues to collapse leaving gap between the two. <?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

Collapsible Toolbar - Make Fragment Footer Always Visible in Android

谁都会走 提交于 2019-12-30 08:16:51
问题 I am making an app that has a ProfilePage with three fragments - About | Posts | Gallery, and I am using a collapsible toolbar with user's image. My second and third fragment will have a footer that should always be visible, but this is what I get: When my image is expanded the footer disappears. What I want is for my two fragments to have these footers always visible and not depending on toolbar being collapsed or not. My gallery footer should be similar to post footer. profile_layout.xml: <

How to sync scroll of two CoordinatorLayout + AppBarLayout

巧了我就是萌 提交于 2019-12-30 04:33:10
问题 I have an activity with XML. Something like: <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <android.support.design.widget.CoordinatorLayout android:id="@+id/coordinator"

How to enable/disable FloatingActionButton Behavior

巧了我就是萌 提交于 2019-12-30 04:28:48
问题 I am working on app in some fragment i want to hide FloatingActionButtton. When i set android:visibility="gone" . Behavior animation show me FloatingActionButtton when i swipe up and down. is there is any way i can disable/enable FloatingActionButtton behavior. Thank you advance. here is my code QuickReturnFooterBehavior.java package com.app.common; import android.animation.Animator; import android.content.Context; import android.support.design.widget.CoordinatorLayout; import android.support

ArrayIndexOutOfBoundsException while dismissing Snackbar/ViewDragHelper

安稳与你 提交于 2019-12-29 06:47:11
问题 After implementing the new Snackbar in a few of my applications, I am receiving the following error: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(SourceFile:1014) at android.support.design.widget.SwipeDismissBehavior.onInterceptTouchEvent(SourceFile:188) at android.support.design.widget.Snackbar$Behavior.onInterceptTouchEvent(SourceFile:659) at android.support.design.widget.Snackbar$Behavior

Add app bar scrolling view behavior to multiple views in CoordinatorLayout

◇◆丶佛笑我妖孽 提交于 2019-12-29 02:18:14
问题 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.

Coordinatorlayout adjustresize not working

百般思念 提交于 2019-12-28 12:01:10
问题 MY CODE (and more): I have a Coordinator Layout as follows <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapse_toolbar" android:layout_width="match_parent"

How to implement two OnClickListeners on RecyclerView item click?

做~自己de王妃 提交于 2019-12-25 19:02:21
问题 I'm quite confused since I need to use two OnClickListeners for two different needs. I have a Recyclerview which once any item of his, once pressed, needs to change and I've implemented that successfully using OnBindViewHolder.itemView.setOnClickListener Now, I want that very same click to update my BottomAppBar and for that, I added an interface to my ItemHolder class. The issue is that now I once I click, due to the interface (I guess) nothing happens. I know it might be a bit complicated

How to implement two OnClickListeners on RecyclerView item click?

天涯浪子 提交于 2019-12-25 19:01:26
问题 I'm quite confused since I need to use two OnClickListeners for two different needs. I have a Recyclerview which once any item of his, once pressed, needs to change and I've implemented that successfully using OnBindViewHolder.itemView.setOnClickListener Now, I want that very same click to update my BottomAppBar and for that, I added an interface to my ItemHolder class. The issue is that now I once I click, due to the interface (I guess) nothing happens. I know it might be a bit complicated

NestedSCrollView not scrolling fully in CoordinatorLayout

走远了吗. 提交于 2019-12-24 10:12:02
问题 I have a NestedSCrollView inside CoordinatorLayout . In the NestedSCrollView there is a ViewPager . I put a fragment view in it containing WebView . The problem is that if the text in the WebView is very long it gets cut and I can't scroll. How to solve this? <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/nest_scrollview" android:layout_width="match_parent" android