I am creating a new hardware profile in an attempt to make an emulator for the Galaxy S8 / S8 +. I set the screen size to 5.8 / 6.2 inches (depending on whether S8 or S8 +, despite the fact that this does not affect the emulator) and the screen resolution up to 1440 x 2960, like the device. The emulator does not look like on a real device. Testing my application on a real S8 + shows that it is poorly laid out, but on the emulator it looks relatively organized, and I noticed that it uses sizes for my Nexus 6 emulator (xxxhdpi). Currently, the dimensions of the values used are not very important, because I'm glad to end Nexus 6, given that it no longer works.
So, I add the code to my launcher Java class, which gets the emulator sizes, this is what I get from my S8 emulator: {density=3.5, width=1440, height=2792, scaledDensity=3.5, xdpi=560.0, ydpi=560.0} Besides the fact that the height says 2792 instead of 2960 (I assume this should happen), I think I see a problem - the density is 3.5. As expected, this is the same density as the Nexus 6. So, the emulator that I create is not for the Galaxy S8, and this can be seen in my comparison with the real S8 +, which distorted my application in a distorted way. As far as I know, the Galaxy S8 has a density of 4, not 3.5. The IDE says the device has 560 dpi. Now I need to create an emulator with a density of 4 and the same specifications as me. How can i do this? How can I check the Galaxy S8 without using the real thing? There is no pre-configured emulator for this device provided by the IDE.
Thank you very much in advance.
android android-studio screen-density screen galaxy
4u53r
source share