ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

#29: Restorable Fragments #135

Closed mdrlzy closed 2 years ago

mdrlzy commented 2 years ago

Issues covered: #29 #4

mdrlzy commented 2 years ago

This PR should also fix the app restoration after death in the background. To emulate this case you need to:

  1. Minimize the app

  2. Run: adb shell am kill space.taran.arknavigator

https://user-images.githubusercontent.com/85668474/143684877-329b1a1c-468f-4cc2-b220-840e33fc59aa.mp4

cnzqa commented 2 years ago

App gets crashed opening huge file: ark170.txt

App gets crashed when do faster scrool and click on tag: ark170(1).txt

mdrlzy commented 2 years ago

Not sure if these bugs are related to these changes. I have already created an issue for crashing when drawing a large bitmap. #139

Please create an issue for crash with fast scrolling.

cnzqa commented 2 years ago

Log is huge, because adding in as txt file.

Steps what we have here in video from @mdrlzy , crash app. Build 181

logFor153.txt

mdrlzy commented 2 years ago

This is expected behavior since build 181 is the main branch. java.lang.RuntimeException: Unable to start activity ComponentInfo{space.taran.arknavigator/space.taran.arknavigator.ui.activity.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment space.taran.arknavigator.ui.fragments.ResourcesFragment: could not find Fragment constructor

kirillt commented 2 years ago

@vedranqa are you sure this is build 181 (main branch)? I am not sure that I saw such an exception, but I haven't been testing fragments restoration for a while.

kirillt commented 2 years ago

@mdrlzy issue itself looks to be fixed, although I haven't been looking deeper.

What I noticed randomly is that we leave full-screen mode after screen rotation in Gallery view. This seems to be more relevant to #104, so posting this new problem there.

kirillt commented 2 years ago

Good job