When editing xml layout file for Android in Eclipse you might encounter the xml being wrong, flipping and broken. When changing tabs between the graphical layout and the xml file, the lines of code will start disappearing or moving around. It becomes even more visible when highlighting a block of text.
To fix this you can disable this “feature” which is the course of the bug:
Window > Preferences > Android > Editors > Untick “Format XML files using the standard Android XML style rather than the configured Eclipse XML style (additional options below” -> Ok button
Hold down Ctrl + Shift + F to Auto-format your XML to Eclipse Built-In convention. You should not experience this bug anymore.