bottom-sheet

Angular - Open Bottom Sheet (MatBottomSheet) inside parent container

孤街醉人 提交于 2021-02-19 02:53:41
问题 I'm trying to open a material bottom sheet inside a div container, as default it's opening as the last element inside the body. Looking at the documentation, I need to use the viewContainerRef , but I can't make it work. This is similiar to what I'm trying to do: app.component.html: ... <div #container></div> ... app.component.ts: export class AppComponent implements AfterViewInit { @ViewChild('container', { read: ViewContainerRef }) _container; ... constructor( private bottomSheet:

Angular - Open Bottom Sheet (MatBottomSheet) inside parent container

*爱你&永不变心* 提交于 2021-02-19 02:53:09
问题 I'm trying to open a material bottom sheet inside a div container, as default it's opening as the last element inside the body. Looking at the documentation, I need to use the viewContainerRef , but I can't make it work. This is similiar to what I'm trying to do: app.component.html: ... <div #container></div> ... app.component.ts: export class AppComponent implements AfterViewInit { @ViewChild('container', { read: ViewContainerRef }) _container; ... constructor( private bottomSheet:

BottomSheet sliding very slowly

▼魔方 西西 提交于 2021-02-11 18:19:28
问题 Hello , i want to change a view's padding according to bottomSheet's slideOffset. But when i tried to change view's padding on BoottomSheetBehaviour Callback, BottomSheet sliding speed goes slow down. here is my code: View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet); behavior = BottomSheetBehavior.from(bottomSheet); behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) {

BottomSheet sliding very slowly

前提是你 提交于 2021-02-11 18:19:23
问题 Hello , i want to change a view's padding according to bottomSheet's slideOffset. But when i tried to change view's padding on BoottomSheetBehaviour Callback, BottomSheet sliding speed goes slow down. here is my code: View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet); behavior = BottomSheetBehavior.from(bottomSheet); behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) {

BottomSheetDialogFragment disable animation when returning from background

喜夏-厌秋 提交于 2021-02-07 09:49:52
问题 Got a class that extends BottomSheetDialogFragment When I set the dialog to show, the slide from bottom animation occurs and the dialog is shown. Now, If I set the app to background and then bring it back to the foreground, the dialog that was already showing does the same slide in animation. How can I disable this, that is, if the dialog is already showing, sending the app to background and then foreground does not start the animation? Showing the dialog like this: dialog = MyDialogFragment(

Allow BottomSheet to slide up after threshold is reached on an area outside

谁说我不能喝 提交于 2021-01-29 07:52:10
问题 I am trying to replicate a behavior that the current Google Maps has which allows the bottom sheet to be revealed when sliding up from the bottom bar. Notice in the recording below that I first tap on one of the buttons at the bottom bar and then slide up, which in turn reveals the sheet behind it. I cannot find anywhere explained how something like this can be achieved. I tried exploring the BottomSheetBehavior and customizing it, but nowhere I can find a way to track the initial tap and

How can I add a shadow to bottom sheet view?

▼魔方 西西 提交于 2020-12-27 08:24:25
问题 As of now, with the official bottom sheet component from the Android design library implemented the top edge doesn't show a shadow. But for what I've seen in various mockups and in the Material Design specs, the bottom sheet include a discrete shadow of some sort. I think the shadow would help distant the bottom sheet from the main layout, especially if there's a peek value set and/or the bottom sheet is always visible. Otherwise it just will blend together with the main layout and its items.

How can I add a shadow to bottom sheet view?

让人想犯罪 __ 提交于 2020-12-27 08:20:08
问题 As of now, with the official bottom sheet component from the Android design library implemented the top edge doesn't show a shadow. But for what I've seen in various mockups and in the Material Design specs, the bottom sheet include a discrete shadow of some sort. I think the shadow would help distant the bottom sheet from the main layout, especially if there's a peek value set and/or the bottom sheet is always visible. Otherwise it just will blend together with the main layout and its items.

Share Viewmodel between BottomSheetDialogFragment with normal Fragment not working (observe function not trigger)

∥☆過路亽.° 提交于 2020-12-05 12:15:19
问题 I want to share the same Viewmodel between my base fragment along with opened BottomSheetDialogFragment So this is how i observe to same viewmodel between these two fragment. BottomSheetDialogFragment public class TasteFilterBottomDialogFragment extends BottomSheetDialogFragment { private FilterTasteListViewModel filterTasteListViewModel; @Inject ViewModelProvider.Factory viewModelFactory; @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated

BottomSheetDialog background blinking

|▌冷眼眸甩不掉的悲伤 提交于 2020-11-30 04:21:05
问题 BottomSheetDialog's background is blinking when switching between apps. What am I doing wrong ? MainActivity.java public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewById(R.id.btn1).setOnClickListener(v -> { BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(MainActivity.this); bottomSheetDialog.setContentView(R.layout.content);