Home more button between two recycler view
Reply: 0

more button between two recycler view

user1201
1#
user1201 Published in May 21, 2018, 1:04 pm

I have two recycler views in one screen and in between of them, there is one more button like this.

I want to update the height of recycler view of the upper one to MATCH PARENT with animation, So I had tried this.

binding.moreLl.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            ValueAnimator anim = ValueAnimator.ofInt();
            anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
                @Override
                public void onAnimationUpdate(ValueAnimator valueAnimator) {
                    int val = (Integer) valueAnimator.getAnimatedValue();
                    ViewGroup.LayoutParams layoutParams = binding.fragmentWalletRv.getLayoutParams();
                    layoutParams.height = val;
                    binding.fragmentWalletRv.setLayoutParams(layoutParams);
                }
            });
            anim.setDuration(500);
            anim.start();
        }
    });

But unfortunately i cant get the expected result. So please guide me how i can do that thing. Thanks in advance.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326223 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO