Bug 6302 - Designer modifies resources with the same name in different folders
Summary: Designer modifies resources with the same name in different folders
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
: 7576 7875 ()
Depends on:
Reported: 2012-07-26 16:48 UTC by bvsimmons1204
Modified: 2013-03-20 11:36 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description bvsimmons1204 2012-07-26 16:48:29 UTC
Description of Problem:
I have a MFA Project where I have the following resources

when I open either one in the designer all changes are made to both of them

Steps to reproduce the problem:
1. Open a resource file
2. make a change
3. save the resource file

Actual Results:
changes are made to both resource files when I save

Expected Results:
change should be made only to the layout resource that I have open

How often does this happen? 
every time

Additional Information:
Comment 1 Lluis Sanchez 2012-07-27 07:47:33 UTC
This is actually a feature. See http://docs.xamarin.com/android/tutorials/Designer_Overview/Part_3_-_Alternative_Layout_Views
Comment 2 bvsimmons1204 2012-07-27 15:20:50 UTC
Ok I can see the usefulness of this feature, and I will experiment with it as I create new layouts. But, in my case the 2 layouts  (resources/layout-sw600dp/singlepoint.axml and resources/layout-sw720dp/singlepoint.axml) are quite different. Automatically, applying changes to both of the layouts when I only want changes made to one of them is going to royally mess me up. So again is there a way that I can "Turn it off" or lock the changes made to just one file? I would hate to have to go back to using Eclipse or a text editor to making changes to these layout files.


Comment 3 Lluis Sanchez 2012-11-16 12:01:08 UTC
*** Bug 7576 has been marked as a duplicate of this bug. ***
Comment 4 Lluis Sanchez 2012-11-16 12:01:15 UTC
*** Bug 7875 has been marked as a duplicate of this bug. ***
Comment 5 Kevin McMahon 2012-11-16 12:12:01 UTC
"So again is there a way that I can "Turn it off" or lock the changes made to just one file? "

I'd like to echo this sentiment and maybe even suggest that you flip the default behavior. It wasn't immediately obvious that the automatic update to the other files is on or even expected when you go to edit the individual files. I think it would make more sense to make this an "opt-in" feature instead of adding a switch to turn off and making it an "opt-out" feature.

Comment 6 Lluis Sanchez 2013-03-18 12:02:55 UTC
Some improvements have been made on this. When you open an alternative version of a layout, only that specific version of the layout is modified, unless you explicitly switch to another version.
Comment 7 Nischal 2013-03-20 06:51:04 UTC
Today, with the latest builds:

MFA 4.6.01073
Mono 2.10.12

We have followed the below mentioned steps:

1. Created the new MFA template application.
2. Added the new folder with the name "layout1" under the resources folder, so that two folders appears under the resources folder: "layout" and "layout1".
3. Now add a new android layout with the same name as the present one: "Main.axml" in the folder "layout1"
4. Observe that the fresh empty file Main.axml automatically updates itself to contain the content of the "Main.axml" appearing in the folder "layout"

Which shows that the issue still exists.

However, if we add another layout with the different name such as "Main1.axml", then the changes are saved only to the one which is opened.

Not changing the status of the issue, as we are not sure about the correct behavior.

PJ look into it and confirm the correct behavior and let us know about the further course of action for this issue.