Suppose you have developed you app layout for 320 pixels width. If users are using your app on other small or large viewport then your app’s UI may break down. In this case you can actually virtualize the viewport width to 320px. For example: if width of device is 640px, you can make 2 viewport pixel equal to 1 viewport pixel and therefore prevent your app from breaking down.
We can do this with just one line of code.
//1. Viewport virtual width in portrait orientation.
//2. Viewport virtual width in landscape orientation.