I need to know when the listview has scrolled past the first item in the list.
I am currently looking at the native renderer events for scrolling and although I am using a custom renderer they are not fired.
How can I hook into the scroll events?
Thanks for the help,
John
Good Day
The imageEditor after loading the image , other Toolbar items work nicely but the cropping which put a cross on the centre of the image. crashes when you try to adjust the image with an error
Unhandled Exception:
System.ArgumentException: An item with the same key has already been added. Key: 0
Thanks
Hi there,
I have a question regarding pie chart redrawing. I am not sure if it works, but is it possible to dynamically update the values of an existing pie chart?
I was able to display the chart when page started(image1 in attach files). I am trying to trigger an event through Xamarin Picker and update the number of the same chart.I was able to change the variable(an ObservableCollection), but the chart never changed.
Is there anything I missed?
I am using RadSlideView in my project. It contains of ContentViews each of them is RelativeLayout with some content. Previously I was using "RelativeToParent" constraing, but now I need to use "RelativeToView". If I use RelativeToView constaint, I have this exception: "System.ArgumentNullException: 'Value cannot be null. Parameter name: key'. This exception occurs only when I place my relative layout inside the SlideVIew and use RelativeToView constraint.
In this case exception occurs:
<
telerikPrimitives:RadSlideView
>
<
telerikPrimitives:RadSlideView.ItemsSource
>
<
x:Array
Type
=
"{x:Type ContentView}"
>
<
ContentView
>
<
RelativeLayout
>
<
Label
x:Name
=
"lbl"
Text
=
"RelativeLayout"
RelativeLayout.XConstraint = "{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Width
,
Factor
=
0
.5, Constant=-50}"
RelativeLayout.YConstraint = "{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Height
,
Factor
=
0
.5, Constant=-150}" />
<
BoxView
Color
=
"Blue"
RelativeLayout.XConstraint = "{ConstraintExpression
Type
=
RelativeToView
,
ElementName
=
lbl
,
Property
=
X
,
Factor
=
1
, Constant=-30}"
RelativeLayout.YConstraint = "{ConstraintExpression
Type
=
RelativeToView
,
ElementName
=
lbl
,
Property
=
Y
,
Factor
=
1
,
Constant
=
30
}"
RelativeLayout.WidthConstraint
=
"150"
RelativeLayout.HeightConstraint
=
"100"
/>
</
RelativeLayout
>
</
ContentView
>
</
x:Array
>
</
telerikPrimitives:RadSlideView.ItemsSource
>
</
telerikPrimitives:RadSlideView
>
In this case everything is okay (I don't place RelativeLayout into the RadSlideVIew):
<
RelativeLayout
>
<
Label
x:Name
=
"lbl"
Text
=
"RelativeLayout"
RelativeLayout.XConstraint = "{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Width
,
Factor
=
0
.5, Constant=-50}"
RelativeLayout.YConstraint = "{ConstraintExpression
Type
=
RelativeToParent
,
Property
=
Height
,
Factor
=
0
.5, Constant=-150}" />
<
BoxView
Color
=
"Blue"
RelativeLayout.XConstraint = "{ConstraintExpression
Type
=
RelativeToView
,
ElementName
=
lbl
,
Property
=
X
,
Factor
=
1
, Constant=-30}"
RelativeLayout.YConstraint = "{ConstraintExpression
Type
=
RelativeToView
,
ElementName
=
lbl
,
Property
=
Y
,
Factor
=
1
,
Constant
=
30
}"
RelativeLayout.WidthConstraint
=
"150"
RelativeLayout.HeightConstraint
=
"100"
/>
</
RelativeLayout
>
I was evaluating the Xamarin.Forms controls and tried to build a testgrid with a template column.
The column contains an imagebutton with bound IsVisible property.
The grid renders correct but as soon as you start scrolling the grid the invisible imagebuttons go wild and start to get visible.
Image 1 is before scrolling up and down a few times.
Image 2 is after scrolling.
This happens on all platforms (ios,android,uwp)
XAML:
<
telerikGrid:RadDataGrid
Grid.Row
=
"1"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"3"
UserEditMode
=
"None"
UserFilterMode
=
"Disabled"
UserGroupMode
=
"Disabled"
UserSortMode
=
"None"
ItemsSource
=
"{Binding Contract.ContractEntries}"
AutoGenerateColumns
=
"False"
GridLinesThickness
=
"1"
GridLinesColor
=
"Black"
>
<
telerikGrid:RadDataGrid.Columns
>
<
telerikGrid:DataGridTemplateColumn
SizeMode
=
"Fixed"
Width
=
"60"
CanUserSort
=
"False"
CanUserFilter
=
"False"
CanUserGroup
=
"False"
>
<
telerikGrid:DataGridTemplateColumn.HeaderStyle
>
<
telerikGrid:DataGridColumnHeaderStyle
OptionsButtonTextColor
=
"Transparent"
BorderColor
=
"#D9D9D9"
BorderThickness
=
"1"
/>
</
telerikGrid:DataGridTemplateColumn.HeaderStyle
>
<
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
<
DataTemplate
>
<
ImageButton
HeightRequest
=
"15"
WidthRequest
=
"15"
Source
=
"edit.png"
IsVisible
=
"{Binding Editable}"
Command
=
"{Binding EntryOnClick}"
/>
</
DataTemplate
>
</
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
</
telerikGrid:DataGridTemplateColumn
>
<
telerikGrid:DataGridNumericalColumn
PropertyName
=
"Count"
SizeMode
=
"Auto"
>
<
telerikGrid:DataGridNumericalColumn.HeaderStyle
>
<
telerikGrid:DataGridColumnHeaderStyle
OptionsButtonTextColor
=
"Transparent"
BorderColor
=
"#D9D9D9"
BorderThickness
=
"1"
/>
</
telerikGrid:DataGridNumericalColumn.HeaderStyle
>
</
telerikGrid:DataGridNumericalColumn
>
<
telerikGrid:DataGridTextColumn
PropertyName
=
"Title"
SizeMode
=
"Stretch"
>
<
telerikGrid:DataGridTextColumn.HeaderStyle
>
<
telerikGrid:DataGridColumnHeaderStyle
OptionsButtonTextColor
=
"Transparent"
BorderColor
=
"#D9D9D9"
BorderThickness
=
"1"
/>
</
telerikGrid:DataGridTextColumn.HeaderStyle
>
</
telerikGrid:DataGridTextColumn
>
<
telerikGrid:DataGridNumericalColumn
SizeMode
=
"Auto"
PropertyName
=
"Price"
CellContentFormat
=
"{}{0:C2}"
>
<
telerikGrid:DataGridNumericalColumn.HeaderStyle
>
<
telerikGrid:DataGridColumnHeaderStyle
OptionsButtonTextColor
=
"Transparent"
BorderColor
=
"#D9D9D9"
BorderThickness
=
"1"
/>
</
telerikGrid:DataGridNumericalColumn.HeaderStyle
>
</
telerikGrid:DataGridNumericalColumn
>
</
telerikGrid:RadDataGrid.Columns
>
</
telerikGrid:RadDataGrid
>
Hi!
Here is my example application: https://drive.google.com/open?id=1HtD5CNjyibRtnQ6dVikYpvuluGgeLEyF
I have a MasterDetailPage as default MainPage.
There is a RadListView in the MenuPage, and a Button in the DetailPage.
When the Button is clicked, it will set MainPage to a new ContentPage( e.g. Application.Current.MainPage = new NewMainPage(); ), then an unhandled exception occcured.
How to fix this problem?
Unhandled Exception:
05-28 03:40:38.649 D/Mono ( 1267): Loading reference 6 of Mono.Android.dll asmctx DEFAULT, looking for System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
05-28 03:40:38.649 D/Mono ( 1267): Image addref System.Runtime.Serialization[0x8456d220] (asmctx DEFAULT) -> System.Runtime.Serialization.dll[0x83ca4e00]: 2
05-28 03:40:38.650 D/Mono ( 1267): Prepared to set up assembly 'System.Runtime.Serialization' (System.Runtime.Serialization.dll)
05-28 03:40:38.650 D/Mono ( 1267): Assembly System.Runtime.Serialization[0x8456d220] added to domain RootDomain, ref_count=1
05-28 03:40:38.650 D/Mono ( 1267): AOT: image 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "System.Runtime.Serialization.dll.so" not found
05-28 03:40:38.650 D/Mono ( 1267): AOT: image '/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/aot-cache/x86/System.Runtime.Serialization.dll.so" not found
05-28 03:40:38.650 D/Mono ( 1267): Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
05-28 03:40:38.650 D/Mono ( 1267): Config attempting to parse: '/Users/builder/jenkins/workspace/xamarin-android-d16-1/xamarin-android/external/mono/sdks/out/android-x86-release/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
05-28 03:40:38.650 D/Mono ( 1267): Assembly Ref addref Mono.Android[0x9cd41220] -> System.Runtime.Serialization[0x8456d220]: 2
05-28 03:40:38.650 D/Mono ( 1267): Loading reference 0 of System.Runtime.Serialization.dll asmctx DEFAULT, looking for mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
05-28 03:40:38.650 D/Mono ( 1267): Assembly Ref addref System.Runtime.Serialization[0x8456d220] -> mscorlib[0x9cd3f4e0]: 73
Loaded assembly: System.Runtime.Serialization.dll [External]
Unhandled Exception:
System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d).
05-28 03:40:40.602 D/Mono ( 1267): DllImport attempting to load: '/system/lib/liblog.so'.
05-28 03:40:40.603 D/Mono ( 1267): DllImport loaded library '/system/lib/liblog.so'.
05-28 03:40:40.603 D/Mono ( 1267): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
05-28 03:40:40.603 D/Mono ( 1267): Searching for '__android_log_print'.
05-28 03:40:40.603 D/Mono ( 1267): Probing '__android_log_print'.
05-28 03:40:40.603 D/Mono ( 1267): Found as '__android_log_print'.
05-28 03:40:40.605 I/MonoDroid( 1267): UNHANDLED EXCEPTION:
05-28 03:40:40.606 I/MonoDroid( 1267): System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
05-28 03:40:40.606 I/MonoDroid( 1267): --- End of inner exception stack trace ---
05-28 03:40:40.606 I/MonoDroid( 1267): at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.606 I/MonoDroid( 1267): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.606 I/MonoDroid( 1267): --- End of inner exception stack trace ---
05-28 03:40:40.606 I/MonoDroid( 1267): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00182] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.606 I/MonoDroid( 1267): at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000c1] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.606 I/MonoDroid( 1267): at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Android.Views.View.get_Parent () [0x0001f] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].UpdateParentPageTraversalOrder () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:399
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00116] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:369
05-28 03:40:40.607 I/MonoDroid( 1267): at (wrapper delegate-invoke) <
Module
>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:211
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00094] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:210
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:335
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.ViewCell.set_View (Xamarin.Forms.View value) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\Cells\ViewCell.cs:25
05-28 03:40:40.607 I/MonoDroid( 1267): at Telerik.XamarinForms.DataControlsRenderer.Android.FormsListViewDataSourceAdapterBase.ClearCachedViews () [0x0003d] in <
54bca44b8fc84b77a4760736d165085c
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.ClearCachedViews () [0x00000] in <
54bca44b8fc84b77a4760736d165085c
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.Dispose (System.Boolean disposing) [0x00003] in <
54bca44b8fc84b77a4760736d165085c
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer.OnElementDetached (Telerik.XamarinForms.DataControls.RadListView oldElement) [0x0003c] in <
54bca44b8fc84b77a4760736d165085c
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Telerik.XamarinForms.Common.Android.AndroidRendererBase`2[S,T].Dispose (System.Boolean disposing) [0x0002d] in <
4164515d6fbe493ba6368ab0a3de92cc
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:312
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.Dispose (System.Boolean disposing) [0x0000a] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:1280
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:312
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.PageRenderer.Dispose (System.Boolean disposing) [0x00011] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:44
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.MasterDetailContainer.DisposeChildRenderers () [0x0000b] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:114
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00009] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:91
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00076] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:152
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (System.Boolean disposing) [0x00095] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:233
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Object.Dispose () [0x00000] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.AppCompat.Platform.Cleanup (System.Collections.Generic.List`1[T] viewsToRemove, System.Collections.Generic.List`1[T] renderersToDispose) [0x00036] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:338
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal (Xamarin.Forms.Page newRoot) [0x000b9] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:322
05-28 03:40:40.607 I/MonoDroid( 1267): at Xamarin.Forms.Platform.Android.AppCompat.Platform+<>c__DisplayClass36_0.<
SetPage
>b__0 () [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:269
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:40.607 I/MonoDroid( 1267): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
05-28 03:40:40.611 W/zygote ( 1267): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
05-28 03:40:40.613 D/Mono ( 1267): DllImport searching in: '__Internal' ('(null)').
05-28 03:40:40.613 D/Mono ( 1267): Searching for 'java_interop_jnienv_throw'.
05-28 03:40:40.613 D/Mono ( 1267): Probing 'java_interop_jnienv_throw'.
05-28 03:40:40.613 D/Mono ( 1267): Found as 'java_interop_jnienv_throw'.
Unhandled Exception:
System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d).
05-28 03:40:41.142 E/mono ( 1267):
05-28 03:40:41.142 E/mono ( 1267): Unhandled Exception:
05-28 03:40:41.142 E/mono ( 1267): System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
05-28 03:40:41.142 E/mono ( 1267): --- End of inner exception stack trace ---
05-28 03:40:41.142 E/mono ( 1267): at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:41.142 E/mono ( 1267): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:41.142 E/mono ( 1267): --- End of inner exception stack trace ---
05-28 03:40:41.142 E/mono ( 1267): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
05-28 03:40:41.142 E/mono ( 1267): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
05-28 03:40:41.142 E/mono-rt ( 1267): [ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Unable to activate instance of type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer from native handle 0x69 (key_handle 0xb8b115d). ---> System.MissingMethodException: No constructor found for Telerik.XamarinForms.DataControlsRenderer.Android.ListView.TemplateCellContainer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
05-28 03:40:41.142 E/mono-rt ( 1267): --- End of inner exception stack trace ---
05-28 03:40:41.142 E/mono-rt ( 1267): at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:41.142 E/mono-rt ( 1267): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <
a6696dd5fce04f5480364911ef1529f2
>:0
05-28 03:40:41.142 E/mono-rt ( 1267): --- End of inner exception stack trace ---
05-28 03:40:41.142 E/mono-rt ( 1267): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
05-28 03:40:41.142 E/mono-rt ( 1267): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.80(intptr,intptr)
05-28 03:40:41.143 D/ ( 1267): HostConnection::get() New Host Connection established 0x8407c540, tid 1267
Hi,
Having used the demo app, I am now trying to add the RadPdfViewer control only to my solution. I am following these instructions (https://docs.telerik.com/devtools/xamarin/controls/pdfviewer/pdfviewer-getting-started).
I initially tried the NuGet package but ran into an "error MSB6006: "java.exe" exited with code 2." situation. I tried increasing the java max heap size passed my current value of 1G, but this did not get resolved.
I then tried the manual DLL reference method, however upon building the solution, I run into the following error :-
error: package com.telerik.android.common does not exist
Therefore, from the list of DLLs for the Android project, it seems like Telerik.Xamarin.Android.Common.dll is missing.
I then reference Telerik.Xamarin.Android.Common.dll and although I am now able to build the solution, I run into the following exception when trying to navigate to a page that contains the RadPdfViewer control :-
NativeResourceProvider.ToPlatformPixels (System.Double dip)
System.TypeInitializationException: Exception of type 'System.Exception' was thrown
Am I missing some additional references?
As a side note, is there a way to fix the "error MSB6006: "java.exe" exited with code 2." when using the NuGet package, as this would ideally be my preference.
Hi. When i close this page, I get a NullReferenceException. Appeared after upgrading to 4.0. If I use ListView, then the problem disappears. If I will not add children to baseGrid, then the problem disappears. Please, help me.
using App.Models.ModelsJsonForMethods;
using System;
using System.Collections.ObjectModel;
using Telerik.XamarinForms.DataControls;
using Telerik.XamarinForms.DataControls.ListView;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace App.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class Page1 : ContentPage
{
RadListView listView;
ObservableCollection<ImportanceInfo> listInfo = new ObservableCollection<ImportanceInfo>();
public Page1()
{
InitializeComponent();
Refresh();
}
private void Refresh()
{
listView = new RadListView
{
ItemsSource = listInfo,
ItemTemplate = new DataTemplate(() =>
{
Label stageLabel = new Label();
stageLabel.HorizontalOptions = LayoutOptions.Center;
stageLabel.VerticalOptions = LayoutOptions.Center;
stageLabel.Margin = new Thickness(15, 0, 0, 0);
stageLabel.FontSize = 18;
stageLabel.SetBinding(Label.TextProperty, new Binding(nameof(ImportanceInfo.StatusName)));
Label briefInformationLabel = new Label();
briefInformationLabel.HorizontalOptions = LayoutOptions.Start;
briefInformationLabel.VerticalOptions = LayoutOptions.Center;
briefInformationLabel.FontSize = 18;
briefInformationLabel.SetBinding(Label.TextProperty, new Binding(nameof(ImportanceInfo.CommentText)));
Label dateLabel = new Label();
dateLabel.HorizontalOptions = LayoutOptions.Center;
dateLabel.VerticalOptions = LayoutOptions.Center;
dateLabel.FontSize = 18;
dateLabel.SetBinding(Label.TextProperty, new Binding(nameof(ImportanceInfo.DateSession)));
Grid grid = new Grid
{
RowDefinitions =
{
new RowDefinition { Height = new GridLength(1, GridUnitType.Star) },
},
ColumnDefinitions =
{
new ColumnDefinition { Width = new GridLength(0.3, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(0.5, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(0.2, GridUnitType.Star) },
},
ColumnSpacing = 3,
RowSpacing = 3
};
grid.Children.Add(stageLabel, 0, 0);
grid.Children.Add(briefInformationLabel, 1, 0);
grid.Children.Add(dateLabel, 2, 0);
return new ListViewTemplateCell
{
View = grid
};
})
};
StackLayout layout = new StackLayout
{
Spacing = 0
};
Grid baseGrid = new Grid
{
RowDefinitions =
{
new RowDefinition { Height = 56 },
},
ColumnDefinitions =
{
new ColumnDefinition { Width = new GridLength(0.3, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(0.5, GridUnitType.Star) },
new ColumnDefinition { Width = new GridLength(0.2, GridUnitType.Star) }
}
};
baseGrid.Children.Add(new Label { Text = "Stage" }, 0, 0);
baseGrid.Children.Add(new Label { Text = "Info" }, 1, 0);
baseGrid.Children.Add(new Label { Text = "Date" }, 2, 0);
layout.Children.Add(baseGrid);
layout.Children.Add(listView);
ImportanceInfo x = new ImportanceInfo();
x.CommentText = "111";
x.ShortText = "222";
x.Unid = "000";
x.StatusName = "333";
x.DateSession = DateTime.Now.ToString();
listInfo.Add(x);
this.Content = layout;
}
}
}
StackTrace:
at Xamarin.Forms.Platform.Android.PageRenderer.Xamarin.Forms.Platform.Android.IOrderedTraversalController.UpdateTraversalOrder () [0x000ea] in <9392e6d0fb4f4401a79989cd08844170>:0
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].UpdateParentPageTraversalOrder () [0x00025] in <9392e6d0fb4f4401a79989cd08844170>:0
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00116] in <9392e6d0fb4f4401a79989cd08844170>:0
at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:211
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353
at Xamarin.Forms.Element.set_Parent (Xamarin.Forms.Element value) [0x00094] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:210
at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:335
at Xamarin.Forms.ViewCell.set_View (Xamarin.Forms.View value) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\Cells\ViewCell.cs:25
at Telerik.XamarinForms.DataControlsRenderer.Android.ListView.CellContainerBase.Dispose (System.Boolean disposing) [0x00034] in <aace7404487f477ba4b06b1a101e6de8>:0
at Java.Lang.Object.Dispose () [0x00000] in <ff9f3f3d4e134974a889db1b532c9b6e>:0
at Telerik.XamarinForms.DataControlsRenderer.Android.FormsListViewDataSourceAdapterBase.ClearCachedViews () [0x00023] in <aace7404487f477ba4b06b1a101e6de8>:0
at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.ClearCachedViews () [0x00000] in <aace7404487f477ba4b06b1a101e6de8>:0
at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.Dispose (System.Boolean disposing) [0x00003] in <aace7404487f477ba4b06b1a101e6de8>:0
at Java.Lang.Object.Dispose () [0x00000] in <ff9f3f3d4e134974a889db1b532c9b6e>:0
at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer.OnElementDetached (Telerik.XamarinForms.DataControls.RadListView oldElement) [0x0003c] in <aace7404487f477ba4b06b1a101e6de8>:0
at Telerik.XamarinForms.Common.Android.AndroidRendererBase`2[S,T].Dispose (System.Boolean disposing) [0x0001f] in <061fdf8718854839bc5c73d56b04eafa>:0
at Java.Lang.Object.Dispose () [0x00000] in <ff9f3f3d4e134974a889db1b532c9b6e>:0
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in <9392e6d0fb4f4401a79989cd08844170>:0
at Xamarin.Forms.Platform.Android.Platform+DefaultRenderer.Dispose (System.Boolean disposing) [0x0000a] in <9392e6d0fb4f4401a79989cd08844170>:0
at Java.Lang.Object.Dispose () [0x00000] in <ff9f3f3d4e134974a889db1b532c9b6e>:0
at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x000a4] in <9392e6d0fb4f4401a79989cd08844170>:0
at Xamarin.Forms.Platform.Android.PageRenderer.Dispose (System.Boolean disposing) [0x00011] in <9392e6d0fb4f4401a79989cd08844170>:0
at Java.Lang.Object.Dispose () [0x00000] in <ff9f3f3d4e134974a889db1b532c9b6e>:0
at Xamarin.Forms.Platform.Android.AppCompat.FragmentContainer.OnDestroyView () [0x0003c] in <9392e6d0fb4f4401a79989cd08844170>:0
at Android.Support.V4.App.Fragment.n_OnDestroyView (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <96541ba8a6104b52aadf4218488f978c>:0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.52(intptr,intptr)