Monday, October 10, 2011

[android-developers] Re: textView Clears on Rotation

Excellent --this works! Thanks

On Oct 10, 9:54 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Setting
>
> android:freezesText="true"
>
> in the layout XML forces a TextView to save its content. The view needs
> to have an ID as well.
>
> -- Kostya
>
> 10.10.2011 17:48,KingSalamonпишет:
>
>
>
>
>
>
>
>
>
> > Thank you everyone for the great insight on this issue. I tried the
> > simple -down and dirty workaround by adding
> > android:configChanges="orientation|keyboardHidden"
> > to the activity tag in the manifest. This did in fact work as the data
> > persisted after rotation.
>
> > However, as many have pointed out, this is not really a viable, long
> > term solution, and a better fix would be to store the data either
> > using shared preferences, a database, a file, or the onSaved instance
> > method.
>
> > Unfortunately, I cannot seem to get any of these to work! Can anyone
> > provide a code sample with a very simple example -perhaps just one
> > textview element that can keep its data using one of the above
> > methods?
>
> > Thanks in advance
>
> --
> Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate