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. Popupwindow can't disappear.

Hi,everyone;
    I have writen a input method for qwery keyboard on android
platform.When user press a key ,I show a  candidate   word use a
popupwindow. In this time a new incoming call is arrive,the
popupwindow can not disappear ,it show on the incoming call
activity.Is anybody see a problem like this and how to fix it ,thanks!

-- 

2. tcp/ip filter

Does android development have some sort of api I can use to log all
outgoing web requests for accountability purposes

-- 

3. Menu Problems

4. How to set MediaRecorder resolution? setVideoSize() does not work!

5. App design question for multiple "data" connections

6. writing to sdcard (change sdcard permissions ddms)

7. Android: Tilt issue