I am using a rotation listener as work around for this, but that means my 
code has to be synced with framework
in terms of orientation change (I mean landscape vs reverse landscape). In 
theory, that's an issue, isn't it.

Hi Dianne, thanks for your reply! Actually I have a camera preview running 
when user flips the phone. In that case
if I don't handle the camera rotation myself, all widgets are good except 
that preview is upside down.

As Streets Of Bostom suggested, I can make it work by writing a rotation 
listener. Just want to ask is there any
better, or official solution for this?

Thanks in advance! 

On Friday, June 15, 2012 10:02:20 AM UTC+8, Streets Of Boston wrote:
>
> You could write a listener to the sensors to get the *rotation*.
>
> On Thursday, June 14, 2012 7:36:41 PM UTC-4, Farmer wrote:
>>
>> Thanks guys for your reply!
>>
>> I tried to set 
>> android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize",
>> but it didn't help.
>>
>> To Hoang, I can understand that Configuration does not change when I flip 
>> the phone. Actually I am calling getRotation() to decide
>> current display rotation. The thing is that I need a trigger to call the 
>> method when orientation is changing between landscape and
>> reverse landscape. And onConfigurationChanged() is my first thought. Any 
>> idea?
>>
>> On Friday, June 8, 2012 1:26:08 AM UTC+8, Hoang DN wrote:
>>>
>>> Hi guy, 
>>>
>>> In your case, actually, Configuration did not change, therefore the 
>>> method onConfigurationChanged() won't be called. 
>>> If you want handle this event, you can use 
>>> android.view.Display.getRotation(). The returned value may be 
>>> Surface.ROTATION_0 (no rotation), Surface.ROTATION_90, 
>>> Surface.ROTATION_180, or Surface.ROTATION_270. 
>>>
>>> Hope this useful for you. Good luck! 
>>>
>>>
>>> Br, 
>>> hoangdn 
>>>
>>> On 7 Tháng Sáu, 23:49, Farmer <[email protected]> wrote: 
>>> > Hi there, 
>>> > 
>>> > On ICS, when I flip the phone between landscape and reverse landscape, 
>>> > it seems onConfigurationChanged() won't be called. How can I get 
>>> > notified when such event happens, or did I miss anything here? 
>>> > 
>>> > Thanks in advance! 
>>> > 
>>> > best, 
>>> > duanxiaotao
>>
>>

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