//определяем коээфициент масштабирования float screenFactor = 0.0f; switch (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) { case Configuration.SCREENLAYOUT_SIZE_SMALL: screenFactor = 0.75f; break; case Configuration.SCREENLAYOUT_SIZE_LARGE: screenFactor = 1.5f; break; case Configuration.SCREENLAYOUT_SIZE_XLARGE: screenFactor = 2; break; case Configuration.SCREENLAYOUT_SIZE_NORMAL: screenFactor = 1; break; } m_scaleFactor = getResources().getDisplayMetrics().density * screenFactor;