Error with eclipse android graphical editor?

Of course, I was not the first to notice the problem below:

when you use a graphic layout to use some views in a preview of the layout, and then try to make some changes directly to the xml file - lines that messed around randomly. only closing and reopening an eclipse helps stop strange behavior.

Does anyone have a key to solving this problem?

Is there any plugin that prevents it?

Tix

+4
source share
4 answers

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

  • Add views using a graphic layout.
  • Save the file.
  • Close it.
  • Return it, and then make changes to it.
+4
source

I have the same problems. For me, the solution is to change the theme in the layout editor to the default value, for example, Holo.light. He solved the problem.

+1
source

This happens when running on a Windows computer (which uses CRLF for line endings), because the Android layout editor adds lines with an unix-style LF line ending, regardless of the line ending style for the rest of the file. When a file has mixed CRLF and LF ends, the Eclipse text editor gets confused and does not display it correctly.

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

Hopefully the ADT team will fix this error soon.

+1
source

This is common in Eclipse.

I myself also ran into this problem.

There is no need to restart Eclipse, just close xml and open it again. It works like a charm

0
source

All Articles