Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lessons tab crashes in landscape mode(mobile) and tablets #2263

Closed
FareesHussain opened this issue Dec 15, 2020 · 0 comments · Fixed by #2264
Closed

Lessons tab crashes in landscape mode(mobile) and tablets #2263

FareesHussain opened this issue Dec 15, 2020 · 0 comments · Fixed by #2264
Assignees
Labels
Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@FareesHussain
Copy link
Contributor

FareesHussain commented Dec 15, 2020

Describe the bug
Lessons tab crash when switched to landscape.

To Reproduce
Steps to reproduce the behavior:

  1. Open Any Topic
  2. open on 'Lessons Tab'
  3. Change to Landscape mode
  4. App Crashes

Expected behavior
Should not crash on landscape mode

Screenshots
If applicable, add screenshots or videos to help explain your problem.

Device

  • Pixel 3a XL - emulator
  • SDK version - 19

Additional context

This crash is introduced in the PR #2104

error on crash

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.oppia.android, PID: 28818
    java.lang.IllegalStateException: Trying to bind incompatible data to adapter. Data class type: class org.oppia.android.app.model.ChapterSummary, expected adapter class type: class org.oppia.android.app.topic.lessons.ChapterSummaryViewModel.
        at org.oppia.android.app.recyclerview.BindableAdapter.setDataUnchecked(BindableAdapter.kt:62)
        at org.oppia.android.app.recyclerview.RecyclerViewBindingAdapter.bindToRecyclerViewAdapter(RecyclerViewBindingAdapter.java:68)
        at org.oppia.android.app.recyclerview.RecyclerViewBindingAdapter.bindToRecyclerViewAdapterWithoutLiveData(RecyclerViewBindingAdapter.java:38)
        at org.oppia.android.databinding.TopicLessonsStorySummaryBindingLandImpl.executeBindings(TopicLessonsStorySummaryBindingLandImpl.java:257)
        at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:473)
        at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:445)
        at androidx.databinding.ViewDataBinding$7.run(ViewDataBinding.java:197)
        at androidx.databinding.ViewDataBinding$8.doFrame(ViewDataBinding.java:291)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
        at android.view.Choreographer.doCallbacks(Choreographer.java:854)
        at android.view.Choreographer.doFrame(Choreographer.java:785)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:224)
        at android.app.ActivityThread.main(ActivityThread.java:7592)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
@FareesHussain FareesHussain self-assigned this Dec 15, 2020
@FareesHussain FareesHussain changed the title Lessons tab crashes in landscape mode Lessons tab crashes in landscape mode(mobile) and tablets Dec 15, 2020
BenHenning pushed a commit that referenced this issue Dec 23, 2020
…icLessonFragmentTest (#2264)

* fixing crashes

* Resolving requested changes

* fix ktlint check

* Added config change for espresso

* Adding requested tests
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-ibt Temporary label for Ben to keep track of issues he's triaged.
2 participants