So for the project I’m working on I need to be able to move widgets up the screen during runtime (like a reverse waterfall). Could someone please show an example of how to move a button from one position of the screen to a higher position (using an absolute layout) during runtime?
I know it probably makes use of
AbsoluteLayout.LayoutParams
or params.addRule hopefully. But please do care to teach me
For Example:
_____________________(Top Of Screen)
| [button]
| –
| –
| –
| –
| –
| –
| –
| >
| [button]
_____________________(Bottom Of Screen)
From http://developerlife.com/tutorials/?p=343
Here’s a slide-from-left animation (translate from right to left across the width of the view), named “/res/anim/slide_right.xml”:
Here’s another animation sequence that uses the one above (@anim/slide_right.xml -> “/res/anim/slide_right.xml”):
So you can create your sequences in XML and put them in the “/res/anim/some_file.xml” of your Android project resources. You can get more details on how to create this XML file here.
You can also do this by code::
and then: