Package com.drake.engine.utils

Types

AppUtils
Link copied to clipboard
class AppUtils
BitUtils
Link copied to clipboard
class BitUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2018/03/21
    desc  : 位运算工具类
BrightnessUtils
Link copied to clipboard
class BrightnessUtils
CacheUtils
Link copied to clipboard
class CacheUtils
CameraUtils
Link copied to clipboard
class CameraUtils
CleanUtils
Link copied to clipboard
class CleanUtils
ClipboardUtils
Link copied to clipboard
class ClipboardUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/09/25
    desc  : 剪贴板相关工具类
CloneUtils
Link copied to clipboard
class CloneUtils
ConstUtils
Link copied to clipboard
class ConstUtils
ContactUtils
Link copied to clipboard
open class ContactUtils
ConvertUtils
Link copied to clipboard
class ConvertUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/08/13
    desc  : utils about convert
CoordinateUtils
Link copied to clipboard
class CoordinateUtils
CrashUtils
Link copied to clipboard
class CrashUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/09/27
    desc  : utils about crash
DeviceUtils
Link copied to clipboard
class DeviceUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/8/1
    desc  : utils about device
EncodeUtil
Link copied to clipboard
open class EncodeUtil
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/8/7
    desc  : 编码解码相关工具类
EncryptUtil
Link copied to clipboard
open class EncryptUtil
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/8/2
    desc  : 加密解密相关的工具类
FileIOUtils
Link copied to clipboard
class FileIOUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2017/06/22
    desc  : utils about file io
FileUtils
Link copied to clipboard
class FileUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/05/03
    desc  : utils about file
FragmentUtils
Link copied to clipboard
class FragmentUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2017/01/17
    desc  : utils about fragment
ImageCodeUtils
Link copied to clipboard
class ImageCodeUtils
用于图形验证码的工具类
ImageUtils
Link copied to clipboard
class ImageUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/08/12
    desc  : utils about image
InitContentProvider
Link copied to clipboard
class InitContentProvider : ContentProvider
IntentUtils
Link copied to clipboard
class IntentUtils
LocationUtils
Link copied to clipboard
class LocationUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 16/11/13
    desc  : 定位相关工具类
LunarUtils
Link copied to clipboard
class LunarUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/12/05
    desc  : 日历相关工具类
NetworkUtils
Link copied to clipboard
class NetworkUtils
PhoneUtils
Link copied to clipboard
open class PhoneUtils
PinyinUtils
Link copied to clipboard
class PinyinUtils
ProcessUtils
Link copied to clipboard
class ProcessUtils
RegexConstants
Link copied to clipboard
object RegexConstants
author: Blankj
blog  : http://blankj.com
time  : 2017/03/13
desc  : The constants of regex.
RegexUtils
Link copied to clipboard
object RegexUtils
author: Blankj
blog  : http://blankj.
ResourceManager
Link copied to clipboard
class ResourceManager(path: String)
ScreenUtils
Link copied to clipboard
class ScreenUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/08/02
    desc  : utils about screen
SDCardUtils
Link copied to clipboard
class SDCardUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/08/11
    desc  : utils about sdcard
ServiceUtils
Link copied to clipboard
class ServiceUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/08/02
    desc  : utils about service
ShellUtils
Link copied to clipboard
class ShellUtils
StringUtils
Link copied to clipboard
class StringUtils
ThrottleClickListener
Link copied to clipboard
class ThrottleClickListener(interval: Long, unit: TimeUnit, block: View.() -> Unit) : View.OnClickListener
TimeUtils
Link copied to clipboard
class TimeUtils
Units
Link copied to clipboard
object Units
VibrationUtils
Link copied to clipboard
class VibrationUtils
    author: Blankj
    blog  : http://blankj.com
    time  : 2016/09/29
    desc  : 震动相关工具类
ZipUtils
Link copied to clipboard
class ZipUtils

Functions

dp
Link copied to clipboard
fun Float.dp(): Float
fun Int.dp(): Float
fractionDigit
Link copied to clipboard
fun BigDecimal.fractionDigit(roundingMode: RoundingMode = RoundingMode.UP): String
fun Double?.fractionDigit(roundingMode: RoundingMode = RoundingMode.UP): String
fun String?.fractionDigit(roundingMode: RoundingMode = RoundingMode.UP): String
fun Long?.fractionDigit(roundingMode: RoundingMode = RoundingMode.UP): String
默认看做 "分" 处理(除以100)
fractionDigitPattern
Link copied to clipboard
fun Number.fractionDigitPattern(pattern: String = "0.##"): String

表示非0补齐,比如 3.001 ->0.##-> 3

0 表示补齐0,比如3.00 ->0.00-> 3.00 % 表示乘以 100 和作为百分比显示 10.3001->#.00#%->1030.
isDouble
Link copied to clipboard
fun String.isDouble(): Boolean
是否为浮点数, 无论Float或者Double
isInteger
Link copied to clipboard
fun String.isInteger(): Boolean
是否为整数
isNumber
Link copied to clipboard
fun String.isNumber(): Boolean
是否是数字
px
Link copied to clipboard
fun Float.px(): Int
fun Int.px(): Int
showPassword
Link copied to clipboard
fun EditText.showPassword(enabled: Boolean)
显示或隐藏密码
sp
Link copied to clipboard
fun Float.sp(): Float
fun Int.sp(): Float
sp2px
Link copied to clipboard
fun Float.sp2px(): Int
fun Int.sp2px(): Int
throttleClick
Link copied to clipboard
fun View.throttleClick(interval: Long = 500, unit: TimeUnit = TimeUnit.MILLISECONDS, block: View.() -> Unit)
toDp
Link copied to clipboard
fun Float.toDp(): Float
fun Int.toDp(): Float
toSp
Link copied to clipboard
fun Float.toSp(): Float
fun Int.toSp(): Float

Properties

dp
Link copied to clipboard
val Int.dp: Int
dp
Link copied to clipboard
val Float.dp: Int
GB
Link copied to clipboard
val Number.GB: Long
KB
Link copied to clipboard
val Number.KB: Long
MB
Link copied to clipboard
val Number.MB: Long
sp
Link copied to clipboard
val Int.sp: Int
sp
Link copied to clipboard
val Float.sp: Int