Bug 37487 - Nested ListView throws exception
Summary: Nested ListView throws exception
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-07 18:35 UTC by Cody Beyer (MSFT)
Modified: 2017-12-04 22:51 UTC (History)
5 users (show)

Tags: ac, android, listview, listviewadapter
Is this bug a regression?: ---
Last known good build:


Attachments
sample project (244.68 KB, application/zip)
2017-12-04 22:29 UTC, David Ortinau [MSFT]
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 for Bug 37487 on Developer Community or GitHub 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 or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Cody Beyer (MSFT) 2016-01-07 18:35:40 UTC
### Description

The following app demonstrates an error where a nested list view will throw an exception upon finishing scroll

### Sample

https://www.dropbox.com/s/1duzhw385st5x04/BalaKrishnan%20Srinivasan%20-%20XamarinFormApp.zip?dl=0

### Error

https://gist.github.com/CodyBeyer/5b05ca98619fb647da2e

### Steps to Reproduce

1. Download Sample
2. Deploy to Android Emulator
3. Scroll to bottom of view

### Expected Results

Scroll to bottom of view occurs

### Actual Results

Above linked error is thrown

### Versions

=== Xamarin Studio ===

Version 5.10.2 (build 49)
Installation UUID: 93ea852c-e632-46b7-9e0d-3856a02bc61e
Runtime:
	Mono 4.2.2 (explicit/7b87787)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020010

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.0.1.5 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.12 (Business Edition)
Hash: 78c6cd3
Branch: master
Build date: 2015-12-17 18:29:42-0500

=== Xamarin.Mac ===

Version: 2.4.1.5 (Business Edition)

=== Build Information ===

Release ID: 510020049
Git revision: deed4cd240ff3611c8742bbc62296e207f46173d
Build date: 2015-12-17 11:13:36-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.11.2
Darwin Codys-Mac.local 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 1 Balakrishnan 2016-01-08 16:27:30 UTC
Is there any workaround to over come this issue.
Comment 2 Balakrishnan 2016-01-08 17:44:08 UTC
I tried to use XLabs Gridview within ListView to overcome this issue but in that also I am seeing the same error.
It is working fine in IOS but App crashed in Android.
Comment 3 Alpesh 2016-01-11 16:07:56 UTC
Hello,

Any update on this? It's a critical issue for us and preventing us from launching a beta.

Thanks,
Alpesh
Comment 4 Balakrishnan 2016-01-28 17:43:01 UTC
Is there any workaround or fix available?
Comment 5 David Ortinau [MSFT] 2017-12-04 22:29:14 UTC
Confirmed this is still an issue on 2.5.1.102606-nightly.

Here's the error:

Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbfe6f58c (key_handle 0xdbd2ceb).

{System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
   --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in <e975227ac8644a30bb0866117325de0d>:0 
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in <e975227ac8644a30bb0866117325de0d>:0 }
Comment 6 David Ortinau [MSFT] 2017-12-04 22:29:47 UTC
Created attachment 25906 [details]
sample project

This is the same sample project, attached here for convenience
Comment 7 David Ortinau [MSFT] 2017-12-04 22:51:26 UTC
The better pattern to solve this particular UI is to use a ListView with grouping. 

https://developer.xamarin.com/samples/xamarin-forms/UserInterface/ListView/Grouping/