Hi i have a problem like, I have a chronometer its shows recording time if i press a record button of a live video streaming, both are dynamic. Once i clicked the record the recording will takes place in server side, so no problem about that but the problem is after clicking the record button when the recording timer starts, if i changed my mobile orientation it automatically starts again from onCreate and the chronometer and the button is not visible, video is continuing. i should continue both the button and timer along with the video even after the orientation done. I have already tried like adding android:configChanges="orientation" and in class file onConfigurationchanged() but its not working.... can u anyone please help me
Asked
Active
Viewed 1,148 times
1
-
If you don't need the orientation, lock your display to either of them (landscape or portrait). – Mudassir Mar 01 '11 at 06:23
-
1Where are you putting the android:configChanges="orientation" attribute? – mixkat Mar 01 '11 at 06:24
3 Answers
0
Into AndroidManifest.xml
add this:
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
This lines c&p at header of document into <manifest...
And this other into <activity...
:
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
Other option is change "portrait" with "landscape" for panoramic view.
0
You can disable the rotaion by adding android:screenOrientation="portrait" (or landscape) to the element in the manifest.

Arun
- 3,036
- 3
- 35
- 57
0
use this attribute in manifest file android:configChanges="orientation|keyboardHidden" and also u should override the onConfigurationChanged() in your activity file..

fargath
- 7,844
- 6
- 24
- 36