类 Util


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

      • Util

        public Util()
    • 方法详细资料

      • dp2px

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

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

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

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

        public static String encryptPassword​(String password)
      • intDigits

        public static List<Integer> intDigits​(int i)
      • 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)
      • getAuthCode

        public static String getAuthCode​(String url)
      • getThemeAccentColor

        public static int getThemeAccentColor​(android.content.Context context)
      • randomString

        public static String randomString​(int length)
      • isNull

        public static boolean isNull​(String s)
      • loadCountryList

        public static List<Country> loadCountryList​(android.content.Context context)
      • isCn

        public static boolean isCn()
      • getAppLanguage

        public static String getAppLanguage()
      • getLangHeader

        public static String getLangHeader()
      • isIp

        public static boolean isIp​(String name)
      • toStringList

        public static List<String> toStringList​(org.json.JSONArray array)
                                         throws org.json.JSONException
        抛出:
        org.json.JSONException
      • setStatusBarColor

        public static void setStatusBarColor​(android.app.Activity activity,
                                             int colorResId)
      • pareUnderLine

        public static org.json.JSONObject pareUnderLine​(org.json.JSONObject object)
      • underlineToHump

        public static String underlineToHump​(String str)