bottom-sheet

Open bottom sheet when sibling scrolling reaches the end?

自古美人都是妖i 提交于 2020-08-22 12:05:13
问题 Is there any way to "forward" scroll events from one scrolling view to my bottom sheet, so that my bottom sheet begins to expand when I over-scroll the first scrolling view? Consider this tiny app: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); int peekHeight = getResources().getDimensionPixelSize(R.dimen.bottom_sheet_peek_height); // 96dp View

Disable dragging of BottomSheetDialogFragment with scrollable children

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-22 05:06:19
问题 Is it possible to disable dragging for a BottomSheetDialogFragment , containing scrollable views such as a ViewPager or a NestedScrollView , such that it can't be dragged neither up nor down but still be dismissed by touching outside and that the children can be dragged anyways? I've looked at all the answers here but I am not pleased since most don't take into account scrollable children or work by forcing the expanded state. The closest is this answer but nonetheless allows dragging the

BottomSheet + ViewPager2 drag to hide not works

自闭症网瘾萝莉.ら 提交于 2020-08-01 04:53:52
问题 I got troubles and I thinks its CoordinatorLayout's fault but not sure. I'm using ViewPager2 inside a ConstraintLayout and I use the CoordinatorLayout like BottomSheet. But when I drag to hide it not works good. I replaced the ViewPager2 by ViewPager and it works well. I hope you can help me. This is my XML file. <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:

bottomSheetDialogFragment full screen

佐手、 提交于 2020-07-31 07:31:28
问题 What I'm trying to achieve is something like Instagram in-app web browser, used when you click an ad: what I did, is I used a WebView bottomSheetDialogFragment, and I override onCreateDialog to get the full screen like this : @Override public Dialog onCreateDialog(Bundle savedInstanceState) { BottomSheetDialog bottomSheetDialog=(BottomSheetDialog)super.onCreateDialog(savedInstanceState); bottomSheetDialog.setOnShowListener(dialog -> { BottomSheetDialog dialogc = (BottomSheetDialog) dialog;

Bottomsheet with edit text moved up by keyboard

断了今生、忘了曾经 提交于 2020-07-29 06:56:22
问题 I have bottomsheet fragment what shows to user answears to his comment. At the bottom of bottom sheet we have edit text, where user can add new comment. So, when soft keyboard opened the bottomsheet staes above keyboard and its top moved far beyond the screen. But bottom sheet should to resize when keyboard is open. Here is my code: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"

animateLayoutChanges=“true” in BottomSheetView showing unexpected behaviour

ε祈祈猫儿з 提交于 2020-07-16 16:32:17
问题 I have a BottomSheetView which has animateLayoutChanges="true" . Initially it shows up fine. But if change the visibility of a view (inside BottomSheetView ) from GONE to VISIBLE , the app messes up calculations and my BottomSheetView moves to the top of the screen. i have tried setting layout_gravity=bottom at the root of the BottomSheetView layout. But no success. Here I have the image of my BottomSheetView before changing the visibility of any view. (Click image for full size) After I

Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module cla

﹥>﹥吖頭↗ 提交于 2020-07-15 11:56:01
问题 I am getting error in the whole class that extends BottomSheetDialogFragment Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module classpath for missing or conflicting dependencies The class is in app module and this module implements two other modules : core and presentation-core build.gradle dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project (':core')

How can I implement BottomSheetDialogFragment with fixed height

这一生的挚爱 提交于 2020-07-06 09:15:18
问题 I need to implement BottomSheetDialogFragment and face with the problem. I need that my BottomSheetDialogFragment has fixed height. Does anyone has an idea how to do it? Here is my xml of fragment content <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="@dimen/bottom_sheet_height" android:background="@android:color/white" android:orientation="vertical"> <TextView android:id="@+id/drag_title" android:layout

Bottom Sheet Above Bottom Navigation

蓝咒 提交于 2020-07-05 10:28:19
问题 My goal is to place a "bottom sheet" on top of a BottomNavigationView like this: But it stays the following way. Both views collapse: This is the xml of my main activity: <?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" android