Questions tagged bottomsheetdialogfragment

Explore the latest questions and answers asked by our top developers.

How to apply screen resize in BottomSheetDialogFragment?

First, I will show you the BottomSheetDialogFragment class. class BottomSheetReportFragment(var mContext: Context, var postId: String, var commentId: String?, var replyId: String?) : BottomSheetDialogFragment() { private lateinit var mView: View override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setStyle(DialogFragment.STYLE_NORMAL, R.style.AppBottomSheetDialogTheme) } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { mView = inflater.inflate(R.layout.bottom_sheet_report, container, false) return mView […]

By hanjiman
Published
Categorized as android, bottomsheetdialogfragment

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, <?xml version="1.0" encoding="utf-8"?> <navigation 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" app:startDestination="@id/football_home" android:id="@+id/home"> <fragment android:id="@+id/football_home" android:name="com.football.mib.ui.home.HomeFragment" android:label="@string/title_home" tools:layout="@layout/fragment_home"> <action android:id="@+id/launch_otl_link_prompt" app:destination="@+id/initial_flow"/> </fragment> <dialog android:id="@+id/initial_flow" android:name="com.football.mib.ui.consent.LinkPromptFragment" android:label="@string/title_initial_flow" tools:layout="@layout/fragment_link_prompt"> <action android:id="@+id/activate_game" app:popUpTo="@id/game_activated" app:popUpToInclusive="true" app:destination="@id/game_activated"/> </dialog> <dialog android:id="@+id/game_activated" android:name="com.football.mib.ui.consent.GameActivatedFragment" android:label="@string/game_activated" tools:layout="@layout/fragment_game_activated" /> </navigation> I […]

Setting fixed height for a BottomSheetDialogFragment

I have a fragment inside a viewpager. Viewpager covers half of the screen. I need to show the bottom sheet dialog fragment inside the fragment. I have displayed the bottom sheet dialog fragment. But the problem is setting the height of bottom sheet dialog fragment to the exact height of Parent Fragment (Fragment inside viewpager). […]

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 with 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 issue. Anyone here who is facing this issue? And Anyone who […]

want to create BottomSheetDialogFragment Like Atttache One

i want my bottomsheet to behave like attached image in stages like default,dragged and close. Source: Android Questions

getSupportFragmentManager() always get null?

I used a bottom sheet dialog fragment and want to return something to the parent fragment. So I tried to create a function in the parent fragment(MyFragment) and Activity. I tried to let BottomSheetDialogFragment talk to Activity and let Activity ask MyFragment do something (change the layout). Like this: BottomSheetDialogFragment -> Activity -> MyFragment BottomSheetDialogFragment […]

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 viewModels() …… } But when I tried to build my project it is giving me this error: Execution failed for task ‘:app:kaptDebugKotlin’. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction […]

By Javlon
Published
Categorized as android, bottomsheetdialogfragment, dagger-hilt, gradle

Is there any way to add a scroll bar over a BottomSheetDialogFragment?

I’m trying to add a small bar over a BottomSheetDialogFragment which will help in scrolling the bottom sheet. Is there any way to do this? Source: Android Questions

By Tasin Haiwan
Published
Categorized as android, bottomsheetdialogfragment, kotlin, scrollbar

Is there any way to add a bar over a BottomSheetDialogFragment?

I’m trying to add a small bar over a BottomSheetDialogFragment which will help in scrolling the bottom sheet. Is there any way to do this? Source: Android Questions

By Tasin Haiwan
Published
Categorized as android, bottomsheetdialogfragment, kotlin, scrollbar

How to navigate from BottomSheetDialogFragment to another Fragment using JetpackNavigation component

My app is crashing if I try to navigate to another fragment from a bottom sheet dialog fragment. I am doing this now in bottom sheet dialog fragment: someButton.setOnClickListener { view -> val action = DestinationFragmentDirections.actionCurrentFragmentToDestinationFragment() view?.findNavController()?.navigate(action) } Crash log: java.lang.IllegalStateException: View androidx.appcompat.widget.AppCompatButton{c44315f VFED..C.. …P…. 44,1189-1036,1321 #7f0a00ff app:id/fragment_book_details_btn_edit} does not have a NavController set at […]

1 2 3 7

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq