I am making a simple drawing app using the canvas. I am storing all the lines, the color of the lines and the thickness of the lines in three lists that I then use to recreate the drawing using a for-loop. This works pretty great because it makes it possible to edit drawings.
Now the problem/bug is this:
I use a list view to store all the user’s drawings and then when an item in the list is selected I use tiny_db to get the three lists I was talking about earlier and I then loop over the lists(s) and recreate the drawing on a canvas. Now I am experiencing a really strange bug. The first time I click on an item (after an app restart) in the list view it shows the canvas but no lines are shown, now the strange part if I go back (I have a back button in the app) and click on the same item in the list the canvas is shown and all of the lines are there (in the correct color and so on)!! Why is this happening! If it would never load it would obviously be a block-bug but it only happens the first time a drawing is opened. After the first drawing is opened and doesn’t load everything loads perfectly but it is always the first drawing that doesn’t load.
This seems to be more of a bug with a component and less of a bug caused by my blocks.
I have tested this on both the companion and as an installed app. I use android 8.0 on an Onplus 3t.
It might be a bit problematic for me to share my blocks since this is quite a big application other features besides the drawing functionality.