This is a migrated thread and some comments may be shown as answers.

Exception when setting SideDrawer.MainContent on Android

1 Answer 55 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
Garrett
Top achievements
Rank 1
Garrett asked on 03 May 2018, 01:46 PM

Relevant System Information:

- Using .NETStandard 2.0 Library

- Compile using Android 7.1

- Miminum android version 4.0.3

- Target Android version 5.1

- Xamarin Forms 2.4.18342

- Telerik UI for Xamarin R1 2018

I am trying to set the MainContent of the SideDrawer in a similar fashion to the "tagit" application from Telerik. I am using a Listview in the sidedrawer to drive the view switching. Whenever I set the main content I get the following exception:

Type: Java.Lang.IllegalStateException

Message: The specified child already has a parent. You must call removeView() on the child's parent first.

UWP doesn't seem to have the same issue, just android. The weirdest part is that the main content seems to load just fine after the exception is handled. Does anybody else receive this error when setting the main content? 

 

1 Answer, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 08 May 2018, 12:32 PM
Hi Garrett,

I have checked the implementation of the TagIt app, and there the SideDrawer is declared using XAML and it contains a ListView. I have tried showing a SideDrawer which main content is a ListView but worked fine. Could you share more details about your exact scenario?

Regards,
Nikolay Demirev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SideDrawer
Asked by
Garrett
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
Share this question
or