类 Util


  • public class Util
    extends Object
    • 构造器详细资料

      • Util

        public Util()
    • 方法详细资料

      • dp2px

        public static float dp2px​(Context context,
                                  float dp)
      • px2dp

        public static float px2dp​(Context context,
                                  float px)
      • sp2px

        public static int sp2px​(Context context,
                                float sp)
      • px2sp

        public static int px2sp​(Context context,
                                float px)
      • encryptPassword

        public static String encryptPassword​(String password)
      • intDigits

        public static List<Integer> intDigits​(int i)
      • findAllViewByClass

        public static List<View> findAllViewByClass​(View current,
                                                    Class<?> T)
      • findViewByClass

        public static View findViewByClass​(View current,
                                           Class<?> T)
      • findViewByClass

        public static View findViewByClass​(View current,
                                           Class<?> T,
                                           boolean onlyVisible)
      • findChildViewByClass

        public static View findChildViewByClass​(ViewGroup parent,
                                                Class<?> T,
                                                boolean onlyVisible)
      • getAccount

        public static String getAccount​(View current)
      • getPhoneNumber

        public static String getPhoneNumber​(View current)
      • getPhoneCountryCode

        public static String getPhoneCountryCode​(View current)
      • getPhoneCountryCodeByCache

        public static String getPhoneCountryCodeByCache​(Context context)
      • getEmail

        public static String getEmail​(View current)
      • getPassword

        public static String getPassword​(View current)
      • getVerifyCode

        public static String getVerifyCode​(View current)
      • setErrorText

        public static void setErrorText​(View view,
                                        String text)
      • getAuthCode

        public static String getAuthCode​(String url)
      • getThemeAccentColor

        public static int getThemeAccentColor​(Context context)
      • randomString

        public static String randomString​(int length)
      • isNull

        public static boolean isNull​(String s)
      • isCn

        public static boolean isCn()
      • isEn

        public static boolean isEn()
      • getAppLanguage

        public static String getAppLanguage()
      • getLangHeader

        public static String getLangHeader()
      • isIp

        public static boolean isIp​(String name)
      • getIdentifierHost

        public static String getIdentifierHost​(Config config)
      • setStatusBarColor

        public static void setStatusBarColor​(Activity activity,
                                             int colorResId)
      • openSettingUI

        public static void openSettingUI​(Activity activity)
      • hideKeyboard

        public static void hideKeyboard​(Activity activity)
      • underlineToHump

        public static String underlineToHump​(String str)
      • shouldCompleteAfterLogin

        public static boolean shouldCompleteAfterLogin​(Config config)
      • getLabel

        public static String getLabel​(Config config,
                                      String name)
        获取字段名称
      • getUserName

        public static String getUserName​(UserInfo userInfo)
      • loginSuccess

        public static void loginSuccess​(Activity activity,
                                        UserInfo userInfo)
        登录成功逻辑统一处理
      • getTimeString

        public static String getTimeString()
      • pushCid

        public static void pushCid​(Context context)
      • encodeBase64URL

        public static String encodeBase64URL​(byte[] bytes)
      • biometricBind

        public static void biometricBind​(AuthActivity activity)
      • quitActivity

        public static void quitActivity()