Specifying LinearLayout orientation in resource "values"

by Justin Giles » Tue, 20 Apr 2010 20:41:12 GMT

Sponsored Links
 I suppose you could change the orientation in code.  After you assign the
view in your onCreate, do a check to see whether the user is on landscape or
portrait mode and set the orientation value accordingly.  This should be a
bit more fool-proof than your method, however it could have its own
drawbacks in that it could cause shifting on the screen visible to the user.
 Might be worth a try though.



Specifying LinearLayout orientation in resource "values"

by westmeadboy » Wed, 21 Apr 2010 05:18:35 GMT

 I'm a little nervous about setting it in code (also in
onConfigurationChanged() ) for the reasons you mentioned. It just
feels "tighter" to do it in the XML...

> >

Sponsored Links

Other Threads

1. Service communicates with other service


I'm new to Android and I have a task in which an activity starts a
service(Remote Service). This I have implemented. Now at some point
the service needs to start another service. Is there a way in which we
can achieve this ?

Abdul Muyeed M


2. Video overlays and PIP

One of the things I'm trying to design is a Picture in Picture, or
PiP, effect which displays one video playing on the "full screen"
while another plays as an insert. This is the same type of effect you
see when watching a news program on TV in which the commentator is
shown sitting at a desk and recorded footage is shown in a "box" on
the same screen. However, in my use-case, the full screen is a camera
preview and the PIP window is the video playback. Apart from the PIP
overlay I want to overlap some buttons like pause, resume to control
the preview settings.

The camera preview uses a SurfaceView and Camera classes and video
playback uses the VideoView as in the samples. But not sure how the
overlapping windows can be achieved. I have looked through the
reference docs and did not find any explanation on what is the best
way is to achieve  overlays. Maybe multiple SurfaceViews is more
suited for this, can someone please comment on the use-case that I
have described above and suggest any ideas on how to achieve this.



3. Music app crashing on my Ecalir 2.1 emulator

4. Popular ROM untuk motorola Droid

5. Problems with big buttons using android:duplicateParentState

6. Miring dengan Suhu S

7. Unable to open database