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 <duanxiao...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to