|
|
@@ -6,6 +6,10 @@ import android.content.Context
|
|
|
import android.content.pm.PackageManager
|
|
|
import androidx.multidex.MultiDex
|
|
|
import com.alibaba.android.arouter.launcher.ARouter
|
|
|
+import com.scwang.smartrefresh.layout.SmartRefreshLayout
|
|
|
+import com.scwang.smartrefresh.layout.constant.SpinnerStyle
|
|
|
+import com.scwang.smartrefresh.layout.footer.ClassicsFooter
|
|
|
+import com.scwang.smartrefresh.layout.header.ClassicsHeader
|
|
|
import com.tencent.bugly.crashreport.CrashReport
|
|
|
import com.yingyangfly.baselib.config.AccountConfig
|
|
|
import com.yingyangfly.baselib.utils.LogUtil
|
|
|
@@ -33,6 +37,21 @@ open class BaseApplication : Application() {
|
|
|
|
|
|
// @Volatile
|
|
|
var isAttach = false
|
|
|
+
|
|
|
+ //配置: SmartRefreshLayout
|
|
|
+ init {//static 代码段可以防止内存泄露
|
|
|
+ //设置全局的Header构建器
|
|
|
+ SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, layout ->
|
|
|
+ layout.setPrimaryColorsId(R.color.bgDefault, R.color.colorTxtDefault)//全局设置主题颜色
|
|
|
+ ClassicsHeader(context).setSpinnerStyle(SpinnerStyle.Translate)//指定为经典Header,默认是 贝塞尔雷达Header
|
|
|
+ }
|
|
|
+
|
|
|
+ //设置全局的Footer构建器
|
|
|
+ SmartRefreshLayout.setDefaultRefreshFooterCreator { context, layout ->
|
|
|
+ //指定为经典Footer,默认是 BallPulseFooter
|
|
|
+ ClassicsFooter(context).setSpinnerStyle(SpinnerStyle.Translate)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
override fun onCreate() {
|