I want to start the bottom sheet for login from different fragments in my app. The issue I am facing is handling the back button on the bottom sheet fragment. I am not able to pass the directions for going back to the fragment from where I triggered this bottom sheet fragment.
What is the right way to handle this? How can I trigger bottom sheet fragment from any activity or fragment in my app and go back to the same fragment from where it started?
my problem is when I am going from first fragment to another fragment and come again to
the first fragment motion animation stuck
I am trying to implement bottom sheet behavior to fragment.The two points are need to implents
i)calling one fragment to another when button is clicked.
ii)apply bottomsheet behavior to fragment B,So that When I drag down the fragment can hide/dismiss.
Currently I am having two fragment A,B.I call fragment B in Fragment A by a container When button is clicked .
But when I am trying to implent second point I get error.On FrgmentB I am extend only Fragment not Fragmentdialog. The main reason is I cannot able to acess the background UI.
I have the same problem before, what I did is change the fragment to BottomSheetDialogFragment and made some changes.
I have two fragment in screen and i want second fragment(lower first fragment) covered the entire screen when it scrolling down and first fragmnet go back, and vice versa when second fragment scrolling up, first fragment appeared. Its liket toolbar and fragment do with CoordinatorLayout. How сan i do this?
I have an frame in an activity which received fragments based on button clicks at the bottom menu of the activity.
The Fragment I I have in question is structured like below. If I click off of the fragment when i'm at the scrolltop to another and then back to this one it stays at the top but if I scroll 1/2 way down the fragment and then leave and come back it is like 10% scrolled from the top. an odd behavior i'm not sure how to rectify.
Main Activity ->>viewpager1(frameLayout)->fragment1->frag1_constraint(ScrollView)
Fragment 1 Layout
Main Activity Layout