1

I'm trying to create slidingup animation in android application to change between two view of layout.

I've tried from this tutorial but the second screen didn't come like what I want. I want the second layout to come like a wipe animation, like the following picture at the bottom

Wipe Animatioin

Akbarsha
  • 2,422
  • 23
  • 34
user3410051
  • 111
  • 2
  • 5
  • You will have to create custom view for this kind of animation. This can be achieved by making the view invisible but shown fully. Then as the handle(button) moves up show the view accordingly. You might want to refer the code of navigation drawer of android – Hardik4560 Mar 13 '14 at 02:31
  • Thank you for reply. Any tutorial to create this? Or can i change several code from – user3410051 Mar 13 '14 at 02:47

2 Answers2

1

Refer this:

https://android.googlesource.com/platform/frameworks/base/+/ab51002847ea3dcdc0ba14eb330ab9ec292a9789/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

In the above code, focus on the animateCollapsePanels method

Hardik4560
  • 3,202
  • 1
  • 20
  • 31
0

I was able to implement a similar transition by using a clipping Path. Because I didn't want my transition to rule out the use of Layouts in the clipped view, I implemented the clipping at the Layout level following this answer: Custom Layout that rounds the corners of its content

The clipping is no anti-aliased and you would need to do use instead PorterDuff and XferMode based solutions otherwise, but for a linear wipe animation like you're describing, clipping in the layout will achieve what you want. Basically you're doing a linear reveal whereas the accepted answer I linked does a circular clip.

Community
  • 1
  • 1
user823629
  • 550
  • 5
  • 9