Начиная с API 21 понятие веса было добавлено в GridLayout. Для поддержки старых Android-устройств вы можете использовать GridLayout из библиотеки поддержки v7. compile ''com.android pport:gridlayout-v7:22.2.1'' Следующий XML дает пример того, как вы можете ...
The GetSystemMetrics function retrieves various system metrics and system configuration settings. System metrics are the dimensions (widths and heights) of Windows display elements. All dimensions retrieved by GetSystemMetrics are in pixels. Specifies the system metric or configuration setting to retrieve. All SM_CX* values are widths.