If you don't want the os to handle a configuration change (like a
screen rotation), you can use the android:configChanges="" tag in the
manifest file to specify what config changes should be handled
manually:
<activity android:name="SomeActivity"
android:label="@string/app_name"
android:configChanges="orientation|keyboard|keyboardHidden">
and then you would specify your own custom behavior in the
onConfigurationChanged method as Rajiv mentioned.
Hope that helps!
-Jeremy
On Jun 3, 5:56 am, Rajiv <[email protected]> wrote:
> Hi,
>
> You can reseted the value of the Text by using onConfigurationChanged method
> of the Activity.
> ex.
> public void onConfigurationChanged(Configuration newConfig) {
> super.onConfigurationChanged(newConfig);
> //setContent
> }
>
> If you dont want Landscape mode(Horizontal to Vertical) changes you need to
> add *android:screenOrientation="portrait"* to the particular activity in
> the manifest file.
> Ex.
> <activity android:name=".SomeActivity"
> android:label="@string/app_name"
> android:screenOrientation="portrait">
>
> Regards,
> Rajiv
>
>
>
> On Thu, Jun 3, 2010 at 6:02 PM, Patrick <[email protected]> wrote:
> > Hallo!
>
> > I currently have the following issue: when my app is running and the
> > phone is turned from a vertical into a horizontal position (or back)
> > all the stuff I changed in the UI is reseted to the plain layout.xml.
> > I mean the views that changed their visibility are back to the
> > original one and even the text of textviews is reseted to the value
> > specified in the layout.xml. Is there a way or concept that I missed
> > to tell activities (or the UI elements) to keep their status?
>
> > Thanks
> > Patrick
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2Bunsubs
> > [email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en