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, King Salamon пишет:
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 [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

