onyx-intl / OnyxAndroidDemo

148 stars 40 forks source link

Can't clear the "residual" artifacts from the screen using EpdController #78

Open vzukanov opened 2 years ago

vzukanov commented 2 years ago

When navigating between screens in the app, there are "residual" artifacts from the previous screens that remain visible. They look like pale shadows. I noticed the same artifacts when using Onyx demo app. Inside your tutorial app, if I go to Epd Demo screen and click on "Full Update", the screen refreshes and the artifacts from previous screens are deleted. Inside the code, I traced the execution path to this code inside EpdDemoActivity:

        } else if (v.equals(button_screen_refresh)) {
            updateTextView();
            EpdController.repaintEveryThing(UpdateMode.GC);
        }

So, I thought that a call to EpdController.repaintEveryThing(UpdateMode.GC) should do the trick in my app as well, but it wasn't the case. As far as I can see, this call has no effect at all.

I'm not sure how come the same API call works in one app, but doesn't work in another. I use exactly the same versions of SDKs:


    // Onyx SDKs
    implementation('com.onyx.android.sdk:onyxsdk-device:1.2.5')
    implementation('com.onyx.android.sdk:onyxsdk-pen:1.3.1')

So, how do I repaint the screen and remove "residual" artifacts in my app?