类 Util
- java.lang.Object
-
- cn.authing.guard.util.Util
-
public class Util extends Object
-
-
构造器概要
构造器 构造器 说明 Util()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static floatdp2px(android.content.Context context, float dp)static StringencryptPassword(String password)static List<android.view.View>findAllViewByClass(android.view.View current, Class<?> T)static android.view.ViewfindChildViewByClass(android.view.ViewGroup parent, Class<?> T, boolean onlyVisible)static android.view.ViewfindViewByClass(android.view.View current, Class<?> T)static android.view.ViewfindViewByClass(android.view.View current, Class<?> T, boolean onlyVisible)static StringgetAccount(android.view.View current)static StringgetAuthCode(String url)static StringgetHost(Config config)static StringgetJson(android.content.Context context, String fileName)static StringgetLangHeader()static StringgetPassword(android.view.View current)static StringgetPhoneCountryCode(android.view.View current)static StringgetPhoneCountryCodeByCache(android.content.Context context)static StringgetPhoneNumber(android.view.View current)static StringgetQueryParam(String url, String key)static intgetThemeAccentColor(android.content.Context context)static StringgetVerifyCode(android.view.View current)static List<Integer>intDigits(int i)static booleanisCn()static booleanisIp(String name)static booleanisNull(String s)static List<Country>loadCountryList(android.content.Context context)static floatpx2dp(android.content.Context context, float px)static StringrandomString(int length)static voidsetErrorText(android.view.View view, String text)static Map<String,List<String>>splitQuery(URL url)static List<String>toStringList(org.json.JSONArray array)
-
-
-
方法详细资料
-
dp2px
public static float dp2px(android.content.Context context, float dp)
-
px2dp
public static float px2dp(android.content.Context context, float px)
-
findAllViewByClass
public static List<android.view.View> findAllViewByClass(android.view.View current, Class<?> T)
-
findViewByClass
public static android.view.View findViewByClass(android.view.View current, Class<?> T)
-
findViewByClass
public static android.view.View findViewByClass(android.view.View current, Class<?> T, boolean onlyVisible)
-
findChildViewByClass
public static android.view.View findChildViewByClass(android.view.ViewGroup parent, Class<?> T, boolean onlyVisible)
-
getAccount
public static String getAccount(android.view.View current)
-
getPhoneNumber
public static String getPhoneNumber(android.view.View current)
-
getPhoneCountryCode
public static String getPhoneCountryCode(android.view.View current)
-
getPhoneCountryCodeByCache
public static String getPhoneCountryCodeByCache(android.content.Context context)
-
getPassword
public static String getPassword(android.view.View current)
-
getVerifyCode
public static String getVerifyCode(android.view.View current)
-
setErrorText
public static void setErrorText(android.view.View view, String text)
-
splitQuery
public static Map<String,List<String>> splitQuery(URL url) throws UnsupportedEncodingException
-
getThemeAccentColor
public static int getThemeAccentColor(android.content.Context context)
-
randomString
public static String randomString(int length)
-
isNull
public static boolean isNull(String s)
-
isCn
public static boolean isCn()
-
getLangHeader
public static String getLangHeader()
-
isIp
public static boolean isIp(String name)
-
-