How how can we keep Overlay Surface unchanged when switch from Portrait to Landscape mode

by tony » Wed, 29 Apr 2009 08:26:55 GMT


Sponsored Links
 In current android implementation,all the Surface will rotate 90degree
when switch to landscape.

We have requirement to keep the video unchanged (no rotation) and it
seems the only way is to ignore the orientation in
LayerBuffer::OverlaySource::onVisibilityResolved().

Please let me know if you have comments.
--~--~---------~--~----~------------~-------~--~----~



How how can we keep Overlay Surface unchanged when switch from Portrait to Landscape mode

by Dave Sparks » Wed, 29 Apr 2009 17:31:08 GMT


 The application chooses the orientation. You can't force this from the
hardware layer.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How how can we keep Overlay Surface unchanged when switch from Portrait to Landscape mode

by Feike » Thu, 30 Apr 2009 05:19:05 GMT


 I met this issue too, I suggest google should add a new attribute
NO_ROTATION in frameworks/base/core/java/android/view/Surface.java,
then check it in LayerBase.cpp::validateVisibility(...) function to
decide if re-calculate the orientation and position for this layer
(surface). So it will provide a capability for user to control each
surface's rotation.

For example:
Camera application's controller surface need rotate according to the
phone status(landscape or portrait), but its viewfinder surface
needn't rotate.
In current android platform, we can correct it in
LayerBuffer::OverlaySource::onVisibilityResolved(), but it will
prevent all surfaces that use overlay to rotate, it isn't good method.




--~--~---------~--~----~------------~-------~--~----~



How how can we keep Overlay Surface unchanged when switch from Portrait to Landscape mode

by tony » Thu, 30 Apr 2009 10:00:13 GMT


 Agree with feike, it's better to add interface in java class Surface
to control if  orientation is allowed. I believe many use case need
such API especially for Push Surface.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Changes doesn't reflect in Launcher

Hi,
I am trying to make some changes in the Launcher app. As much changes I make
changes doesn't affect the workspace, please let me know more information on
this as I need to know more about this app as I want to make some changes in
the main area where the apps are loaded.

Thanks
Nishant Bhargava

-- 

2. Android 2.3 Cannot load library

hi,everyone,
My app with a ".so" can't run on android 2.3 witch runs nomarlly on 1.6,2.1 and 
2.2.When it starts up to System.loadLibrary the "so" file,the system throws a 
exception "java.lang.ExceptionInInitializerError",the detail below:
ERROR/AndroidRuntime(333): FATAL EXCEPTION: main
ERROR/AndroidRuntime(333): java.lang.ExceptionInInitializerError
ERROR/AndroidRuntime(333):     at java.lang.Class.newInstanceImpl(Native Method)
ERROR/AndroidRuntime(333):     at java.lang.Class.newInstance(Class.java:1409)
ERROR/AndroidRuntime(333):     at 
android.app.Instrumentation.newActivity(Instrumentation.java:1021)
ERROR/AndroidRuntime(333):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1536)
ERROR/AndroidRuntime(333):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
ERROR/AndroidRuntime(333):     at 
android.app.ActivityThread.access$1500(ActivityThread.java:117)
ERROR/AndroidRuntime(333):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
ERROR/AndroidRuntime(333):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
ERROR/AndroidRuntime(333):     at android.os.Looper.loop(Looper.java:123)
ERROR/AndroidRuntime(333):     at 
android.app.ActivityThread.main(ActivityThread.java:3647)
ERROR/AndroidRuntime(333):     at java.lang.reflect.Method.invokeNative(Native 
Method)
ERROR/AndroidRuntime(333):     at 
java.lang.reflect.Method.invoke(Method.java:507)
ERROR/AndroidRuntime(333):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
ERROR/AndroidRuntime(333):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
ERROR/AndroidRuntime(333):     at dalvik.system.NativeStart.main(Native Method)
ERROR/AndroidRuntime(333): Caused by: java.lang.UnsatisfiedLinkError: Cannot 
load library: reloc_library[1311]:    33 cannot locate '_length_code'...
ERROR/AndroidRuntime(333):     at 
java.lang.Runtime.loadLibrary(Runtime.java:434)
ERROR/AndroidRuntime(333):     at java.lang.System.loadLibrary(System.java:554)
ERROR/AndroidRuntime(333):     at com.amuse.Plugin.<clinit>(Plugin.java:9)
ERROR/AndroidRuntime(333):     ... 15 more


the log says that "Caused by: java.lang.UnsatisfiedLinkError: Cannot load 
library: reloc_library[1311]:".I also comiled my "so" file with ndk-r5,but the 
still the problem.
Please help me!!
Thanks in advance!



-- 

3. make an engine

4. Ant not building app properly

5. Simple Database not so simple

6. example on asynctask class..

7. How to pass date object from one activity to other?