Paolo wrote:
>>> Maybe I have to use the Animation to do that?
>> Oh, heck no.
> 
> 
> Why you say no?

Simple: that's not what animations are for. Animations are for transient
effects, where you actually see the movement. If you want true permanent
change to the widget, you need to do something to affect that change,
which puts you back where you began.

Now, an Animation may be part of your draw-it-yourself workaround. For
example, if you want to have an "option menu" in portrait on a landscape
activity, you'll have to do that yourself. That means:

Step #1: Intercept the KeyEvent.KEYCODE_MENU event in onKeyDown()
[though you should double-check this -- there may be a more appropriate
method to override for this in Android 2.x]

Step #2: Animate your own drawn menu thingy out from the bottom (as
viewed in portrait mode) -- here's a sample project showing that technique

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

Step #3: Respond to clicks on the whatever-you-use for the actual menu
entries

Step #4: Animate the menu away when needed (on a menu choice or a BACK
button press)

However, the tricky part by far is drawing your own menu in step #2. If
you want text, you're going to have to do that via drawing on the Canvas
AFAIK, as TextView only works horizontally, and in your case horizontal
is really vertical.

Frankly, I am unconvinced that work is remotely worth the trouble. But,
you're welcome to try it.

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

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to