Sliding Drawer or Translate Animation?

by Aaron Buckner » Fri, 11 Feb 2011 22:31:54 GMT


Sponsored Links
 Ok I have an app requirement that seems to be a little off the beaten
path, My app needs to have a button on the bottom of the screen when a
user clicks on it the "drawer" should open to a specified position
revealing a horizontal listview, when the user clicks on one of those
items it opens another "sliding drawer" above the previous drawer
leaving it in place to allow another item to be selected.

Now as far as I can tell this isn't really supported as part of the
sliding drawer and I've pretty much worked out how to do it with
Translate animation however I have run into the problem with the
hitbox not following the animation, is there a straight forward way to
refresh the hitbox position or redraw the layout or do I need to
create a new layout and call it on completion?

-- 



Re: Sliding Drawer or Translate Animation?

by Mark Murphy » Fri, 11 Feb 2011 22:38:10 GMT


 


You don't need to "create a new layout", but you do need to adjust
your existing layout upon completion to make the new positioning rules
stick. Here is an example:

https://github.com/commonsguy/cw-advandroid/tree/master/Animation/SlidingPanel

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books 

-- 


Sponsored Links


Other Threads

1. Multiple line Notification

I use NotificationManager to write a Notification. I want now a
multiple-line text for my notification. Is it possible?
--~--~---------~--~----~------------~-------~--~----~

2. In call dialpad/menu confusion - am I the only one?

Platform improvements are ongoing, and this specific issue is being
addressed in an upcoming release.

j






-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~

3. PendingIntent Flag and AlarmManager behavior ?

4. take screenshot programmatically

5. Android Lap top connection

6. ZooShaker is fun for all ages

7. Sample Code