This is a weird one, which is making me tear my hair out. I have a page which displays a user's profile. The top half is labels and an imageview, belows a toolbar, with two items to move backwards and forwards through the list (swiping is used for something else, and this inner part of the display is a page within a tabstripcontoller).
The main part of the profile is html (so that users can use markdown to create them), displayed in a webview. And below that is a nav bar.
When the user taps to move from one profile to another, all the views are reused, with the content for the next profile loaded in. And most of the time this works perfectly. EXCEPT... on my Android 8 device (but not the slower Android 6 one) some profiles, typically the shorter ones, cause lots of the other views to vanish when the HTML is loaded. Everything loads, as it ought to, and then it just vanishes.
I've checked and if I simply never change the HTML, everything else is fine. I've tried loading the HTML directly, or saving it to a file and using loadurl instead.
The first screen shows what a profile's supposed to look like. The second shows what happens sometimes - only sometimes - after updating the content in the webview. Moving to another profile renders everything correctly again.
I can also partly solve the problem by calling .bringToFront on most of the views (but the navbar won't play ball). And note too that the border on the shift buttons has also, somehow, been removed, despite there being no code that addresses that anywhere in the app.
There no code that uses sendToBack on those views; there's nothing happening after the webview is updated, beyond turning the progress indicator off. So what about a webview could make this happen?
The main part of the profile is html (so that users can use markdown to create them), displayed in a webview. And below that is a nav bar.
When the user taps to move from one profile to another, all the views are reused, with the content for the next profile loaded in. And most of the time this works perfectly. EXCEPT... on my Android 8 device (but not the slower Android 6 one) some profiles, typically the shorter ones, cause lots of the other views to vanish when the HTML is loaded. Everything loads, as it ought to, and then it just vanishes.
I've checked and if I simply never change the HTML, everything else is fine. I've tried loading the HTML directly, or saving it to a file and using loadurl instead.
The first screen shows what a profile's supposed to look like. The second shows what happens sometimes - only sometimes - after updating the content in the webview. Moving to another profile renders everything correctly again.
I can also partly solve the problem by calling .bringToFront on most of the views (but the navbar won't play ball). And note too that the border on the shift buttons has also, somehow, been removed, despite there being no code that addresses that anywhere in the app.
There no code that uses sendToBack on those views; there's nothing happening after the webview is updated, beyond turning the progress indicator off. So what about a webview could make this happen?