public class UserUtils
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
UserUtils.FollowType
关注,粉丝,双向关注
|
static class |
UserUtils.PageKind
关注,粉丝,推荐,kd,fam
|
static class |
UserUtils.PageType |
限定符和类型 | 字段和说明 |
---|---|
static java.lang.StringBuilder |
BLACK_CHAR
用户输入的昵称不能包含以下字符
|
static java.lang.String |
BROADCASTER_DASHBOARD |
static java.lang.String |
BROADCASTER_DASHBOARD_DEBUG |
static int |
DEFAULT_BIRTHDAY_DAY |
static int |
DEFAULT_BIRTHDAY_MONTH |
static int |
DEFAULT_BIRTHDAY_YEAR |
static boolean |
IS_UP_TO_9 |
static int |
PASSWORD_MAX_LENGTH |
static int |
PASSWORD_MIN_LENGTH |
static int |
REGISTER_AGE_LIMITED |
构造器和说明 |
---|
UserUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
BROADCASTER_ACADEMY_END_LIVE() |
static int |
calculateLength(java.lang.CharSequence c) |
static int |
calculateLengthTwoo(java.lang.CharSequence c)
计算字符串的长度,用于Twoo项目
|
static boolean |
checkBirthdayValid(java.lang.String birthday,
int year,
int month,
int day)
检查生日合法性
|
static boolean |
checkEmail(java.lang.String email)
检验邮箱合法性
|
static boolean |
checkIsAllChineseCharacters(java.lang.CharSequence inputStr)
用于判断用户输入的昵称是否全部汉字组成
|
static boolean |
checkIsAllNumberCharacters(java.lang.CharSequence str) |
static boolean |
checkNickname(java.lang.CharSequence inputStr)
用于判断用户输入的昵称是否由数字 字母和汉字组成
|
static boolean |
checkPassword(java.lang.String password)
检验密码合法性,密码长度范围6~20
|
static boolean |
checkPhoneNum(java.lang.String countryCode,
java.lang.String phoneNum)
根据国家码判断手机号是否合法,目前只判断美国、印尼、日本、中国
|
static boolean |
checkPhoneNum(java.lang.String countryName,
java.lang.String countryCode,
java.lang.String phoneNum)
根据国家码判断手机号是否合法,目前只判断美国、印尼、日本、中国
|
static java.lang.String |
followNumFormat(int num) |
static java.lang.String |
formatStringNumber(java.lang.String numStr) |
static int |
getAnchorLevelBgResId(int classLevel) |
static android.graphics.Bitmap |
getAnchorLevelBitMap(int level)
根据给定的主播等级获取对应的等级图片 ps:替换以前的100张等级图片
|
static int |
getBeautyType(boolean isOpen) |
static java.lang.String |
getDashboardUrl()
dashboard的url地址
|
static java.lang.String |
getH5RequestParams() |
static java.lang.String |
getRequestIncomeAddress(boolean usSwitch) |
static java.lang.String |
getRequestInviteNoticeAddrNew()
邀请码地址。
|
static int |
getUserClassLevelBgResId(int classLevel) |
static java.lang.String |
getUserClassLevelNameResId(int classLevel) |
static int |
getUserClassLevelResId(int classLevel) |
static int |
getUserLevelBackgroundResId(int level) |
static android.graphics.Bitmap |
getUserLevelBitMap(int level)
根据给定的等级获取对应的等级图片 ps:替换以前的100张等级图片
|
static boolean |
hasPreventBannedPrivilege() |
static boolean |
isBirthdayValid(int year,
int month,
int day)
注册流程生日项判定
|
static boolean |
isBirthdayValid(java.lang.String birthday)
检查生日是否符合要求
参数格式1990-1-1
|
static boolean |
isEmail(java.lang.String email) |
static boolean |
isPasswordSpacialWord(java.lang.CharSequence inputStr)
用于判断用户输入的密码是否是特殊字符
|
static void |
setFollowButton(android.widget.ImageView follow,
boolean followed) |
static void |
setLevelViewSrc(android.widget.ImageView imageView,
int level) |
static void |
setLevelViewSrc(android.widget.TextView textView,
int level) |
static boolean |
usWithDrawSwitch() |
public static final int PASSWORD_MIN_LENGTH
public static final int PASSWORD_MAX_LENGTH
public static final int REGISTER_AGE_LIMITED
public static final int DEFAULT_BIRTHDAY_YEAR
public static final int DEFAULT_BIRTHDAY_MONTH
public static final int DEFAULT_BIRTHDAY_DAY
public static boolean IS_UP_TO_9
public static final java.lang.String BROADCASTER_DASHBOARD
public static final java.lang.String BROADCASTER_DASHBOARD_DEBUG
public static final java.lang.StringBuilder BLACK_CHAR
public static java.lang.String BROADCASTER_ACADEMY_END_LIVE()
public static boolean checkEmail(java.lang.String email)
email
- public static boolean isEmail(java.lang.String email)
public static boolean checkPassword(java.lang.String password)
password
- public static boolean isPasswordSpacialWord(java.lang.CharSequence inputStr)
inputStr
- public static boolean checkNickname(java.lang.CharSequence inputStr)
inputStr
- public static boolean checkIsAllChineseCharacters(java.lang.CharSequence inputStr)
inputStr
- public static boolean checkIsAllNumberCharacters(java.lang.CharSequence str)
public static boolean checkPhoneNum(java.lang.String countryName, java.lang.String countryCode, java.lang.String phoneNum)
countryName
- countryCode
- phoneNum
- public static boolean checkPhoneNum(java.lang.String countryCode, java.lang.String phoneNum)
countryCode
- phoneNum
- public static java.lang.String followNumFormat(int num)
public static java.lang.String formatStringNumber(java.lang.String numStr)
public static int calculateLength(java.lang.CharSequence c)
public static int calculateLengthTwoo(java.lang.CharSequence c)
c
- 待计算的字符串public static boolean checkBirthdayValid(java.lang.String birthday, int year, int month, int day)
birthday
- year
- month
- day
- public static boolean isBirthdayValid(int year, int month, int day)
year
- month
- day
- public static boolean isBirthdayValid(java.lang.String birthday)
public static android.graphics.Bitmap getUserLevelBitMap(int level)
level
- public static int getUserLevelBackgroundResId(int level)
public static int getUserClassLevelResId(int classLevel)
public static int getUserClassLevelBgResId(int classLevel)
public static java.lang.String getUserClassLevelNameResId(int classLevel)
public static void setFollowButton(android.widget.ImageView follow, boolean followed)
public static android.graphics.Bitmap getAnchorLevelBitMap(int level)
level
- public static int getAnchorLevelBgResId(int classLevel)
public static java.lang.String getDashboardUrl()
public static int getBeautyType(boolean isOpen)
public static boolean usWithDrawSwitch()
public static java.lang.String getRequestIncomeAddress(boolean usSwitch)
public static java.lang.String getRequestInviteNoticeAddrNew()
public static java.lang.String getH5RequestParams()
public static void setLevelViewSrc(android.widget.ImageView imageView, int level)
public static void setLevelViewSrc(android.widget.TextView textView, int level)
public static boolean hasPreventBannedPrivilege()