I have custom View which is dynamically added multiple times in same activity.

Each of custom view instance has beside other stuff a TextView child. The TextView has it's ID and it is same for each view instance.

For each custom view instance I set different Text for TextView when activity is created. When I rotate the screen, the activity is recreated but now each TextView displays same Text (text is same as text of the last instance).





You can use View.setSaveEnabled (boolean enabled) method.

It's also possible to disable automatic state saving via xml using saveEnabled attribute android:saveEnabled="false"