Bug 26418 - [Android] ListView does not update when the bound ObservableCollection changes
Summary: [Android] ListView does not update when the bound ObservableCollection changes
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 27754 ()
Depends on:
Blocks:
 
Reported: 2015-01-26 09:43 UTC by Prashant Cholachagudda
Modified: 2015-06-22 09:43 UTC (History)
19 users (show)

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


Attachments
test case (28.46 KB, application/zip)
2015-01-26 09:43 UTC, Prashant Cholachagudda
Details


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:
Status:
VERIFIED FIXED

Description Prashant Cholachagudda 2015-01-26 09:43:08 UTC
Created attachment 9498 [details]
test case

Xamarin.Forms Android application does not update itself with bound ObservableCollection changes.
Version: Xamarin.Forms v1.3.1

Steps to reproduce: Download the attached test case and follow the in-app instructions.
Comment 2 John Michael Hauck 2015-01-26 15:47:36 UTC
I suspect this may be the same issue as Bug 23585.
Comment 3 Ram Chandra 2015-01-29 08:30:48 UTC
I have checked this issue and with the help of attached sample I am able to reproduce this issue.

Observations: When I check the Result tab when switch is off it shows the 2 items and when I on the switch it shows 5 items in Result tab and again if we change switch to off and check the Result tab, it doesn't show the 2 item instead of it shows 5 item. I also observed that if I tap on any item it shows the correct list.

Screencast: http://www.screencast.com/t/riB9lZB8DCjF

Application Output: https://gist.github.com/saurabh360/748aac2a8cdaf33d85de
IDE logs: https://gist.github.com/saurabh360/0c068537bba4297701ab
Device logs: https://gist.github.com/saurabh360/8f8b53483a09c15e705c

Environment Info:

Xamarin.Forms : 1.3.2.6309-pre2

=== Xamarin Studio ===

Version 5.7.1 (build 15)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507010015
Git revision: ce24e991948c7f3d88b0194a14fc1996d848ef51
Build date: 2015-01-26 16:42:20-05
Xamarin addins: 6895e3222bfa6910524708aa0633ff3db99bc3a0

=== Operating System ===

Mac OS X 10.10.0
Darwin Jatin66s-iMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 4 Andrew 2015-02-18 14:42:24 UTC
same thing with iOS
Comment 5 Paul Roy 2015-03-06 07:05:48 UTC
Is there any workaround ? This is quite a handicap…
Comment 6 cjameson 2015-03-06 07:52:42 UTC
I'm getting something similar to this on iOS too
Comment 7 Andrew 2015-03-06 09:32:25 UTC
The issue is in this screencast.  

http://screencast.com/t/XZzjaE3pP3p

resolved my issue.
Comment 8 Jason Smith [MSFT] 2015-03-09 18:23:43 UTC
Should be fixed in 1.4.1-pre1
Comment 9 glucose1e 2015-03-30 22:53:11 UTC
1.4.1-release have the same issue.
Comment 10 Ram Chandra 2015-03-31 11:24:17 UTC
I have checked this issue and I am still getting the same behavior.:

Screencast: http://www.screencast.com/t/T4iqQTCwAQQp

Application Output: https://gist.github.com/RamChBachkheti/024d72c2b6235e46f0c1
IDE logs: https://gist.github.com/RamChBachkheti/b7639c51fcd072b25939

For now, I am reopening this issue. Please let me know if I can provide more info in this issue.

Environment Info: 

Xamarin.Forms:  1.4.1.6349

=== Xamarin Studio ===

Version 5.8.2 (build 7)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.12.1 ((detached/0849ec7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010003

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.8.2.4 (Business Edition)
Hash: 981acb3
Branch: 
Build date: 2015-03-25 14:21:05-0400

=== Xamarin.Android ===

Version: 4.20.1.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.1.0.273 (Business Edition)

=== Build Information ===

Release ID: 508020007
Git revision: 067ed06873402cf780f8a0899bb332c2a1c0af22
Build date: 2015-03-27 14:17:13-04
Xamarin addins: 02510c4990dee3475c282b3182d588975a63ff07

=== Operating System ===

Mac OS X 10.10.0
Darwin Dalvik.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 11 Jason Smith [MSFT] 2015-05-19 20:33:07 UTC
Found the problem, Android REALLY doesn't like updating the ListViewAdapter if the ListView is not attached to a window... but we have ways of making it talk...
Comment 12 Jason Smith [MSFT] 2015-05-21 05:13:15 UTC
This should be fixed in the next release
Comment 13 Jason Smith [MSFT] 2015-05-21 05:14:18 UTC
Just to add, since this bug has been referenced by quite a few people in a variety of forums/posts/bugs. If you still experience your issue *after* this fix is released, please submit a new issue. This bug is about the specific reproduction case listed here.
Comment 14 Jason Smith [MSFT] 2015-05-27 19:01:14 UTC
*** Bug 27754 has been marked as a duplicate of this bug. ***
Comment 15 Parmendra Kumar 2015-06-22 09:43:43 UTC
I have checked this issue with xamarin.forms.1.4.3.6364-pre3 and its working fine at my end.

Hence closing this issue.

Screencast: http://www.screencast.com/t/atybqQ6UerM

Environment: 
Xamarin Studio  5.9.3 (build 1)
Mono 4.0.1 ((detached/ed1d3ec)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400010044
Xcode 6.2 (6776)
Xamarin.iOS: 8.10.1.64 (Enterprise Edition)
Xamarin.Android: 5.1.3.1 (Enterprise Edition)
Xamarin.Mac: 2.0.1.64 (Enterprise Edition)
Mac OS X 10.9.4