bottom-sheet

Show and Hide Bottom Sheet Programmatically

三世轮回 提交于 2020-06-24 05:08:05
问题 I have implemented Bottom Sheet functionality within my activity in onCreate() using this solution and this library sheet = new BottomSheet.Builder(this, R.style.BottomSheet_Dialog) .title("New") .grid() // <-- important part .sheet(R.menu.menu_bottom_sheet) .listener(new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO } }).build(); Now, I would like to Show Bottom sheet, on click of button and in a same way want to hide bottom

Persistent bottom sheet form data

我与影子孤独终老i 提交于 2020-06-17 14:13:15
问题 I have one form on a bottom sheet. It's opened on click of one button. It can be closed when the user clicks outside the form. I want to maintain the form data if the user reopens the form. I don't want to assign each form field value explicitly. Is there any other way of saving the form state and reusing it while creating the bottom sheet again? void _modalBottomSheetMenu(BuildContext context, Widget form) async { await showModalBottomSheet<dynamic>( isDismissible: false, isScrollControlled

Method setHalfExpandedRatio(float ratio)

爷,独闯天下 提交于 2020-05-17 06:44:13
问题 It's my first question in this incredible community. I'm developing an android app in kotlin. I need a permanent bottomsheet (not modal). I have developed all the behavior that I needed, but for one detail. I need to set de STATE_HALF_EXPANDED, by default is 50% of the screen, but I need 70%. I have visited this question: How i can set Half Expanded state for my BottomSheet In that question, the user Adauton Heringer explain how to do it in one of the answers. He said: behavior =

how to settext button in bottom sheet dialog fragment?

时光总嘲笑我的痴心妄想 提交于 2020-05-16 04:19:29
问题 i have one class for bottomsheetdialog fragment.I looked at many places but I'm confused.i want to change text of button in bottom sheet.i get this error 'android.view.View android.view.View.findViewById(int)' on a null object reference. here are my codes; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(final Bundle savedInstanceState) { bottomSheetFragment=new BottomSheetFragment(); View viewDialog=bottomSheetFragment.getView(); assert viewDialog !=

BottomSheet fly away with visibility change

℡╲_俬逩灬. 提交于 2020-05-09 19:40:45
问题 I have a bottom sheet with a NestedScrollView inside (see below). When I press on a FAB button, I want to make some parts in this NestedScrollView invisible. But when I change some linearlayouts visibilities to GONE, bottomsheet fly aways from the top. See here: You can get the whole code from https://github.com/Tanrikut/BottomSheetExample My change visibility method: private void changeVisibility() { subtitleLayout.setVisibility(View.GONE); coordinateLayout.setVisibility(View.GONE);

BottomSheet fly away with visibility change

谁说我不能喝 提交于 2020-05-09 19:38:36
问题 I have a bottom sheet with a NestedScrollView inside (see below). When I press on a FAB button, I want to make some parts in this NestedScrollView invisible. But when I change some linearlayouts visibilities to GONE, bottomsheet fly aways from the top. See here: You can get the whole code from https://github.com/Tanrikut/BottomSheetExample My change visibility method: private void changeVisibility() { subtitleLayout.setVisibility(View.GONE); coordinateLayout.setVisibility(View.GONE);

Bottom Sheet Fragment causes error when called the second time

家住魔仙堡 提交于 2020-03-02 00:29:29
问题 I have a class BottomSheetFragment extends BottomSheetDialogFragment , which contains sub-fragments, and I call it from a fragment. The problem is that when I call it the second time, my app crashes with Binary XML file line #69: Duplicate id 0x7f090071, tag null, or parent id 0xffffffff with another fragment error. Bottom sheet class: public class BottomSheetFragment extends BottomSheetDialogFragment { public BottomSheetFragment() { // Required empty public constructor } @Override public

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

Angular-material - animation and position is not displaying correct

岁酱吖の 提交于 2020-01-25 12:54:26
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom

Angular-material - animation and position is not displaying correct

故事扮演 提交于 2020-01-25 12:53:20
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom