How to get device resolution

How to get device resolution

Annotation 2020-10-07 124402

Use these two blocks to get screen resolution.

which block… ??

See the images I’ve attached.

Those blocks won’t help.

Use this extension.

Screen resolution means width×height of a screen. How can you say that those blocks won’t help? We should not use extensions unnecessarily. :slight_smile:

This blocks will not show screen resolution in px

3 Likes

Screen resolution is width x height divided by screen size.

1 Like

I’m sorry. Thanks for the information. :sweat_smile:

2 Likes

See here (and watch the video):
https://developer.android.com/training/multiscreen/screendensities

and see also here:

1 Like