android-coordinatorlayout

Programmatically expand/collapse Bottom Navigation View in CoordinatorLayout

拜拜、爱过 提交于 2020-05-31 06:03:09
问题 I have a CoordinatorLayout that contains a BottomNavigationView and an AppBarLayout with a ToolBar inside of it. (The BottomNavigationView is not inside the AppBarLayout , as doing it breaks the position of the BottomNavigationView ). I need to show/hide the AppBarLayout and the BottomNavigationView programmatically, when certain events happen (e.g. on a fragment's onResume ), and so far I've managed setting appBarLayout.setExpanded(true, true) in order to show/hide the AppBar, but I can't

Part of the content of a CollapsingToolbarLayout is getting sticky on top, when used with viewpager and recyclerview

社会主义新天地 提交于 2020-05-23 04:31:45
问题 I am trying to implement a layout like this: The issue is that when scrolling up the card touches the toolbar and it does not go up anymore like this: I want it to scroll up till the viewpager to fills the screen ie, at least the rectangle card, should scroll up beyond the toolbar(Even the tabLayout can also scroll up). But I don't want it to stay sticky at the top. The main layout is here: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns

Bottom Navigation with fab

纵饮孤独 提交于 2020-03-13 04:32:25
问题 I am currently working with BottomNavigationView and FloatingActionButton . What i want to achieve is this below design: And what i have tried: <?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="match_parent" android:layout_height="match_parent" app:layout_insetEdge="bottom"

Bottom Navigation with fab

自作多情 提交于 2020-03-13 04:32:18
问题 I am currently working with BottomNavigationView and FloatingActionButton . What i want to achieve is this below design: And what i have tried: <?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="match_parent" android:layout_height="match_parent" app:layout_insetEdge="bottom"

Removing the extra top space in CoordinatorLayout- Android

你说的曾经没有我的故事 提交于 2020-02-03 05:11:10
问题 I am trying to use BottomSheetBehavior to make a layout similar to what google maps is providing. I am successful in using the BottomSheetBehavior and create slide up layout. The problem I am having now is CordinatorLayout takes extra space even when my layout is collapsed. Below is a screenshot of my layout. White background in my main activity layout Pink is my collapsed layout with peekHeight And the grey background is the one which should be transparent but takes the extra space. My main

CoordinatorLayout, FAB and container layout conflict

大城市里の小女人 提交于 2020-01-23 02:05:47
问题 I have a main activity with a drawer that have a container layout where I replace each fragment with FragmentManager . I want to add a FAB to one of my child fragments that hide/show on scroll but Im not sure what Im doing wrong and get: Layout: <?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" android:layout_width="match_parent" android:layout

SwipeRefreshLayout overlaps BottomAppbar

让人想犯罪 __ 提交于 2020-01-16 10:12:50
问题 I feel like I've tried everything to resolve this but I can't figure out how to have a Coordinatorlayout containing an bottom app bar and a constraintlayout that contains a swipe refreshlayout without the refresh layout overlapping the bottom app bar. <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.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

SwipeRefreshLayout overlaps BottomAppbar

最后都变了- 提交于 2020-01-16 10:12:11
问题 I feel like I've tried everything to resolve this but I can't figure out how to have a Coordinatorlayout containing an bottom app bar and a constraintlayout that contains a swipe refreshlayout without the refresh layout overlapping the bottom app bar. <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.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

RecyclerView drawing offscreen, can't scroll bottom item into view

狂风中的少年 提交于 2020-01-13 10:15:10
问题 Using Design Support Library 22.2.1, with the following View hierarchy: <DrawerLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Toolbar android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <TabLayout android:layout_width

CoordinatorLayout with multiple snapping points

落爺英雄遲暮 提交于 2020-01-10 11:36:31
问题 Here I've got quite a complex animation that may be resolved (I believe) in a simple way using the CoordinatorLayout. It has 3 states: Initial (left screen) - Header view is shown fully (orange background): Toolbar, grey roundrect (it's actually a photo there) plus some other views below (TextViews, RatingBar etc) Scrolling the content up (middle screen) - roundrect is zooming up with a changing green foreground alpha level over it, so it becomes green while scrolling (well, it is not obvious