android-coordinatorlayout

Fix bottom bar in CoordinatorLayout

谁说胖子不能爱 提交于 2019-11-29 22:04:01
I have a CoordinatorLayout which contains AppBarLayout and a FrameLayout which contains fragments. One of this fragment contains a TabLayout at Top, one List trough RecyclerView and at the Bottom one "homemade" toolbar. The AppBarLayout is configured with app:layout_scrollFlags="scroll|enterAlways" My problem is that both "toolbars" are hiding when scroll, the AppBarLayout and my "homemade" toolbar at the bottom. This is the current behaviour I would like to fix the bottom "homemade" toolbar to keep visible but I can't achieve it. This is the XML of the fragment Layout <?xml version="1.0"

Show view when toolbar collapses

风流意气都作罢 提交于 2019-11-29 21:36:57
I have an activity with a CoordinatorLayout , AppBarLayout , CollapsingToolbarLayout and Toolbar . So, basically, a view that collapses when scrolling a RecyclerView . What I need to do is to show a custom view when the view of the expanded layout is hidden due to collapsing. This is my layout: <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="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget

Android alphabetical fast scrollview in RecyclerView with Collapsing toolbar

旧巷老猫 提交于 2019-11-29 21:22:19
In my application I have activity_main.xml like this:- <Coordinator Layout> <AppBarLayout> <CollapsingToolbarLayout> <ImageView/> <Toolbar/> </CollapsingToolbarLayout> </AppBarLayout> <RecyclerView/> </Coordinating Layout> Layout.xml ----->>> <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/theme_background"

How to set app:layout_scrollFlags for Toolbar programmatically

北城以北 提交于 2019-11-29 20:33:59
My app have a viewpager and 4 tabs, each tab have many fragment. But I just want my Toolbar scroll up/down while scrolling recyclerview in 2 specific tabs. But I don't know how to block Toolbar scroll for other tabs. I tried to import toolbar for each fragment but it seems I can't do it. Anyone have idea to solve this problem? ianhanniballake I'd strongly recommend against changing the scrolling flags based on what tab is selected - having the Toolbar automatically return (and the content move down) when scrolling to a non-recyclerview tab can be very jarring and probably not an interaction

CoordinatorLayout custom behavior with AppBarLayout

本小妞迷上赌 提交于 2019-11-29 20:30:33
I am trying to achieve a similar behavior to that of Telegram, on the settings page, that is, there is a CircleImage that when scrolling up goes to the left of the Topbar title, and when scrolling down goes to the middle of the expanded AppBarLayout. I was basing my work on this example: https://github.com/saulmm/CoordinatorBehaviorExample But in this case the original coder is recreating the Topbar twice. I dont want to do that, the default behavior of the topbar is what I need and also I want to take advantage of the hamburger menu and the options menu that come out of the box. This is my

CoordinatorLayout not drawing behind status bar even with windowTranslucentStatus and fitsSystemWindows

坚强是说给别人听的谎言 提交于 2019-11-29 20:27:54
I am trying to draw views behind the status bar like this: I tried to produce this effect with the recommended techniques, but I get this: It's clear from the screenshot that none of my app content is being drawn behind the status bar. What's interesting is that somehow, the Nav Drawer manages to draw behind the status bar: Stuff I did: Use support library widgets - CoordinatorLayout , AppBarLayout , Toolbar , DrawerLayout windowTranslucentStatus set to true in my app theme fitsSystemWindows set to true on my CoordinatorLayout This is my app theme: <style name="AppTheme" parent="Theme

Overlaying content above AppBarLayout using new Material Design

こ雲淡風輕ζ 提交于 2019-11-29 20:26:58
I want to achieve something like that. (not the FAB or the Snackbar). How can i create a layout, overlaying the AppBarLayout? Like this! (For Example) Like Play Store: My AppBarLayout with CoordinatorLayout and NestedScrollView with RelativeLayout as content 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" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/rootLayout" android:layout_width="match_parent" android:layout_height="match_parent"> <android

CoordinatorLayout with RecyclerView And Collapsing header

拟墨画扇 提交于 2019-11-29 19:47:21
I have a layout like the following: (Toolbar, Header View, Text View, RecyclerView) I need the header to be collapsed when I scrolling recyclerview's items. So that the view "Choose item" and recyclerview left on the screen. I saw examples when toolbar is being collapsed, but I need toolbar to be present always. Which layouts/behavior should I use to get this work? Konstantin Loginov You can achieve it by having this layout: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android

Android Material Design profile page [closed]

早过忘川 提交于 2019-11-29 19:37:59
I'm new to android and material design. Could some one please help me point to any websites that help me build a profile screen as below as per Google's material design guidelines? I was about to write a blog on this screen briefing about CoordinatorLayout . Anyways.. You can have my fully working code.: activity_scrolling.xml: <?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.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width=

NestedScrollView + CoodinatorLayout scrollBy() scrollTo() methods do nothing

别说谁变了你拦得住时间么 提交于 2019-11-29 16:16:29
I have a NestedScrollView being used with CoordinatorLayout + AppBarLayout + CollapsingToolbarLayout with parallax effect similar to this tutorial I need to scroll the content programmatically (preferably a smooth scroll, i.e. animated), however calling the scroll methods (scrollBy(), scrollTo(), smoothScrollTo(), smoothScrollBy()) do nothing. Note that I am using app:layout_behavior="@string/appbar_scrolling_view_behavior" <-- Not sure if the issue is related to this. I'm calling nsv_form.smoothScrollBy(0, 300) in Kotlin when a button is clicked by the user, but nothing happens :( (Also tried