HomerPlata
HomerPlata

Reputation: 1797

Strange graphics artefacts in Android app

I'm intermittently observing strange graphics artefacts in my app, as shown below. This is a screengrab from a Samsung Galaxy S3. I have only observed it on this particular phone. I have run the app on a Samsung Galaxy Tab S4 and an HTC One, and never observed this issue on either - although admittedly I do mainly use the S3 for development.

I considered that the issue might be some sort of concurrency clash in drawing to the Canvas (I'm using the basic Android rendering methods, no OpenGL or anything), since I can clearly recognise the repeating units of other UI elements, so I synchronized all the code which draws to or interacts with the Canvas and I'm still observing it happen.

It does clear itself up after around 30-90 seconds, which may be due to a regular scheduled memory cleanup operation it performs - so perhaps this is a manifestation of low available mem?

If I had enough rep I would stick a pretty big bounty on this. Any help appreciated. Hopefully someone recognises this particular problem.

Strange graphics artefacts

Upvotes: 5

Views: 336

Answers (1)

azizbekian
azizbekian

Reputation: 62189

Apply hardware layers:

setLayerType(View.LAYER_TYPE_HARDWARE, null);

Upvotes: 2

Related Questions