bottom-sheet

How i can set Half Expanded state for my BottomSheet

眉间皱痕 提交于 2020-01-23 07:22:46
问题 I have layout with bottom sheet. <androidx.coordinatorlayout.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"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay

How i can set Half Expanded state for my BottomSheet

孤街醉人 提交于 2020-01-23 07:22:28
问题 I have layout with bottom sheet. <androidx.coordinatorlayout.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"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay

How to include recyclerview in bottomsheet?

拈花ヽ惹草 提交于 2020-01-17 05:46:09
问题 I have a linnear layout at the top of recyclerview. I used nestedscrollview to drag it from bottom. When linear lyout reaches the top scroll behaviour of recyclerview should activated. Top linear should act as toolbar. I want bottom sheet similar to google maps navigation screens bottomsheet. Thanks in advance 回答1: Instead of that you can go with CollapsingToolbarLayout . This will fulfill your requirement. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android

BottomSheet: issue with nested scrolling (RecyclerView & NestedScrollView)

流过昼夜 提交于 2020-01-16 16:48:15
问题 I have a rather complex BottomSheetLayout which layout is as follow The root view of my bottom sheet is a custom FrameLayout that allows to round it's corner (both background and children). Nothing else (nothing touch-related) Then, I use the usual ConstraintLayout in order to layout my Bottom sheet. This ConstraintLayout contains, amongst other views, a vertical RecyclerView : <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match

dx during scrolling with BottomSheetBehavior is zero

痴心易碎 提交于 2020-01-15 03:22:26
问题 I have my custom BottomSheetBehavior: public class CustomBehavior extends BottomSheetBehavior { public CustomBehavior(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, View child, View target, int dx, int dy, int[] consumed) { super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed); } } And I use it in my xml code. <android.support.design.widget.CoordinatorLayout xmlns:android="http:

How do you adjust the height and borderRadius of a BottomSheet in Flutter?

怎甘沉沦 提交于 2020-01-12 18:37:22
问题 I'm probably missing something obvious here, but my BottomSheet only takes up the bottom half the screen, even though the widgets in it take up more space. So now there is scrolling behavior inside the BottomSheet. I'd like to be able to increase the BottomSheet so that the user doesn't have to scroll as much. I also want to add a borderRadius to the top of my BottomSheet, so that it looks more "modal"-y or "tab"-like. Code: void _showBottomSheet(BuildContext context) { showModalBottomSheet

BottomSheetDialog/BottomSheetDialogFragment — which to use and how?

纵饮孤独 提交于 2020-01-10 20:24:23
问题 I'm working on a Material design app. One feature I want to implement is some kind of a poll. When a user clicks an element of a list, the persistent bottom sheet dialog, which looks like this should show up: Then, when user clicks any button, this dialog should go away and the modal bottom sheet dialog should show up, providing a user with more information about the list item which was clicked at the beginning. It looks like this: I can't find any clear explanations about BottomSheetDialog

Android Floating Profile Image Outside Fragment/Activity in XML

我的未来我决定 提交于 2020-01-06 05:17:09
问题 I am trying to build a profile ui such that the user image is just outside/floating on top of the remaining content like in this image. I have used a bottom sheet dialog fragment and created the necessary xml widgets but it doesn't appear like this. How do I stack this type of ui. Here's my xml implementation so far: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap

Persistent Bottom Sheet with rounded corners in Android crashes when used in a card view

∥☆過路亽.° 提交于 2020-01-05 04:57:22
问题 I have created a persistent bottom sheet in android with the intent of displaying a ListView containing additional information about locations. I want the sheet to have rounded corners. I got a ton of results for modal dialog but none for persistent. Is it possible or should I use the modal version? As suggested in an answer here, I tried wrapping it in a card view but the app crashes when I try to open the fragment. <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget

How to tie a BottomSheet at the bottom view of the layout

梦想的初衷 提交于 2020-01-03 19:22:15
问题 Through ConstraintLayout, I am using a BottomSheet to show content of a map detail. My idea is the same used in GoogleMaps, but without the image carousel at the top. I need to find some property to tie the BottomSheet in the bottom, using only the size from its layout, not the whole window, as below: Here is my XML from parent view: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app=