Fragment Animation and stop at a particular level android - android

I am using fragments in my application. I am at fragment A and I click on a button in Fragment A. That time I want my Fragment B to appear with an animation . Fragment B has to appear from the Bottom and stop at the center of the screen.
So now I can see my Fragment A at the top and Fragment B at the bottom. How can I achieve this?

Related

How to make bottom sheet dialog fragment being opened from all the fragments and go back to the same fragment in Android [Kotlin]

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?

i have bottom navigation with four fragments, first fragment have motion layout animation and others are default

my problem is when I am going from first fragment to another fragment and come again to
the first fragment motion animation stuck

Implement bottomSheet behavior in fragment

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.

Two Fragments in one screen. Scrolling animation for two Fragment

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?

When I replace a fragment the scroll is not to the top

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

Categories

Resources