android - MainActivity cannot rotate screen normally -


my app's mainactivity behaves strangely in rotating screen. cannot rotate until click "overview" on navigation bar , turn on phones(tested on nexus 4/5/6). however, can rotate on tablets(nexus 7/9) @ time.

here properties mainactivity considered maybe influence screen rotation:

  1. supports rtl
  2. no android:configchanges in manifest.xml
  3. using recyclerview staggeredgridlayoutmanager count of span changes according screen size(3 above 7.0 , 2 below, judgement occurs in oncreate())
  4. using navigationview in design library
  5. have application(customized) member assigned (myapplication) getactivity in oncreate()
  6. android:windowbackground="@android:color/transparent" , android:windowistranslucent="true" in styles.xml

please give suggestions or directions find out why problem occurs. in advance!

update: set android:screenorientation="user(by default unspecified)" in manifest.xml solve problem want know why can't rotate screen without doing this.


Comments