RadListView, fatal when items extends off screen

3 posts, 1 answers
  1. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 17 Jul Link to this post

    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)

     

     

  2. Answer
    Didi
    Admin
    Didi avatar
    40 posts

    Posted 19 Jul Link to this post

    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
  3. Paul
    Paul avatar
    11 posts
    Member since:
    May 2013

    Posted 19 Jul in reply to Didi Link to this post

    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.

     

Back to Top