This is a migrated thread and some comments may be shown as answers.
RadListView, fatal when items extends off screen
4 Answers 31 Views
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 17 Jul 2018, 10:52 PM

Am I misusing the RadListView? 

 

Starting from a telerix xamarin ui project, default options, .net 4.6.1

upgrade to latest stable (though I think it fatals the same way without that)

  xamarin.android.support.* are v27.0.2.1
  xamarin.forms v3.1.0.637273

Plug in the replacement MainPage.xaml and MagePage.xaml.cs linked here on pastebin .

 

MainPage.xaml = https://pastebin.com/SrrV7Dab
MainPage.xaml.cs = https://pastebin.com/AuPdajQw

run it.. . click the "Fill Lists" button. which will fill the listview with 20 strings.

And updates the statusLabel string.

so long as there are enough elements in the listView to extend off the screen (might take a few more clicks on windows for example).. it will then fatal.

 

If I use ListView instead of RadListView, it no longer fatals on either platform.

On Android, it also needs me to update the statusLabel text property before it fatals for some reason.

 

Java.Lang.IllegalArgumentException: <Timeout exceeded getting exception details>

07-17 17:22:44.298 E/AndroidRuntime( 7915): FATAL EXCEPTION: main
07-17 17:22:44.298 E/AndroidRuntime( 7915): Process: TelerikXamarinApp1.Android, PID: 7915
07-17 17:22:44.298 E/AndroidRuntime( 7915): java.lang.IllegalArgumentException: Tmp detached view should be removed from RecyclerView before it can be recycled: ViewHolder{fae82c5 position=12 id=-1955347204, oldPos=-1, pLpos:-1 tmpDetached no parent}
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.RecyclerView$Recycler.recycleViewHolderInternal(RecyclerView.java:5748)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.RecyclerView.removeAnimatingView(RecyclerView.java:1305)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:11775)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:12275)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.SimpleItemAnimator.dispatchAddFinished(SimpleItemAnimator.java:289)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v7.widget.DefaultItemAnimator$5.onAnimationEnd(DefaultItemAnimator.java:242)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd(ViewPropertyAnimatorCompatJB.java:51)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1121)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1149)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1309)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.animation.AnimationHandler.-wrap2(AnimationHandler.java)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:925)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.view.Choreographer.doCallbacks(Choreographer.java:702)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.view.Choreographer.doFrame(Choreographer.java:635)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.os.Handler.handleCallback(Handler.java:751)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.os.Handler.dispatchMessage(Handler.java:95)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.os.Looper.loop(Looper.java:154)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at android.app.ActivityThread.main(ActivityThread.java:6682)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at java.lang.reflect.Method.invoke(Native Method)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
07-17 17:22:44.298 E/AndroidRuntime( 7915): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

 

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 19 Jul 2018, 07:57 AM
Hi Paul,

Thank you for the provided links.

I have created an example with the provided code from the links and I reproduced the issue on Android. The exception is thrown when HeightRequest and VerticalOptions FillAndExpand are set to the ListView and StackLayout is used. At the moment, suitable workaround I could suggest is using the RadListView inside a Grid layout. Please take a look at the attached project with all the corrections that needs to be done.

I have logged this in our Feedback portal and you could follow the item on the provided link below:
https://feedback.telerik.com/Project/168/Feedback/Details/254379-listview-android-listview-with-heightrequest-and-verticaloptions-fillandexpand

You can find your Telerik points updated for this report.

Regards,
Didi
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
0
Paul
Top achievements
Rank 1
answered on 19 Jul 2018, 05:05 PM

Thanks a lot for the analysis.

I've been poking at it from all different angles for a while now trying to decide what I did wrong.. haha.

 

0
n/a
Top achievements
Rank 1
answered on 29 Oct 2018, 10:45 AM

Hi, I recently get Crash from app with following error:

java.lang.IllegalArgumentException: Tmp detached view should be removed from RecyclerView before it can be recycled: ViewHolder{77c5ecc position=4 id=1007443866, oldPos=-1, pLpos:-1 tmpDetached no parent} md5a5af569a83c1a3f5c3a8a63bd7d39860.RadExtendedListView{d2947bb VFED..... ......ID 0,0-700,1232}, adapter:com.telerik.widget.list.ListViewWrapperAdapter@ebd4b47, layout:android.support.v7.widget.LinearLayoutManager@36757a1, context:pl.maciosoft.spedtrans.Android.MainActivity@2f87a1e

 

But I don't use HeightRequest for ListView.

How can I troubleshhot this issue?

It is not serious problem, it happens from time to time.

0
Lance | Manager Technical Support
Telerik team
answered on 29 Oct 2018, 02:44 PM
Hi Maciej,

Make sure the RadListView is not in a container that measures to infinity (Grid with a RowDefinition of Auto, StackLayout, ScrollView etc). An example of a good parent container is a Grid, which has definitive measurements for the boundaries in the RowDefinitions with star measurements (*, 2*, 3*, etc).

If you continue to see this issue, try replacing the parent layout.

Regards,
Lance | Tech Support Engineer, Sr.
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
Asked by
Paul
Top achievements
Rank 1
Answers by
Didi
Telerik team
Paul
Top achievements
Rank 1
n/a
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or