Quick search

Table Of Contents


This module changes some environment and configuration variables to match the density / dpi / screensize of a specific device.

To see a list of the available screenid’s, just run:

python -m screen

To simulate a medium-density screen such as the Motorola Droid 2:

python -m screen:droid2

To simulate a high-density screen such as HTC One X, in portrait:

python -m screen:onex,portrait

To simulate the iPad 2 screen:

python -m screen:ipad

If the generated window is too large, you can specify a scale:

python -m screen:note2,portrait,scale=.75

Note that to display your contents correctly on a scaled window you must consistently use units ‘dp’ and ‘sp’ throughout your app. See metrics for more details.