I have a layout that has an EditText and a Button. I <include>
it in my main layout.
I'm having a weird issue with the layout and rotation. It seems to duplicate itself when the device (physical) is rotated, messing up the text and layout.
Here it is on first open, after I add some extra garble:
DSC_0013 is in the EditText on launch of the fragment.
Then, I rotate the phone and add some different garble:
And you can see the issue pretty clearly. At first, I thought it was just the EditText messing up. But if I add enough text to make a new line:
I can see that the button gets messed up too.
I do override onSaveInstanceState
, but in it I don't touch the EditText or its value, it's strictly used for something else.
What's happening and how do I fix it?
setContentView
+ XML?addView
exclusively?