Bug 25122 - Switching to Design tab before undoing Source changes adds android:entries attribute to Spinner elements
Summary: Switching to Design tab before undoing Source changes adds android:entries at...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer ()
Version: 4.6.0 (15.3)
Hardware: PC Windows
: Low minor
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-12-05 17:15 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2017-07-10 14:56 UTC (History)
6 users (show)

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

Test case (15.31 KB, application/zip)
2014-12-05 17:15 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Screen capture showing the issue (890.00 KB, application/x-shockwave-flash)
2014-12-05 17:26 UTC, Brendan Zagaeski (Xamarin Team, assistant)

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 for Bug 25122 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-12-05 17:15:39 UTC
Created attachment 8986 [details]
Test case

Switching to Design tab before undoing Source changes adds android:entries attribute to Spinner elements

This problem happens both in Xamarin Studio and in Visual Studio on Windows. So far I haven't found a way to reproduce it in Xamarin Studio on Mac, but it might happen there too.

## Steps to reproduce

1. Open the `Main.axml` layout from the attached test case in the Android designer.

2. Switch to the Source tab.

3. Copy and paste the XML contents of the layout over itself.

4. Switch back to the Design tab.

5. Save the document.

6. Select "Edit -> Undo".

7. Save the document.

8. Switch back to the Source tab.

## Result

Compared to the original, an `android:entries` attribute has been added to the `Spinner` element:
> android:entries="Item 1"

## Expected result

No extra attributes are added to the `Spinner` element.

## Version information

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Xamarin.Android (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)
Xamarin.iOS (840a925103a0bf4a856507f13d5eaee3c1579c2f)

=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 34fd43e5-ebb7-44cc-8af1-f113f04aa891
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.20.0 (Business Edition)
Android SDK: C:\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 13:26:21-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-12-05 17:26:50 UTC
Created attachment 8987 [details]
Screen capture showing the issue