سؤال

I have a music streaming service in my activity. My problem is when orientation changes downloading process starts from beginning. I know activity recreated on orientation change. I want my activity to ignore changing orientation. I tried some methods like adding android:configChanges="orientation" or add onConfigurationChange(newConfig) to my activity but none of them works. Thanks in advanced.

هل كانت مفيدة؟

المحلول

try this....

android:configChanges="keyboardHidden|orientation|screenSize" >

نصائح أخرى

Here you have to add in your AndroidManifest.xml file for orientation and for screenSizes

 android:configChanges="keyboardHidden|orientation|screenSize" >
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top