java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.View

Stack Overflow | BArtWell | 8 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    How to implement scrolling in RecyclerView on Android TV?

    Stack Overflow | 8 months ago | BArtWell
    java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.View

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.view.ViewRootImpl cannot be cast to android.view.View

      at ru.myapp.package.HorizontalPersistentFocusWrapper.requestChildFocus()
    2. ru.myapp.package
      HorizontalPersistentFocusWrapper.requestChildFocus
      1. ru.myapp.package.HorizontalPersistentFocusWrapper.requestChildFocus(HorizontalPersistentFocusWrapper.java:108)
      1 frame
    3. Android Platform
      View.requestFocus
      1. android.view.View.handleFocusGainInternal(View.java:5465)
      2. android.view.ViewGroup.handleFocusGainInternal(ViewGroup.java:714)
      3. android.view.View.requestFocusNoSearch(View.java:8470)
      4. android.view.View.requestFocus(View.java:8449)
      5. android.view.ViewGroup.requestFocus(ViewGroup.java:2747)
      6. android.view.View.requestFocus(View.java:8416)
      6 frames
    4. Android Support v4
      NestedScrollView.dispatchKeyEvent
      1. android.support.v4.widget.NestedScrollView.arrowScroll(NestedScrollView.java:1222)
      2. android.support.v4.widget.NestedScrollView.executeKeyEvent(NestedScrollView.java:551)
      3. android.support.v4.widget.NestedScrollView.dispatchKeyEvent(NestedScrollView.java:512)
      3 frames
    5. Android Platform
      ViewGroup.dispatchKeyEvent
      1. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1640)
      2. android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1640)
      2 frames