Java tutorial
//package com.java2s; //License from project: Apache License import android.content.res.Configuration; public class Main { private static String UNKNOWN = ""; /** * The current width of the available screen space, in dp units. * @param screen_width_dp "screenWidthDp" */ public static String getScreenWidthDpStr(int screen_width_dp) { switch (screen_width_dp) { case Configuration.SCREEN_WIDTH_DP_UNDEFINED://0 return "SCREEN_WIDTH_DP_UNDEFINED"; default: return UNKNOWN; } } }