Question

I'm surely not the first one noticed the problem below:

when using the graphical layout to drug some views into the layout preview, then trying to make some changes directly on the xml file - the lines messing around in strange annoying way. only close and re-open eclipse helps to stop the weird behavior.

someone have a clue how to fix this problem?

is there any plugin prevents it?

TIX

Was it helpful?

Solution

I faced similar problem. I could not find a better solution than this:

  1. Add views using Graphical Layout.
  2. Save the file.
  3. Close it.
  4. Reopen it and then make changes to it.

OTHER TIPS

I have experience the same problems. For me, the solution is to change the theme in the layout editor to a default one, such as Holo.light. It solved the problem.

This happens when working on a Windows machine (which uses CRLF for the line endings) as the Android layout editor adds lines with unix-style LF line endings, regardless of the line ending style of the rest of the file. When a file has mixed CRLF and LF endings, the Eclipse text editor gets confused and fails to display it properly.

Workaround: You can convert the line endings of the file to LF before editing it in Eclipse, as this keeps all the line-endings the same and keeps the editor happy. If are insistent on using CRLF line endings (e.g. for source control) then you can convert the file using dos2unix on the command line (or using a nice decent editor like Notepad++), then convert it back to CRLF after making layout changes.

Hopefully the ADT team will fix this bug soon.

It's Common in Eclipse.

Myself too faced this issue.

No Need to restart the Eclipse,just Close the xml and re-open the same. It works like charm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top