Android XML 编辑器和 Eclipse 的问题...难以手动编辑

Problems with Android XML Editor and Eclipse...Hard to manually edit XML(Android XML 编辑器和 Eclipse 的问题...难以手动编辑 XML)

本文介绍了Android XML 编辑器和 Eclipse 的问题...难以手动编辑 XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我上次开发 Android 应用程序以来已经有好几年了.从那时起,Eclipse 中添加了一个图形编辑器,允许您以所见即所得的方式(android sdk 的一部分)为布局生成 XML.我喜欢.加快速度.

但是,使用这个编辑器,我在xml 视图"而不是图形布局"视图中编辑 xml 实在是太费时间了.

在 XML 视图中,我不能再使用很多快捷键.像 ctl-c 或 ctl-v (剪切和粘贴),最令人沮丧的是我不能使用删除"键.当我执行剪切和粘贴时,没有任何反应.检查剪贴板,我可以看到一开始没有任何内容被复制.当按下删除键时,会发生奇怪的副作用.有时什么都没有……有时输入小部件被删除.我想不通.

在 XML 视图中,我可以使用鼠标进行剪切和粘贴,一切都很好.我可以使用退格"键而不是删除键来删除文本.所以我可以毫无问题地把所有东西都放进去.但是...这是背部的主要疼痛.我已经编程了 20 年的某些方式,并且很难让自己使用鼠标进行剪切和粘贴等等.

有其他人遇到过这种情况吗??我在互联网上没有找到任何与此问题相关的信息.

注意:我知道我可以将 Eclipse 中的编辑器首选项更改为只使用普通的 eclipse xml 编辑器,但我失去了所见即所得的显示...这对于可视化来说非常好.

如果您发现此问题或知道解决此问题的方法...请告诉我.

我不认为这有什么不同,但这是我的规格.

日食:版本:4.1.0内部版本号:M20110912-1510

Android 开发工具 12.0.0.v201106281929-138431

解决方案

今天发布的 ADT 20 Preview 3 中已修复此问题.

http://tools.android.com/download/adt-20-previewp>

It's been a few years since I have last developed android apps. Since then, a graphical editor was added to Eclipse that allows you to generate the XML for an layout in a WYSIWYG fashion (part of the android sdk). I like it. Speeds things up.

However, with this editor I am having a heck of a time editing the xml in the "xml view" as opposed to the "graphical layout" view.

When in the XML view, I can no longer use a lot of shortcut keys. Like ctl-c or ctl-v (cut and paste) and most frustratingly I can't use the "delete" key. When I perform a cut and paste, nothing happens. And checking the clipboard, I can see that nothing gets copied in the first place. When hitting the delete key, strange side effects happen. Somtimes nothing...othertimes enter widgets are removed. I can't figure it out.

While in the XML view, I can use the mouse to cut and paste and everything is fine. I can use the "backspace" key to remove text instead of the delete key. So I can get everything in there with no issues. But...this is a major pain in the backside. I have been programming certain ways for 20 years and it is hard to get myself to use the mouse to cut and paste and whatnot.

Has anyone else eperienced this?? I haven't found anything on the internet pertaining to this problem.

Note: I know I can change the editor preferences in Eclipse to just use the normal eclipse xml editor but I lose the WYSIWYG display...which is nice to have for visualization.

If you have seen this problem or know of a way to get around it...please, please, please let me know.

I don't think it makes a difference, but here are my specs.

Eclipse: Version: 4.1.0 Build id: M20110912-1510

Android Development Tools 12.0.0.v201106281929-138431

解决方案

This is fixed in ADT 20 Preview 3, released today.

http://tools.android.com/download/adt-20-preview

这篇关于Android XML 编辑器和 Eclipse 的问题...难以手动编辑 XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Android XML 编辑器和 Eclipse 的问题...难以手动编辑

基础教程推荐