elimu-ai / appstore

📲 Android application which downloads, installs and updates APK files stored on the elimu.ai platform.
MIT License
24 stars 7 forks source link

Bug: Blank screen when resuming application #240

Open nya-elimu opened 3 years ago

nya-elimu commented 3 years ago

After opening the application, then leaving it and returning, the list of applications are no longer visible. Fix this UI bug.

After initial launch:

device-2021-08-16-170033

After leaving app and returning:

device-2021-08-16-170128

Error stacktrace on Android 9:

2021-08-31 12:33:30.975 13575-16705/ai.elimu.appstore.debug E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2
    Process: ai.elimu.appstore.debug, PID: 13575
    android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
        at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:8031)
        at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1276)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at android.view.View.requestLayout(View.java:23120)
        at androidx.core.widget.NestedScrollView.requestLayout(NestedScrollView.java:1849)
        at android.view.View.requestLayout(View.java:23120)
        at androidx.recyclerview.widget.RecyclerView.requestLayout(RecyclerView.java:4412)
        at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:5541)
        at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:12253)
        at androidx.recyclerview.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:7354)
        at ai.elimu.appstore.ui.applications.ApplicationListActivity.lambda$onStart$0$ApplicationListActivity(ApplicationListActivity.java:74)

Slightly different error stacktrace on Android 7:


2021-08-31 15:19:13.936 31713-31772/ai.elimu.appstore.debug E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2
    Process: ai.elimu.appstore.debug, PID: 31713
    java.lang.IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling androidx.recyclerview.widget.RecyclerView{f89a623 VFED..... .F....ID 0,0-1504,4896 #7f09012d app:id/recycler_view}, adapter:ai.elimu.appstore.ui.applications.ApplicationListAdapter@f47fd20, layout:androidx.recyclerview.widget.LinearLayoutManager@786b6d9, context:ai.elimu.appstore.ui.applications.ApplicationListActivity@74a3a1d
        at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:3051)
        at androidx.recyclerview.widget.RecyclerView$RecyclerViewDataObserver.onChanged(RecyclerView.java:5536)
        at androidx.recyclerview.widget.RecyclerView$AdapterDataObservable.notifyChanged(RecyclerView.java:12253)
        at androidx.recyclerview.widget.RecyclerView$Adapter.notifyDataSetChanged(RecyclerView.java:7354)
        at ai.elimu.appstore.ui.applications.ApplicationListActivity.lambda$onStart$0$ApplicationListActivity(ApplicationListActivity.java:74)
nya-elimu commented 2 years ago

@arvind-1 Your $ELIMU 💎 token rewards: https://etherscan.io/tx/0x3fc9bcf7cd34bb2339893ae609bb9aa34a0526c932d18072da9a02f925e5cc0f