coordinator-layout

CoordinatorLayout layout_anchor does not work

主宰稳场 提交于 2019-12-01 02:44:49
I just tried out the new Support Design Library with CoordinatorLayout, but I'm having problems anchoring child views. My layout currently looks like this: <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/coordinator_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style

CoordinatorLayout layout_anchor does not work

无人久伴 提交于 2019-11-30 22:34:56
问题 I just tried out the new Support Design Library with CoordinatorLayout, but I'm having problems anchoring child views. My layout currently looks like this: <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/coordinator_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar"

NestedScrolling with NestedScrollView, RecyclerView (Horizontal), inside a CoordinatorLayout

天涯浪子 提交于 2019-11-30 11:38:52
I have a UI design with CollapsingToolbarLayout, like following. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/detail_backdrop_height" android:fitsSystemWindows="true" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:expandedTitleMarginEnd="64dp" app

CollapsingToolbarLayout and hide toolbar while scrolling

自作多情 提交于 2019-11-30 11:27:05
问题 I am trying to create some combined layout using CoordinatorLayout and also CollapsingToolbarLayout. In the first state, when we on the most top page, and didn't scrolled yet, I want the toolbar to expend as shown below (yes, i did it): In the second state, when starting to scroll down, the image and toolbar should disappear, as shown below (only tab will show): And in the last state once I am at some point in the list (but not the top of the list) I want to start scrolling up, once I start

Android: CoordinatorLayout and SwipeRefreshLayout

主宰稳场 提交于 2019-11-30 06:17:28
问题 I try to implement auto hiding toolbar feature from the new support library 22.2.0. Without SwipeRefreshLayout is working fine: But when I re add this layout, toolbar overlap the recyclerview: Code: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget.CoordinatorLayout xmlns

Android, DrawerLayout + Fragments + CollapsingToolbarLayout

大城市里の小女人 提交于 2019-11-30 05:18:51
Is it possible to have a CoordinatorLayout / CollapsingToolbarLayout in the fragments shown in the main container of a DrawerLayout? An answer to another question suggests that each fragment could have its own Toolbar. But this doesn't work well with the ActionBarDrawerToggle as it requires a Toolbar to link to the open/close drawer behaviour. Has anybody achieved this, or do you have pointers about this? Thanks. EDIT : I've been focusing some efforts in putting a single Toolbar in the DrawerLayout , meant to stay there all the time, but was not able to get it to scroll (on a Nexus5 API 22).

Android CoordinatorLayout + AppbarLayout + Viewpager always scrolling

我只是一个虾纸丫 提交于 2019-11-30 04:31:37
I have a classic layout with a ToolBar on the top, a TabLayout below it, and a ViewPager switching tabs from the TabLayout. When content in the ViewPager is scrollable, the ToolBar should scroll out of sight, and the TabLayout should follow and stick when it reaches the top. All this is good in my current code, except, the ToolBar is always scrollable, regardless of the size of the ViewPager's content. See my code below. Any brilliant ideas on how to fix this? <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk

Click not working on RecyclerView in CoordinatorLayout when scrolling

♀尐吖头ヾ 提交于 2019-11-30 03:46:25
I am facing a strange behaviour with a RecyclerView as a second child of CoordinatorLayout, just after an AppBarLayout (as described in a lot of examples). My problem is when I scroll the recycler view and I want to click on a particular item. Sometimes I need to click 2 times to select that item, it seems to be linked to the fling behaviour. For example, if I scrolled to the bottom of the recycler view, then if I fling my finger from the bottom of the screen to the top (in order to see more data, but in my case I can't see more data since I am already to the bottom) and then quickly click on

ConstraintLayout vs Coordinator layout?

℡╲_俬逩灬. 提交于 2019-11-29 22:07:12
What to implement: ConstraintLayout or CoordinatorLayout for proper material design in android ? CoordinatorLayout is intended to be the top-level layout for activity to manage the Behaviors e.g. interactions and animations. ConstraintLayout 's main goal is to provide a convenient way to create a flat layout with multiple children (much more powerful RelativeLayout). So the CoordinatorLayout is to manage the complex behavior (especially animations) of your activity's components, and ConstraintLayout for components proper placement (especially list items). CoordinatorLayout CoordinatorLayout is

Toolbar will not collapse with Scrollview as child of CoordinatorLayout

旧街凉风 提交于 2019-11-29 22:02:25
I am trying to follow the Google Docs on using the CoordinatorLayout but i am having an issue with the ScrollView inside the CoordinatorLayout. Basically, the Toolbar normally would collapse with a RecyclerView or a Listview when scrolling down. Now with a ScrollView it will not collapse. <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" > <TextView android:id="@+id/tv_View"