Questions tagged [bottomsheetdialogfragment]

73 questions
9
votes
2 answers

How to properly use Jetpack Compose inside BottomSheetDialogFragment?

For example, I have MyBottomSheetDialogFragment with Compose LazyColumn code in the application: class MyBottomSheetDialogFragment : BottomSheetDialogFragment() { override fun onCreateView( inflater: LayoutInflater, container:…
6
votes
1 answer

Sometimes BottomSheetDialogFragment opens in center of screen like alert dialog

I have BottomSheetDialogFragment which required to open in expanded state and should skip collapsed state while swipedown. The problem is, I get unexpected behavior sometimes Why I am getting this kind of view sometimes? here below is my code for…
5
votes
4 answers

Dagger-Hilt @AndroidEntryPoint is not working with BottomSheetDialogFragment()

I am using ViewModel inside BottomSheetDialogFragmet() so I have to mark my BottomSheet with @AndroidEntryPoint. @AndroidEntryPoint class SearchAddressDialog : BottomSheetDialogFragment() { private val viewModel: MyAddressesViewModel by…
Javlon
  • 1,108
  • 2
  • 15
  • 29
5
votes
2 answers

How to change scrim to invisible in bottomsheet dialog fragment?

I have implemented bottomsheet using bottomsheetdialogfragment. But default it's having dimming effect (Scrim). How to remove or change that dimming effect(scrim) to invisible, so that I can see other UI elements clearly. Here is the layout I…
4
votes
0 answers

Android BottomSheetDialog content gets pushed off screen

I have a BottomSheetDialogFragment in which the user can buy stuff. To pay with a master/visa card the user is sent to the browser for a safe payment transaction. When I return to the app again, everything is fine. But if I then close the bottom…
Algar
  • 5,734
  • 3
  • 34
  • 51
4
votes
4 answers

how to set left and right margin in ButtomSheetDialogFragment Android?

I tried to set Margin in ButtonSheetDialogFragment layout but its not working. I have tried to set margin from layout and programmatically but its has same result This is my XML file layout_bts_item.xml
Ajay Shrestha
  • 2,433
  • 1
  • 21
  • 25
3
votes
1 answer

How to pop the bottomsheet dialog when navigating from one bottomsheet to another using jetpack navigation component

I have nav stack with a fragment and 2 bottomsheetdialogfragment. This is how my nav graph looks like,
3
votes
1 answer

Why is my BottomSheetDialogFragment ignoring my app theme?

I just started using a BottomSheetDialogFragment in my app, however it seems to ignore my app themes. My app uses a dark theme, and the BottomSheetDialogFragment displays with a white background and doesn't use the accent color of my app. This is…
3
votes
1 answer

Adding a menu in Custom BottomSheetDialog Android

The is what i want to have I have a BottomSheetDialog and i have inflated my custom layout on it. But when i try to add the menu to it. It doesn't appear. Discord has the same thing with the menu appearing in the corner as you can see in the image…
3
votes
1 answer

java.lang.IllegalStateException: view not added

I am getting the below exception. Couldn't understand why. Tried to reproduce the issue too.But couldn't succeed. Can someone help me understand why am I getting the issue and how to resolve it. Its not occuring all the time too. Fatal Exception:…
3
votes
1 answer

java.lang.IllegalStateException: Fragment already added exception for BottomSheetDialogFragment

In order to show a last state in a BottomSheetDialogFragment I try to implement as below, *) Activity: private var languageSelectorBsFragment: LanguageSelectorBsFragment? = null @OnClick(R.id.txt_imc_clip_language) fun…
3
votes
1 answer

android show hide dialogfragment

I have custom DialogFragment which called from another fragment: final CustomCalendarDialogFragment newFragment = new CustomCalendarDialogFragment("CHOOSE_WEEK"); button.setOnClickListener(new View.OnClickListener() { @Override public void…
2
votes
3 answers

How to set Android Buttom sheet height match_parent?

I want the height of the bottom dialog to expend to match_parent (as empty activity) Here is my code. MainActivity import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.LayoutInflater; import…
user18148338
2
votes
0 answers

What is the correct way of adding rounded corners to full screen BottomSheetDialogFragment with Jetpack Compose

I have a BottomSheetDialogFragment like this: class MyFragment : BottomSheetDialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val dialog = BottomSheetDialog(requireContext(), theme) …
2
votes
1 answer

Keyboard is opening with bottom sheet dialog fragment without even having EditText in Activity or Fragment

I don't know why but Keyboard automatically opens when I open BottomSheetDialogFragment from another fragment. I tried with both navigation component and old method. I tried on API 24, 27, 30. On API 30 its working fine but in 24 and 27 facing this…
1
2 3 4 5