How to implement custom bubble bottom navigation animation - android

I have tried this library - https://github.com/gauravk95/bubble-navigation
I don't think this can be achieved by transition drawable as the previous tab is selected during the transition. Only the current tab can be animated using the TransitionDrawable.
Also, the corner tabs have different background animation.
Link to animation

Related

How to create an animation that consists of a fragment overlapping another one?

I am using the navigation component and I want to create an animation that consists of a fragment that slides and overlaps the other one. It's like this picture:
I don't find the way to achieve it. I know how to make the fragments slide but I don't know how to achieve the same that is in this picture.
How can I achieve it?
Navigation Components allows to specify enterAnim and exitAnim for each action.
By defining the enterAnim to slide from the right and the exitAnim to f.e. fade out, you will get such an effect.
Check out this guide on how to set up the animations:
https://developer.android.com/guide/navigation/navigation-animate-transitions

The background color of TabLayout is not animated with the parent animation

I have an AppBarLayout with a toolbar and a tablayout. I want to apply the enter animation for the tabLayout like Google's Youtube app.
In the activity's onCreate() I use:
ObjectAnimator.ofFloat(tabLayout, View.Y, 150f, 200f)
However, the slide animation only applies to the tab title. The primary (background) color of the tabLayout is not animated. It's always there.
Here's what I tried:
Use LayoutAnimation on a separate layout of tabLayout, say FrameLayout.
Remove the background of tablayout.
None of them works. Any suggestions?
Update screenshot:
The green background is not animated with the titles:
if you want enter animation for your tablayout as in youtube app.just put this code in onResume() of your activity and not in onCreate().
int size=this.getResources().getInteger(R.integer.enterheight);
//size is in pixels
ObjectAnimator object1=ObjectAnimator.ofFloat(tablayout,"translationY",-size,0);
object1.setDuration(500);
object1.start();
works fine in my app.If you want some more animations to run in addition to this enter animation use AnimationSet.

How to do scaling animation effect between fragments on Android

I want to create an animation between two fragments on Android.
After clicking on the "menu" button, I want to scale[minimize] current fragment and move it to right corner of the second fragment like this:
Preview
And after click on this minimized fragment, I want to maximize it again with reversed animation.
Is it generally possible? How can I do this?
There are several libraries available for viewpager animations like
https://github.com/jfeinstein10/JazzyViewPager
https://github.com/ToxicBakery/ViewPagerTransforms

PagerTabStrip customization - moving tab background instead of standard indicator

I am trying to use PagerTabStrip in my app but need a little customization. My problem is that I want the tab background to be moved instead of the standard indicator. The image should explain it better:
Currently I don't show at all tab indicator, but use a tab background which is a selector (pressed & selected). This tab background behaves like a tab indicator but is jumpy and I would like to move it smoothly when sliding left/right.
I have have used the PagerTabStrip, got it to work and changed the height of the indicator to match the height of the tabbar but this didn't solve the problem because the indicator is drawn on top of the tabs and covers them. To solve the problem the indicator needs to be drawn behind the tabs. To do that I have modified PagerTabStrib and made a custom TabsContainer (by default LinearLayout is used in PagerTabStrip as a tabs container) an inner class which extends LinearLayout and overrides its onDraw() method where I want to draw the moving indicator. This way the indicator should be drawn behind the tabs, right? My problem with the code right now is that I don't get calls to onDraw() inside my custom TabsContainer. What do You think about this solution and about this problem? Do You see any better solution?
Thanks for any help.

Android ViewPager and Fade Transitions

I am trying to create a ViewPager (using the Compatibility Package and Gingerbread) that would fade in/out gradually between view transitions. The default view transition has a slide effect. Fade transitions could be accomplished using ViewFlipper or ViewSwitcher, but I would like to know what effort would be required to get it working with a ViewPager.

Categories

Resources