markushi/android-ui

Create a Play-Store-like action

pietrorampini opened this issue · 12 comments

Can you create an action like the new one in Play Store (release 5.0)?
a

@Rampo, I got it working with a few modifications. Check out this gist: https://gist.github.com/jaredrummler/3743e8eecce88a5bdd13

I just used getActionBar().setCustomView(mySlidingAction); and when the drawer was open I set the rotation to clockwise and when the drawer was closed I set the rotation to counter clockwise. When the drawer was opening I used setAnimationProgress(percentOpen) to get the effect the Google Play app has.

Hope that helps and also hope a better solution is integrated.

Can you publish the full example please?

@jaredrummler I got it to work but the opposite, the arrow is in the opposite side.

@jaredrummler Can you post me a full gist? I'm having some trouble

I'm also interesed in having some sample code for this feature.

also @jaredrummler I found a bug on orientation change

I am busy this weekend but I will try to get a full working sample project up by Monday.

working weekend?

@Rampo @jonasborggren Here is my version with sample - https://gist.github.com/yoavst/67a787ddebd447709980
The sample is based on my activity, so it may not work because I probably removed something important. It doesn't tested (only the ActionView and DrawerActionView are tested).

Looks interesting!
The library should definitely provide an easy way to achieve a Google Playstore like effect. I'll look into this!

I was going to do this myself as well -- basically tie the animation position to the navigation drawer offset.

Are you still working toward that markushi?