0

I have an activity with locked orientation

    <activity
        android:name=".AboutActivity"
        android:screenOrientation="portrait"></activity> 

How i can know when user change device orientation?
Maybe question is too unclear, so i try explain what i want in result.

I want to know when user rotate phone AND AFTER THAT rotate layout and other views with my own animation.

I think i can use SensorManager, but maybe exist more elegant way?

Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119

1 Answers1

0

Well I have used The OnScreenChangetListener() once. See this. It tells everything. Just execute your animation code in the Method. It might work. If the Above method doesn't work, there is a Method below the OnScreenChangetListener() method in the documentation. it will work for sure.

Syed Ali Naqi
  • 701
  • 7
  • 15