suliang 8b177aebc7 main | 2 years ago | |
---|---|---|
.idea | 2 years ago | |
app | 2 years ago | |
gradle/wrapper | 2 years ago | |
lib/common | 2 years ago | |
.gitignore | 2 years ago | |
ProjectErrors.md | 2 years ago | |
README.md | 2 years ago | |
build.gradle | 2 years ago | |
gradle.properties | 2 years ago | |
gradlew | 2 years ago | |
gradlew.bat | 2 years ago | |
settings.gradle | 2 years ago |
gradle 版本管理 ext.android : app版本信息 ext.version : 依赖包版本信息 ext.dependencies_required : 必须的依赖项 ext.dependencies_testImplementation : 测试依赖 ext.dependencies_androidTestImplementation : 测试依赖 ext.dependencies_custom : 自己添加的依赖项,按需定制
androidx.appcompat:appcompat 自带jetpack中的lifecycle、viewmodel、livedata
app: module : 按模块进行业务划分
common: app: 获取application base: 存放业务的基础类
activity、fragment、adapter的基类
eventbus: livedata的事件总线
粘性事件: 不管先注册还是先发送消息,都能收到消息
非粘性事件: 必须先注册,再发送消息,如果先发送消息,再注册,则先发送的消息是监听不到
util : 工具类,包含Kotlin的扩展属性
media包: 实现音视频的播放封装
test音频: val source = listOf("http://ws.stream.qqmusic.qq.com/C4000017AcyB00D6Cr.m4a?guid=395745734&vkey=9CF75D8FDE45B1A7755C15F93C5F74CC18E444873F498DF3F5B9F0B41889778BE0EAC45305BD444F90D777C612BC5865DB0AF55A318854E1&uin=&fromtag=66"
,“http://ws.stream.qqmusic.qq.com/C400001lePVO36SNSo.m4a?guid=748677131&vkey=A6077E31CB4A1C8A4F3D5D2BEDE8D3E16AB69FF2FEE95D9D48288EAD048AB89DC53B6846D184F842257617AF9714D97C864FB183BE05CC66&uin=&fromtag=66” ,“http://ws.stream.qqmusic.qq.com/C400000ZFBf22vBvrf.m4a?guid=921100582&vkey=C9EA33972404E2AC1C80A479614AD44A9BF132A16F9B307D9515F595B41901AE53F6681E28BDA799FC047F30D624F8A19AE9C4856ADBEF4B&uin=&fromtag=66”)
image包: 实现了图片加载的封装
Kotlin的单例模式: https://developer.aliyun.com/article/642618 饿汉式(直接获取实例)、懒汉式(一次判空获取实例)、双重校验锁 object 声明: 为饿汉式单例,即直接实例