public class RFABTextUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG |
| Constructor and Description |
|---|
RFABTextUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
dip2px(android.content.Context context,
float dpValue)
根据手机的分辨率从 dp 的单位 转成为 px(像素)
|
static float |
getScaledDensity(android.content.Context context)
获得字体的缩放密度
|
static boolean |
isBlank(java.lang.CharSequence charSequence) |
static boolean |
isEmpty(java.lang.CharSequence charSequence) |
static boolean |
isEmpty(java.util.Collection collection)
*************************************************************
|
static boolean |
isEmpty(int[] objs) |
static boolean |
isEmpty(java.util.Map map) |
static boolean |
isEmpty(java.lang.Object[] objs) |
static boolean |
isEquals(java.lang.Object a,
java.lang.Object b) |
static boolean |
isLeast(int[] objs,
int count) |
static boolean |
isLeast(java.lang.Object[] objs,
int count) |
static java.lang.String |
pickFirstNotNull(java.lang.CharSequence... options)
摘取里面第一个不为null的字符串
|
static <T> T |
pickFirstNotNull(java.lang.Class<T> clazz,
T... options)
摘取里面第一个不为null的字符串
|
static int |
px2dip(android.content.Context context,
float pxValue)
根据手机的分辨率从 px(像素) 的单位 转成为 dp
|
static int |
px2sp(android.content.Context context,
float pxValue)
将px值转换为sp值,保证文字大小不变
|
static int |
sp2px(android.content.Context context,
float spValue)
将sp值转换为px值,保证文字大小不变
|
static java.lang.String |
trim(java.lang.CharSequence charSequence) |
public static float getScaledDensity(android.content.Context context)
context - public static int dip2px(android.content.Context context,
float dpValue)
public static int px2dip(android.content.Context context,
float pxValue)
public static int px2sp(android.content.Context context,
float pxValue)
pxValue - public static int sp2px(android.content.Context context,
float spValue)
spValue - public static boolean isEmpty(java.util.Collection collection)
public static boolean isEmpty(java.util.Map map)
public static boolean isEmpty(java.lang.Object[] objs)
public static boolean isEmpty(int[] objs)
public static boolean isEmpty(java.lang.CharSequence charSequence)
public static boolean isBlank(java.lang.CharSequence charSequence)
public static boolean isLeast(java.lang.Object[] objs,
int count)
public static boolean isLeast(int[] objs,
int count)
public static boolean isEquals(java.lang.Object a,
java.lang.Object b)
public static java.lang.String trim(java.lang.CharSequence charSequence)
public static java.lang.String pickFirstNotNull(java.lang.CharSequence... options)
options - @SafeVarargs
public static <T> T pickFirstNotNull(java.lang.Class<T> clazz,
T... options)
options -