android-ui icon indicating copy to clipboard operation
android-ui copied to clipboard

Create a Play-Store-like action

Open pietrorampini opened this issue 10 years ago • 12 comments

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

pietrorampini avatar Oct 10 '14 17:10 pietrorampini

@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.

jaredrummler avatar Oct 11 '14 10:10 jaredrummler

Can you publish the full example please?

pietrorampini avatar Oct 11 '14 14:10 pietrorampini

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

yoavst avatar Oct 11 '14 14:10 yoavst

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

pietrorampini avatar Oct 11 '14 14:10 pietrorampini

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

jonasborggren avatar Oct 11 '14 17:10 jonasborggren

also @jaredrummler I found a bug on orientation change

yoavst avatar Oct 11 '14 18:10 yoavst

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

jaredrummler avatar Oct 11 '14 21:10 jaredrummler

working weekend?

xyggun avatar Oct 12 '14 06:10 xyggun

@jaredrummler Thank you!

pietrorampini avatar Oct 12 '14 08:10 pietrorampini

@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).

yoavst avatar Oct 12 '14 09:10 yoavst

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

markushi avatar Oct 12 '14 10:10 markushi

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?

Alchete avatar Oct 15 '14 20:10 Alchete