Hello,

In an Activity I have embedded a Video widget (VideoView or
MediaPlayer associated to a SurfaceView) which size should be adapted
when the screen is rotated. This Activity is used as content in a
TabHost.

**My current Approach**

In order to handle screen rotation I have provided two layouts one for
portrait and another for landscape orientation (placed in ./res/layout
and ./res/layout-land folders).

Problem of this approach is that a new Activity is created for each
rotation so I don't use the same MediaPlayer (or VideoView) => I start
the video from the beginning every time I rotate the screen. As the
video is streamed from the web there is no way to store the position
in the video in order to seek to this position when restarting the
video in the other Activity.

**What I would like to do**

I need to be able to translate/scale/hide views inside the Activity
when screen is rotated. Translation/scaling needs to maintain layout
organisation in order to have a layout adapted to different screen
sizes.


**My questions**

 - How to translate/move views to the top-left position of the
screen ?
 - How to hide/translate View outside of the screen in order to make a
View disappear ?
 - How to scale/resize View to adjust its size to available space
around it ?

 - Which interface, callback do I need to implement in order to be
notified of screen rotation to fire these transformations ?

Thanks in advance for your solutions/ideas.

Sincerely

Bertrand

PS: I also post this question on SO:
http://stackoverflow.com/questions/5230085/recompose-activity-layout-to-play-video-in-fullscreen-when-screen-is-rotated

-- 
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