-
public class UIUtils
-
-
Method Summary
Modifier and Type Method Description static Resources
getPreferredLocalizedResources(Context context)
static Resources
getLocalizedResourcesByDomestic(Context context)
static Resources
getLocalizedResources(Context context, Locale locale)
static int
getLayoutId(Context context, String name)
static int
getViewId(Context context, String name)
static int
getDrawableId(Context context, String name)
static int
getStringId(Context context, String name)
static int
getStyleId(Context context, String name)
static int
getId(Context context, String name)
static String
getString(Context context, String name)
static int
dp2px(Context context, float dipValue)
static int
dp2pxWithScale(float scale, float dipValue)
static int
sp2px(Context context, float spValue)
static int
getWindowShortLength(Activity context)
static int
getWindowLongLength(Activity context)
static int
getWindowWidth(Activity context)
static int
getWindowHeight(Activity context)
static Drawable
getPackageIconDrawable(Activity context)
static String
getAppName(Context context)
-
-
Method Detail
-
getPreferredLocalizedResources
static Resources getPreferredLocalizedResources(Context context)
-
getLocalizedResourcesByDomestic
static Resources getLocalizedResourcesByDomestic(Context context)
-
getLocalizedResources
static Resources getLocalizedResources(Context context, Locale locale)
-
getLayoutId
static int getLayoutId(Context context, String name)
-
getDrawableId
static int getDrawableId(Context context, String name)
-
getStringId
static int getStringId(Context context, String name)
-
getStyleId
static int getStyleId(Context context, String name)
-
dp2pxWithScale
static int dp2pxWithScale(float scale, float dipValue)
-
getWindowShortLength
static int getWindowShortLength(Activity context)
-
getWindowLongLength
static int getWindowLongLength(Activity context)
-
getWindowWidth
static int getWindowWidth(Activity context)
-
getWindowHeight
static int getWindowHeight(Activity context)
-
getPackageIconDrawable
static Drawable getPackageIconDrawable(Activity context)
-
getAppName
static String getAppName(Context context)
-
-
-
-