无法从layout& amp;布局地在同一时间? [英] Unable to open both main.xml files from layout & layout-land at the same time?

查看:131
本文介绍了无法从layout& amp;布局地在同一时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发Android时,我无法在Eclipse编辑器中一次打开多个main.xml文件。每次我打开一个,它只需用新的代替第一个main.xml的编辑器(选项卡),而不是打开一个新的选项卡 - 即使现有选项卡的内容未保存!



即使是陌生人,我可以从不同的项目打开多个main.xml文件,没有任何问题。这只是在同一个项目中发生的。



任何想法如何修复或解决这个问题?这是一个实时的消息。



(运行Eclipse Classic 3.5.2 64位,Win7 Home Premium x64上的ADT 0.9.7)



为了清楚起见,编辑



两次打开的文件不一样。在一个项目中,在名为Layout的目录中有一个名为main.xml的文件。另外在名为Layout-Land的目录中也称为main.xml文件。这两个文件无法同时打开。我不知道这是否是Eclipse或ADT的问题。



更多信息: p>

对于踢我在同一个目录(两个名为item.txt)中创建了两个新文件,并且它们都正确打开(每个都在自己的选项卡中)。我将它们重新命名为item.xml,并尝试再次打开它们,并确定他们为同一选项卡打了。这导致我相信ADT是错误的,因为这些布局目录中的xml文件是使用ADT的布局工具打开的。

解决方案

右键单击main.mxl并选择新编辑器,这将创建另一个主题。 xml可以通过双击来替代风景版本。



然而,eclipse因为这个原因而这样做,所以你不会感到困惑,并且把你的文件放在一起



我认为您也可以在文本编辑器中将这些文件编辑到一边,效率损失很小。


While developing for Android, I am unable to open more than one main.xml file in an Eclipse editor at a time. Each time I open one, it simply replaces the editor (tab) of the first main.xml with the new one, instead of opening a new tab - even if the contents of the existing tab were unsaved!

Even stranger, I can open multiple main.xml files from different projects with no problems. This only happens when they're within the same project.

Any idea how to fix or work around this? It's a real time-waster.

(Running Eclipse Classic 3.5.2 64bit w/ADT 0.9.7 on Win7 Home Premium x64)

Edit for clarity:

It's not the same file opened twice. In one project, there is a file called "main.xml" in a directory called "Layout". There is another file also called "main.xml" in a directory called "Layout-Land". These two files cannot be opened at the same time. I'm not sure if this is a problem with Eclipse or with ADT.

More info:

For kicks I created two new files in those same directories (both called "item.txt") and they both opened properly (each in their own tab). I renamed them both to "item.xml" and tried opening them again, and sure enough they fought for the same tab. This leads me to believe ADT is at fault since xml files in these layout directories are opened with ADT's layout tool. I could be wrong though.

解决方案

Right click on main.mxl and choose 'new editor'- this will create another main.xml which you can replace with the landscape version via a double click.

However, eclipse does this for a reason- so you don't get confused and bork your files up.

I would think you also could edit these files in a text editor to the side with little loss of efficiency.

这篇关于无法从layout& amp;布局地在同一时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆