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:

Mark Murphy (a Commons Guy)  |  | 

Android App Developer Books: 


Sponsored Links

Other Threads

1. singleTask + activity stack not preserved?


I have an activity, ActivityA, and its launchMode is set to

I start the application from the app tray. ActivityA launches
ActivityB from a button click. ActivityB is a normal activity with no
launchMode set ("standard").

With ActivityB on top of the activity stack, I hit the home button,
then resume the app, I see ActivityA instead of ActivityB when

Shouldn't the history stack be preserved in this case, and B be
showing? When I resume, I see A get onNewIntent() called, and I'm not
sure why this is happening. I thought the stack would be preserved.



2. how many intent in android

how many intent in android? can i get a list of all intents in android? Can
i add new intent to system?


3. to go from one activity to another via a kind of popup

4. ZuDoKu's TeSt

5. SQlite to Sybase synchronization

6. About how to make new buttons in a row?

7. What is the right way of using SQLite for phone book application?