Multiwindow: Pop-up view (freeform window) shows scaled bitmap on S8 (or maybe other phones too)

I am developing an Android game and got across following issue. It happens only in freeform (pop-up view). Split screen works fine.
It concerns the main bitmap in one of the views (ImageView).
When testing on emulators everything is ok, properly scaled and works fine.
Nevertheless, ona real device (Samsung S8) the bitmap looks like scaled down to 75%.
Does anybody know how to either:
a) prevent it in the code to happen
b) if not possible a) than to find out during execution of the app that this happened and what is the scale down - is it 75% / 50% any other %

Thank you in advance for any hint.

I had the same issue in my development also. If there’s any concrete solution for this problem feel free to contact me.


I made the solution by calculating ScaleRatio from following values:
int displayDensity = metrics.densityDpi; // DisplayMetrics
int bitMapDensity = tempBitMap.getDensity(); // bitmap created in myView

This ScaleRatio I use for scaling drawing actions.