司机课堂,常见问题,设置,检查更新
This commit is contained in:
parent
572cbe5cb4
commit
87eb1734fa
@ -295,11 +295,26 @@
|
|||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.mine.activity.SettingActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.mine.activity.ComProActivity"
|
android:name=".ui.mine.activity.ComProActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.mine.activity.QuesActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.mine.activity.QueDetailActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.mine.activity.ComProDetailActivity"
|
android:name=".ui.mine.activity.ComProDetailActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.dahe.gldriver.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.chad.library.adapter4.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter4.viewholder.QuickViewHolder
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.bean.CarBean
|
||||||
|
import com.dahe.gldriver.bean.ProBean
|
||||||
|
import com.dahe.gldriver.bean.QuestionBean
|
||||||
|
import com.dahe.mylibrary.utils.ImageLoader
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName QuestionAdatper
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/25 17:04
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class QuestionAdatper : BaseQuickAdapter<QuestionBean, QuickViewHolder>() {
|
||||||
|
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: QuestionBean?) {
|
||||||
|
holder.run {
|
||||||
|
setText(R.id.tvTitle, item?.classroomName)
|
||||||
|
setText(R.id.tvDate, item?.updateTime)
|
||||||
|
ImageLoader.getInstance().loadImage(context,item?.classroomUrl,getView(R.id.ivBg))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
context: Context,
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
) = QuickViewHolder(R.layout.item_question, parent)
|
||||||
|
}
|
@ -14,6 +14,7 @@ import com.github.gzuliyujiang.dialog.DialogStyle
|
|||||||
import com.tencent.bugly.crashreport.CrashReport
|
import com.tencent.bugly.crashreport.CrashReport
|
||||||
import com.umeng.commonsdk.UMConfigure
|
import com.umeng.commonsdk.UMConfigure
|
||||||
import com.umeng.message.PushAgent
|
import com.umeng.message.PushAgent
|
||||||
|
import com.umeng.message.api.UPushRegisterCallback
|
||||||
import com.umeng.umverify.UMVerifyHelper
|
import com.umeng.umverify.UMVerifyHelper
|
||||||
import com.umeng.umverify.listener.UMTokenResultListener
|
import com.umeng.umverify.listener.UMTokenResultListener
|
||||||
import java.security.SecureRandom
|
import java.security.SecureRandom
|
||||||
@ -22,7 +23,6 @@ import javax.net.ssl.HttpsURLConnection
|
|||||||
import javax.net.ssl.SSLContext
|
import javax.net.ssl.SSLContext
|
||||||
import javax.net.ssl.TrustManager
|
import javax.net.ssl.TrustManager
|
||||||
import javax.net.ssl.X509TrustManager
|
import javax.net.ssl.X509TrustManager
|
||||||
import kotlin.concurrent.thread
|
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
@ -104,7 +104,26 @@ class App : Application() {
|
|||||||
// 推送注册
|
// 推送注册
|
||||||
val api = PushAgent.getInstance(this)
|
val api = PushAgent.getInstance(this)
|
||||||
PushHelper.setting(api)
|
PushHelper.setting(api)
|
||||||
|
api.register(object : UPushRegisterCallback{
|
||||||
|
override fun onSuccess(p0: String?) {//注册厂商通道
|
||||||
|
Log.e(
|
||||||
|
"TAG",
|
||||||
|
"register failed! code:$p0"
|
||||||
|
)
|
||||||
|
//注册厂商通道
|
||||||
|
// registerDevicePush(context)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailure(p0: String?, p1: String?) {
|
||||||
|
Log.e(
|
||||||
|
"TAG",
|
||||||
|
"register failed! code:$p0,desc:$p1"
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
UMConfigure.init(
|
UMConfigure.init(
|
||||||
this,
|
this,
|
||||||
AppConfig.APP_KEY,
|
AppConfig.APP_KEY,
|
||||||
|
@ -53,3 +53,36 @@ data class ProBean(
|
|||||||
val status: String,
|
val status: String,
|
||||||
val contentData: String
|
val contentData: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class AppVersion(
|
||||||
|
val content: String,
|
||||||
|
val createTime: String,
|
||||||
|
val delete: String,
|
||||||
|
val downloadUrl: String,
|
||||||
|
val examine: String,
|
||||||
|
val force: String,
|
||||||
|
val qrocdeUrl: String,
|
||||||
|
val source: String,
|
||||||
|
val type: String,
|
||||||
|
val versionCode: Int,
|
||||||
|
val versionName: String,
|
||||||
|
val versionId: String
|
||||||
|
)
|
||||||
|
|
||||||
|
data class QuestionBean(
|
||||||
|
val classroomDesc: String,
|
||||||
|
val classroomId: String,
|
||||||
|
val classroomName: String,
|
||||||
|
val classroomUrl: String,
|
||||||
|
val createTime: String,
|
||||||
|
val isRecommend: String,
|
||||||
|
val isTop: String,
|
||||||
|
val sortValue: String,
|
||||||
|
val status: String,
|
||||||
|
val updateTime: String
|
||||||
|
)
|
||||||
|
|
||||||
|
data class QueDetail(
|
||||||
|
val classroomId: String,
|
||||||
|
val contentData: String
|
||||||
|
)
|
||||||
|
@ -2,6 +2,7 @@ package com.dahe.gldriver.net
|
|||||||
|
|
||||||
import com.dahe.gldriver.BuildConfig
|
import com.dahe.gldriver.BuildConfig
|
||||||
import com.dahe.gldriver.BuildConfig.BASE_URL
|
import com.dahe.gldriver.BuildConfig.BASE_URL
|
||||||
|
import com.dahe.gldriver.bean.AppVersion
|
||||||
import com.dahe.gldriver.bean.AuthTeamBean
|
import com.dahe.gldriver.bean.AuthTeamBean
|
||||||
import com.dahe.gldriver.bean.CaptainBean
|
import com.dahe.gldriver.bean.CaptainBean
|
||||||
import com.dahe.gldriver.bean.CarBean
|
import com.dahe.gldriver.bean.CarBean
|
||||||
@ -14,6 +15,8 @@ import com.dahe.gldriver.bean.OrderChild
|
|||||||
import com.dahe.gldriver.bean.OrderDetailBean
|
import com.dahe.gldriver.bean.OrderDetailBean
|
||||||
import com.dahe.gldriver.bean.OssBean
|
import com.dahe.gldriver.bean.OssBean
|
||||||
import com.dahe.gldriver.bean.ProBean
|
import com.dahe.gldriver.bean.ProBean
|
||||||
|
import com.dahe.gldriver.bean.QueDetail
|
||||||
|
import com.dahe.gldriver.bean.QuestionBean
|
||||||
import com.dahe.gldriver.bean.RateBean
|
import com.dahe.gldriver.bean.RateBean
|
||||||
import com.dahe.gldriver.bean.UpBankInfoBean
|
import com.dahe.gldriver.bean.UpBankInfoBean
|
||||||
import com.dahe.gldriver.bean.UpCaptain
|
import com.dahe.gldriver.bean.UpCaptain
|
||||||
@ -475,6 +478,30 @@ interface Api {
|
|||||||
@GET(BASE_URL + "driver/app/info/commonProblemDetail")
|
@GET(BASE_URL + "driver/app/info/commonProblemDetail")
|
||||||
fun commonProblemDetail(@Query("problemId") problemId: String): Observable<CommonResponseBean<ProBean>>
|
fun commonProblemDetail(@Query("problemId") problemId: String): Observable<CommonResponseBean<ProBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全课堂详情
|
||||||
|
* @param problemId String
|
||||||
|
* @return Observable<CommonResponseBean<QueDetail>>
|
||||||
|
*/
|
||||||
|
@GET(BASE_URL + "driver/app/info/safeClassroomDetail")
|
||||||
|
fun safeClassroomDetail(@Query("classroomId") problemId: String): Observable<CommonResponseBean<QueDetail>>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取APP最新版本信息
|
||||||
|
* @return Observable<CommonResponseBean<ProBean>>
|
||||||
|
*/
|
||||||
|
@GET(BASE_URL + "driver/app/info/getLastAppVersion")
|
||||||
|
fun getLastAppVersion(): Observable<CommonResponseBean<AppVersion>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全课堂列表
|
||||||
|
* @return Observable<CommonResponseBean<AppVersion>>
|
||||||
|
*/
|
||||||
|
@GET(BASE_URL + "driver/app/info/safeClassroomList")
|
||||||
|
fun safeClassroomList(): Observable<CommonResponseBean<MutableList<QuestionBean>>>
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// String BASE_URL = "https://tmstest.dahehuoyun.com/";
|
// String BASE_URL = "https://tmstest.dahehuoyun.com/";
|
||||||
|
@ -5,6 +5,7 @@ import android.content.Context
|
|||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.dahe.gldriver.utils.SPUtils
|
import com.dahe.gldriver.utils.SPUtils
|
||||||
import com.dahe.glex.bean.UserBean
|
import com.dahe.glex.bean.UserBean
|
||||||
|
import com.dahe.mylibrary.callback.PushAliasListener
|
||||||
import com.umeng.message.PushAgent
|
import com.umeng.message.PushAgent
|
||||||
import com.umeng.message.UmengMessageHandler
|
import com.umeng.message.UmengMessageHandler
|
||||||
import com.umeng.message.UmengNotificationClickHandler
|
import com.umeng.message.UmengNotificationClickHandler
|
||||||
@ -105,7 +106,7 @@ object PushHelper {
|
|||||||
* 绑定别名,绑定成功后可通过别名推送消息
|
* 绑定别名,绑定成功后可通过别名推送消息
|
||||||
*/
|
*/
|
||||||
fun setAlias(context: Context, userBean: UserBean) {
|
fun setAlias(context: Context, userBean: UserBean) {
|
||||||
val alias = userBean.userid
|
val alias = userBean.contactPhone
|
||||||
val type = "uid"
|
val type = "uid"
|
||||||
PushAgent.getInstance(context).setAlias(alias, type) { success, message ->
|
PushAgent.getInstance(context).setAlias(alias, type) { success, message ->
|
||||||
val msg: String
|
val msg: String
|
||||||
@ -120,11 +121,12 @@ object PushHelper {
|
|||||||
/**
|
/**
|
||||||
* 删除别名
|
* 删除别名
|
||||||
*/
|
*/
|
||||||
fun delete(context: Context) {
|
fun delete(context: Context, listener: PushAliasListener? = null) {
|
||||||
val alias = SPUtils.instance.getUserInfo(context)?.userid
|
val alias = SPUtils.instance.getUserInfo(context)?.contactPhone
|
||||||
val type = "uid"
|
val type = "uid"
|
||||||
PushAgent.getInstance(context).deleteAlias(alias, type) { success, message ->
|
PushAgent.getInstance(context).deleteAlias(alias, type) { success, message ->
|
||||||
val msg: String
|
val msg: String
|
||||||
|
listener?.onResult(success)
|
||||||
msg = if (success) {
|
msg = if (success) {
|
||||||
"delete alias success! type:$type alias:$alias"
|
"delete alias success! type:$type alias:$alias"
|
||||||
} else {
|
} else {
|
||||||
@ -133,4 +135,21 @@ object PushHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定别名,绑定成功后可通过别名推送消息
|
||||||
|
*/
|
||||||
|
fun setAlias(context: Context, listener: PushAliasListener) {
|
||||||
|
val alias = (SPUtils.instance.getUserInfo(context) as UserBean).contactPhone
|
||||||
|
val type = "uid"
|
||||||
|
PushAgent.getInstance(context).setAlias(alias, type) { success, message ->
|
||||||
|
val msg: String
|
||||||
|
listener.onResult(success)
|
||||||
|
msg = if (success) {
|
||||||
|
"set alias success! type:$type alias:$alias"
|
||||||
|
} else {
|
||||||
|
"set alias failure! msg:$message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,12 @@ import com.dahe.gldriver.ui.mine.activity.CarsManActivity
|
|||||||
import com.dahe.gldriver.ui.mine.activity.ComProActivity
|
import com.dahe.gldriver.ui.mine.activity.ComProActivity
|
||||||
import com.dahe.gldriver.ui.mine.activity.DriverTeamsActivity
|
import com.dahe.gldriver.ui.mine.activity.DriverTeamsActivity
|
||||||
import com.dahe.gldriver.ui.mine.activity.PersonInfoActivity
|
import com.dahe.gldriver.ui.mine.activity.PersonInfoActivity
|
||||||
|
import com.dahe.gldriver.ui.mine.activity.QuesActivity
|
||||||
import com.dahe.gldriver.ui.mine.activity.RateManActivity
|
import com.dahe.gldriver.ui.mine.activity.RateManActivity
|
||||||
import com.dahe.gldriver.ui.mine.activity.RulesActivity
|
import com.dahe.gldriver.ui.mine.activity.RulesActivity
|
||||||
|
import com.dahe.gldriver.ui.mine.activity.SettingActivity
|
||||||
import com.dahe.gldriver.ui.mine.activity.WalletActivity
|
import com.dahe.gldriver.ui.mine.activity.WalletActivity
|
||||||
|
import com.dahe.gldriver.utils.AppVersionUtils
|
||||||
import com.dahe.gldriver.utils.SPUtils
|
import com.dahe.gldriver.utils.SPUtils
|
||||||
import com.dahe.gldriver.utils.UserUtils
|
import com.dahe.gldriver.utils.UserUtils
|
||||||
import com.dahe.glex.bean.UserBean
|
import com.dahe.glex.bean.UserBean
|
||||||
@ -63,20 +66,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
|
|
||||||
override fun onFragmentFirstVisible() {
|
override fun onFragmentFirstVisible() {
|
||||||
setRefresh(binding.refresh, this)
|
setRefresh(binding.refresh, this)
|
||||||
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
refreshView()
|
||||||
if (userInfo != null) {
|
|
||||||
binding.run {
|
|
||||||
tvName.text = userInfo.idcardName
|
|
||||||
tvCarType.text = userInfo.approvedType
|
|
||||||
tvPhone.text = PhoneFormatCheckUtils.hintPhone(userInfo.contactPhone)
|
|
||||||
tvCarType.visibility =
|
|
||||||
if (userInfo.approvedType.isNullOrEmpty()) View.GONE else View.VISIBLE
|
|
||||||
ivPart.visibility =
|
|
||||||
if (userInfo.partyMemberCertification == "1") View.VISIBLE else View.GONE
|
|
||||||
ImageLoader.getInstance()
|
|
||||||
.loadCircleImage(mContext, userInfo.avatar, ivHead, R.drawable.head_defaut)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.run {
|
binding.run {
|
||||||
//初始化常用工具
|
//初始化常用工具
|
||||||
@ -106,20 +96,9 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
|
|
||||||
override fun onClick(v: View) {
|
override fun onClick(v: View) {
|
||||||
when (v.id) {
|
when (v.id) {
|
||||||
// R.id.rlPass->ActivityUtils.startActivity(mContext,ChangePwdActivity::class.java)
|
|
||||||
// R.id.rlPhone-> AppActivityUtils.openWebViewActivity(mContext, "隐私政策",
|
|
||||||
// "http://tms.down.user.test.dahehuodongbao.com/user-privacy.html")
|
|
||||||
//// R.id.rlPhone->ActivityUtils.startActivity(mContext,ChangePhoneActivity::class.java)
|
|
||||||
// R.id.btnOut-> CrashReport.testJavaCrash();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun logOut() {
|
|
||||||
// UserUtils.instance.loginOut(requireActivity())
|
|
||||||
// val intent = Intent(mContext, LoginActivity::class.java)
|
|
||||||
// intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
|
||||||
// requireActivity().startActivity(intent)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 常用工具跳转逻辑
|
* 常用工具跳转逻辑
|
||||||
@ -141,11 +120,12 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
2 -> {
|
2 -> {
|
||||||
var bundle = Bundle()
|
ActivityUtils.startActivity(mContext, QuesActivity::class.java)
|
||||||
bundle.putString("title", "我的百度")
|
// var bundle = Bundle()
|
||||||
bundle.putString("url", "www.baidu.com")
|
// bundle.putString("title", "我的百度")
|
||||||
ActivityUtils.startActivity(mContext, WebActivity::class.java, bundle)
|
// bundle.putString("url", "www.baidu.com")
|
||||||
ToastUtils.showToast(mContext, tools[pos].title)
|
// ActivityUtils.startActivity(mContext, WebActivity::class.java, bundle)
|
||||||
|
// ToastUtils.showToast(mContext, tools[pos].title)
|
||||||
}
|
}
|
||||||
|
|
||||||
3 -> {
|
3 -> {
|
||||||
@ -184,17 +164,18 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
5 -> {
|
5 -> {
|
||||||
ToastUtils.showToast(mContext, plats[pos].title)
|
AppVersionUtils.getInstance().checkVersion(mContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
6 -> {
|
6 -> {
|
||||||
ToastUtils.showToast(mContext, plats[pos].title)
|
ActivityUtils.startActivity(mContext, WebActivity::class.java, Bundle().apply {
|
||||||
|
putString("title", "关于我们")
|
||||||
|
putString("url", "www.baidu.com")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
7 -> {
|
7 -> {
|
||||||
SPUtils.instance.removeUserToken(mContext)
|
ActivityUtils.startActivity(mContext,SettingActivity::class.java)
|
||||||
ActivityUtils.finishAllActivities()
|
|
||||||
showToast("清除token")
|
|
||||||
// exitProcess(0)
|
// exitProcess(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,9 +191,27 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
super.onSuccess(t)
|
super.onSuccess(t)
|
||||||
UserUtils.instance.updateUser(mContext, t.data)
|
UserUtils.instance.updateUser(mContext, t.data)
|
||||||
binding.refresh.finishRefresh()
|
binding.refresh.finishRefresh()
|
||||||
|
refreshView()
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun refreshView() {
|
||||||
|
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||||
|
if (userInfo != null) {
|
||||||
|
binding.run {
|
||||||
|
tvName.text = userInfo.idcardName
|
||||||
|
tvCarType.text = userInfo.approvedType
|
||||||
|
tvPhone.text = PhoneFormatCheckUtils.hintPhone(userInfo.contactPhone)
|
||||||
|
tvCarType.visibility =
|
||||||
|
if (userInfo.approvedType.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||||
|
ivPart.visibility =
|
||||||
|
if (userInfo.partyMemberCertification == "1") View.VISIBLE else View.GONE
|
||||||
|
ImageLoader.getInstance()
|
||||||
|
.loadCircleImage(mContext, userInfo.avatar, ivHead, R.drawable.head_defaut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -136,21 +136,25 @@ class CarDetailActivity : BaseActivity<ActivityCarDetailBinding>(), View.OnClick
|
|||||||
|
|
||||||
if (data.vehicleNum.isNullOrEmpty()) {
|
if (data.vehicleNum.isNullOrEmpty()) {
|
||||||
tvInfo.text = "证件缺失将无法进行接单"
|
tvInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("行驶证、")
|
missInfo = missInfo.plus("行驶证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvInfo.text = """${data.vehicleNum} ${data.vehicleType}"""
|
tvInfo.text = """${data.vehicleNum} ${data.vehicleType}"""
|
||||||
}
|
}
|
||||||
if (data.trailerVehicleNum.isNullOrEmpty()) {
|
if (data.trailerVehicleNum.isNullOrEmpty()) {
|
||||||
tvDriverInfo.text = "证件缺失将无法进行接单"
|
tvDriverInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("挂车行驶证、")
|
missInfo =
|
||||||
|
if (missInfo.isNullOrEmpty()) missInfo.plus("挂车行驶证") else missInfo.plus("、挂车行驶证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvDriverInfo.text = """${data.trailerVehicleNum} ${data.trailerVehicleType}"""
|
tvDriverInfo.text = """${data.trailerVehicleNum} ${data.trailerVehicleType}"""
|
||||||
}
|
}
|
||||||
if (data.roadLicense.isNullOrEmpty()) {
|
if (data.roadLicense.isNullOrEmpty()) {
|
||||||
tvQualiInfo.text = "证件缺失将无法进行接单"
|
tvQualiInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("道路运输许可证、")
|
missInfo =
|
||||||
|
if (missInfo.isNullOrEmpty()) missInfo.plus("道路运输许可证") else missInfo.plus(
|
||||||
|
"、道路运输许可证"
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvQualiInfo.text = """${data.roadLicense}"""
|
tvQualiInfo.text = """${data.roadLicense}"""
|
||||||
@ -158,7 +162,8 @@ class CarDetailActivity : BaseActivity<ActivityCarDetailBinding>(), View.OnClick
|
|||||||
|
|
||||||
|
|
||||||
btnNext.text = if (doneInfoCount == 3) "已完成" else "继续认证"
|
btnNext.text = if (doneInfoCount == 3) "已完成" else "继续认证"
|
||||||
tvContent.text = if (missInfo.isNullOrEmpty()) "认证成功,请接单把!!!" else missInfo
|
tvContent.text =
|
||||||
|
if (missInfo.isNullOrEmpty()) "认证成功,请接单把!!!" else missInfo.plus("缺失")
|
||||||
|
|
||||||
|
|
||||||
llId.visibility = if (data.vehicleNum.isNullOrEmpty()) View.GONE else View.VISIBLE
|
llId.visibility = if (data.vehicleNum.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||||
|
@ -125,21 +125,21 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
|
|
||||||
if (data.idcardNo.isNullOrEmpty()) {
|
if (data.idcardNo.isNullOrEmpty()) {
|
||||||
tvInfo.text = "证件缺失将无法进行接单"
|
tvInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("身份证、")
|
missInfo = missInfo.plus("身份证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvInfo.text = """${data.idcardName} ${data.idcardNo}"""
|
tvInfo.text = """${data.idcardName} ${data.idcardNo}"""
|
||||||
}
|
}
|
||||||
if (data.licenseNo.isNullOrEmpty()) {
|
if (data.licenseNo.isNullOrEmpty()) {
|
||||||
tvDriverInfo.text = "证件缺失将无法进行接单"
|
tvDriverInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("驾驶证、")
|
missInfo = if (missInfo.isNullOrEmpty()) missInfo.plus("驾驶证") else missInfo.plus("、驾驶证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}"""
|
tvDriverInfo.text = """${data.licenseName} ${data.licenseNo}"""
|
||||||
}
|
}
|
||||||
if (data.qualificationCertificateNo.isNullOrEmpty()) {
|
if (data.qualificationCertificateNo.isNullOrEmpty()) {
|
||||||
tvQualiInfo.text = "证件缺失将无法进行接单"
|
tvQualiInfo.text = "证件缺失将无法进行接单"
|
||||||
missInfo.plus("从业资格证、")
|
missInfo = if (missInfo.isNullOrEmpty()) missInfo.plus("从业资格证") else missInfo.plus("、从业资格证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
|
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
|
||||||
@ -147,14 +147,14 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
|
|
||||||
if (data?.isRealName == "0") {
|
if (data?.isRealName == "0") {
|
||||||
tvFaceInfo.text = "未实名认证将无法进行接单"
|
tvFaceInfo.text = "未实名认证将无法进行接单"
|
||||||
missInfo.plus("实名认证缺失")
|
missInfo = if (missInfo.isNullOrEmpty()) missInfo.plus("实名认证") else missInfo.plus("、实名认证")
|
||||||
} else {
|
} else {
|
||||||
doneInfoCount++
|
doneInfoCount++
|
||||||
tvFaceInfo.text = "实名认证成功"
|
tvFaceInfo.text = "实名认证成功"
|
||||||
}
|
}
|
||||||
|
|
||||||
btnNext.text = if (doneInfoCount == 4) "已完成" else "继续认证"
|
btnNext.text = if (doneInfoCount == 4) "已完成" else "继续认证"
|
||||||
tvContent.text = if (missInfo.isNullOrEmpty()) "认证成功,请接单把!!!" else missInfo
|
tvContent.text = if (missInfo.isNullOrEmpty()) "认证成功,请接单把!!!" else missInfo.plus("缺失")
|
||||||
|
|
||||||
|
|
||||||
llId.visibility = if (data.idcardNo.isNullOrEmpty()) View.GONE else View.VISIBLE
|
llId.visibility = if (data.idcardNo.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.dahe.gldriver.ui.mine.activity
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.Html
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.base.AppConfig.DATA
|
||||||
|
import com.dahe.gldriver.bean.ProBean
|
||||||
|
import com.dahe.gldriver.bean.QueDetail
|
||||||
|
import com.dahe.gldriver.bean.QuestionBean
|
||||||
|
import com.dahe.gldriver.databinding.ActivityComProDetailBinding
|
||||||
|
import com.dahe.gldriver.databinding.ActivityQueDetailBinding
|
||||||
|
import com.dahe.gldriver.net.BaseObserver
|
||||||
|
import com.dahe.gldriver.net.DataManager
|
||||||
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ComProActivity
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/25 16:42
|
||||||
|
* @Description 安全课堂详情
|
||||||
|
*/
|
||||||
|
class QueDetailActivity : BaseActivity<ActivityQueDetailBinding>() {
|
||||||
|
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
setStatusBarColor(R.color.white)
|
||||||
|
setTitleBar("安全课堂", true)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initDate() {
|
||||||
|
var proBean = Gson().fromJson<QuestionBean>(intent.extras?.getString(DATA), QuestionBean::class.java)
|
||||||
|
|
||||||
|
|
||||||
|
DataManager.getInstance().safeClassroomDetail(proBean.classroomId)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<QueDetail>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<QueDetail>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
binding.run {
|
||||||
|
tvContent.text = Html.fromHtml(t.data.contentData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.dahe.gldriver.ui.mine.activity
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.adapter.ComProAdatper
|
||||||
|
import com.dahe.gldriver.adapter.QuestionAdatper
|
||||||
|
import com.dahe.gldriver.base.AppConfig
|
||||||
|
import com.dahe.gldriver.bean.ProBean
|
||||||
|
import com.dahe.gldriver.bean.QuestionBean
|
||||||
|
import com.dahe.gldriver.databinding.ActivityQuesBinding
|
||||||
|
import com.dahe.gldriver.net.BaseObserver
|
||||||
|
import com.dahe.gldriver.net.DataManager
|
||||||
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
|
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils
|
||||||
|
import com.dahe.mylibrary.utils.ConvertUtils
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName QuesActivity
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/27 16:00
|
||||||
|
* @Description 安全课堂
|
||||||
|
*/
|
||||||
|
class QuesActivity : BaseActivity<ActivityQuesBinding>() {
|
||||||
|
|
||||||
|
lateinit var adapter: QuestionAdatper
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
setStatusBarColor(R.color.white)
|
||||||
|
setTitleBar("安全课堂", true)
|
||||||
|
|
||||||
|
binding.run {
|
||||||
|
adapter = recycler.run {
|
||||||
|
layoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
|
||||||
|
addItemDecoration(
|
||||||
|
RecycleViewDivider(
|
||||||
|
LinearLayout.VERTICAL,
|
||||||
|
ConvertUtils.dp2px(10.0f),
|
||||||
|
Color.TRANSPARENT
|
||||||
|
)
|
||||||
|
)
|
||||||
|
adapter = QuestionAdatper()
|
||||||
|
adapter as QuestionAdatper
|
||||||
|
}.apply {
|
||||||
|
setOnItemClickListener { _, _, position ->
|
||||||
|
ActivityUtils.startActivity(
|
||||||
|
mContext,
|
||||||
|
QueDetailActivity::class.java,
|
||||||
|
Bundle().apply {
|
||||||
|
putString(AppConfig.DATA, Gson().toJson(items[position]))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initDate() {
|
||||||
|
DataManager.getInstance().safeClassroomList()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<MutableList<QuestionBean>>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<MutableList<QuestionBean>>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
adapter.submitList(t.data)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.dahe.gldriver.ui.mine.activity
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.databinding.ActivitySettingBinding
|
||||||
|
import com.dahe.gldriver.push.PushHelper
|
||||||
|
import com.dahe.gldriver.utils.CommonPopUtils
|
||||||
|
import com.dahe.gldriver.utils.SPUtils
|
||||||
|
import com.dahe.glex.bean.UserBean
|
||||||
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
|
import com.dahe.mylibrary.callback.PushAliasListener
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SettingActivity
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/27 10:21
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class SettingActivity : BaseActivity<ActivitySettingBinding>(), View.OnClickListener {
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
setStatusBarColor(R.color.white)
|
||||||
|
setTitleBar("设置", true)
|
||||||
|
binding.run {
|
||||||
|
rlOne.setOnClickListener(this@SettingActivity)
|
||||||
|
rlTwo.setOnClickListener(this@SettingActivity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initDate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onClick(view: View?) {
|
||||||
|
super.onClick(view)
|
||||||
|
when (view?.id) {
|
||||||
|
binding.rlOne.id -> {
|
||||||
|
if (binding.svTog.isOpened) {
|
||||||
|
PushHelper.delete(mContext, object : PushAliasListener {
|
||||||
|
override fun onResult(isSuccess: Boolean) {
|
||||||
|
binding.svTog.toggleSwitch(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
PushHelper.setAlias(mContext, object : PushAliasListener {
|
||||||
|
override fun onResult(isSuccess: Boolean) {
|
||||||
|
if (isSuccess){
|
||||||
|
binding.svTog.toggleSwitch(true)
|
||||||
|
}else{
|
||||||
|
showToast("开启失败,请登录重试")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.rlTwo.id -> {
|
||||||
|
CommonPopUtils.getInstance()
|
||||||
|
.showCommCenterPop(mContext, content = "您确定退出当前app么?") {
|
||||||
|
SPUtils.instance.removeUserToken(mContext)
|
||||||
|
ActivityUtils.finishAllActivities()
|
||||||
|
showToast("清除token")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
app/src/main/java/com/dahe/gldriver/utils/AppVersionUtils.kt
Normal file
40
app/src/main/java/com/dahe/gldriver/utils/AppVersionUtils.kt
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.dahe.gldriver.utils
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.dahe.gldriver.bean.AppVersion
|
||||||
|
import com.dahe.gldriver.net.BaseObserver
|
||||||
|
import com.dahe.gldriver.net.DataManager
|
||||||
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
|
import com.dahe.glex.bean.UserBean
|
||||||
|
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||||
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
|
import com.dahe.mylibrary.utils.AppUtils
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName AppVersionUtils
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/26 11:12
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
class AppVersionUtils private constructor() {
|
||||||
|
companion object : SingletonNoPHolder<AppVersionUtils>(::AppVersionUtils)
|
||||||
|
|
||||||
|
fun checkVersion(context: Context) {
|
||||||
|
DataManager.getInstance().getLastAppVersion()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(context, object : RxHttpCallBack<AppVersion>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<AppVersion>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
if (t.data.versionCode> AppUtils.getAppVersionCode()) {
|
||||||
|
CommonPopUtils.getInstance().showUpApp(context,t.data)
|
||||||
|
} else {
|
||||||
|
ToastUtils.showToast(context, "已是最新版本")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
@ -5,11 +5,13 @@ import android.graphics.Color
|
|||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.dahe.gldriver.R
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.bean.AppVersion
|
||||||
import com.dahe.gldriver.bean.CarBean
|
import com.dahe.gldriver.bean.CarBean
|
||||||
import com.dahe.gldriver.callback.OnResultListener
|
import com.dahe.gldriver.callback.OnResultListener
|
||||||
import com.dahe.gldriver.mypop.AgreementAlert
|
import com.dahe.gldriver.mypop.AgreementAlert
|
||||||
import com.dahe.gldriver.mypop.OnCarSelectListener
|
import com.dahe.gldriver.mypop.OnCarSelectListener
|
||||||
import com.dahe.gldriver.mypop.PopBottomCar
|
import com.dahe.gldriver.mypop.PopBottomCar
|
||||||
|
import com.dahe.gldriver.weight.pop.UpAppPop
|
||||||
import com.dahe.mylibrary.base.SingletonNoPHolder
|
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||||
import com.dahe.mylibrary.utils.ConvertUtils
|
import com.dahe.mylibrary.utils.ConvertUtils
|
||||||
import com.lxj.xpopup.XPopup
|
import com.lxj.xpopup.XPopup
|
||||||
@ -142,4 +144,22 @@ class CommonPopUtils private constructor() {
|
|||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app版本检查
|
||||||
|
* @param context Context
|
||||||
|
* @param appVersion AppVersion
|
||||||
|
*/
|
||||||
|
fun showUpApp(context: Context, appVersion: AppVersion) {
|
||||||
|
XPopup.Builder(context)
|
||||||
|
.dismissOnBackPressed(false)
|
||||||
|
.dismissOnTouchOutside(false)
|
||||||
|
.asCustom(
|
||||||
|
UpAppPop(
|
||||||
|
context,
|
||||||
|
appVersion
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.show()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
118
app/src/main/java/com/dahe/gldriver/weight/pop/UpAppPop.kt
Normal file
118
app/src/main/java/com/dahe/gldriver/weight/pop/UpAppPop.kt
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
package com.dahe.gldriver.weight.pop
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import android.view.View.OnClickListener
|
||||||
|
import android.widget.Button
|
||||||
|
import android.widget.ImageButton
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import android.widget.ProgressBar
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.bean.AppVersion
|
||||||
|
import com.king.app.updater.AppUpdater
|
||||||
|
import com.king.app.updater.callback.AppUpdateCallback
|
||||||
|
import com.king.app.updater.constant.Constants
|
||||||
|
import com.lxj.xpopup.core.CenterPopupView
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hlh
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2021/9/6 17:23
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
class UpAppPop : CenterPopupView {
|
||||||
|
private var content: TextView? = null
|
||||||
|
private var vs: TextView? = null
|
||||||
|
private var tvContent: TextView? = null
|
||||||
|
private var tv_cancel: Button? = null
|
||||||
|
private var tv_confirm: Button? = null
|
||||||
|
private var tvOk: Button? = null
|
||||||
|
private var up_div: LinearLayout? = null
|
||||||
|
|
||||||
|
private var con: Context? = null
|
||||||
|
private var progress_view: ProgressBar? = null
|
||||||
|
|
||||||
|
private var force_box: LinearLayout? = null
|
||||||
|
private var force_btn: ImageButton? = null
|
||||||
|
private var appVersion : AppVersion? = null
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
context: Context,
|
||||||
|
appVersion: AppVersion
|
||||||
|
) : super(context) {
|
||||||
|
con = context
|
||||||
|
this.appVersion = appVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getImplLayoutId(): Int {
|
||||||
|
return R.layout.alert_up_app
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
content = findViewById(R.id.tv_content)
|
||||||
|
tv_cancel = findViewById(R.id.tv_cancel)
|
||||||
|
tv_confirm = findViewById(R.id.tv_confirm)
|
||||||
|
tvContent = findViewById(R.id.tvContent)
|
||||||
|
tvOk = findViewById<Button>(R.id.tvOk)
|
||||||
|
up_div = findViewById<LinearLayout>(R.id.up_div)
|
||||||
|
progress_view = findViewById<ProgressBar>(R.id.progress)
|
||||||
|
content = findViewById(R.id.tv_content)
|
||||||
|
force_box = findViewById<LinearLayout>(R.id.force_box)
|
||||||
|
force_btn = findViewById<ImageButton>(R.id.force_btn)
|
||||||
|
if (appVersion?.force == "1") {
|
||||||
|
force_box?.setVisibility(GONE)
|
||||||
|
}
|
||||||
|
force_btn?.setOnClickListener(OnClickListener { v: View? ->
|
||||||
|
visibility = GONE
|
||||||
|
dismiss()
|
||||||
|
})
|
||||||
|
vs = findViewById<TextView>(R.id.vs)
|
||||||
|
content?.setText(appVersion?.content)
|
||||||
|
vs?.setText(appVersion?.versionName)
|
||||||
|
tv_cancel?.setOnClickListener(OnClickListener { v: View? -> System.exit(1) })
|
||||||
|
tv_confirm?.setOnClickListener(OnClickListener { v: View? ->
|
||||||
|
AppUpdater.Builder(con!!)
|
||||||
|
.setUrl(appVersion!!.downloadUrl)
|
||||||
|
.build()
|
||||||
|
.setUpdateCallback(object : AppUpdateCallback() {
|
||||||
|
override fun onStart(url: String) {
|
||||||
|
super.onStart(url)
|
||||||
|
tv_confirm!!.visibility = GONE
|
||||||
|
up_div?.setVisibility(VISIBLE)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onProgress(progress: Long, total: Long, isChange: Boolean) {
|
||||||
|
// Log.e("progress",progress+"");
|
||||||
|
// Log.e("total",total+"");
|
||||||
|
// Log.e("isChange",isChange+"");
|
||||||
|
val sum = progress.toFloat()
|
||||||
|
val max = total.toFloat()
|
||||||
|
if (progress > 0) {
|
||||||
|
val b = sum / max
|
||||||
|
Log.e("百分比", (100 * b).toString() + "")
|
||||||
|
progress_view?.setProgress((100 * b).toInt())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFinish(file: File) {
|
||||||
|
tvContent?.setText("下载完成,请及时安装!")
|
||||||
|
tvOk?.setVisibility(VISIBLE)
|
||||||
|
tvOk?.setOnClickListener(OnClickListener { v1: View? ->
|
||||||
|
com.king.app.updater.util.AppUtils.installApk(
|
||||||
|
context,
|
||||||
|
file,
|
||||||
|
context.packageName + Constants.DEFAULT_FILE_PROVIDER
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.start()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
BIN
app/src/main/res/drawable-xxhdpi/bg_que.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/bg_que.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 226 KiB |
10
app/src/main/res/drawable/bg_btn_blue.xml
Normal file
10
app/src/main/res/drawable/bg_btn_blue.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#ffededf2" />
|
||||||
|
<corners android:topLeftRadius="@dimen/dp_29" android:topRightRadius="@dimen/dp_29"
|
||||||
|
android:bottomLeftRadius="@dimen/dp_29" android:bottomRightRadius="@dimen/dp_29" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
BIN
app/src/main/res/drawable/icon_close.png
Normal file
BIN
app/src/main/res/drawable/icon_close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.0 KiB |
28
app/src/main/res/drawable/par_bg.xml
Normal file
28
app/src/main/res/drawable/par_bg.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 进度条的背景色-->
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="@dimen/dp_14" />
|
||||||
|
<solid android:color="#F2F2F7" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<!-- 缓冲进度条的背景色-->
|
||||||
|
<item android:id="@android:id/secondaryProgress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="@dimen/dp_12" />
|
||||||
|
<solid android:color="@color/theme_color" />
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
<!-- 进度条的背景色-->
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="@dimen/dp_14" />
|
||||||
|
<solid android:color="@color/theme_color"/>
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
BIN
app/src/main/res/drawable/up_img_1.png
Normal file
BIN
app/src/main/res/drawable/up_img_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
19
app/src/main/res/layout/activity_que_detail.xml
Normal file
19
app/src/main/res/layout/activity_que_detail.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_F5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/common_toolbar"></include>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvContent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:padding="@dimen/dp_12"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
25
app/src/main/res/layout/activity_ques.xml
Normal file
25
app/src/main/res/layout/activity_ques.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_F5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/common_toolbar"></include>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_170"
|
||||||
|
android:background="@drawable/bg_que" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
87
app/src/main/res/layout/activity_setting.xml
Normal file
87
app/src/main/res/layout/activity_setting.xml
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/common_toolbar"></include>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/rlOne"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="@dimen/dp_16"
|
||||||
|
android:paddingRight="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="是否开启推送"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
|
<com.dahe.mylibrary.weight.SwitchView
|
||||||
|
android:id="@+id/svTog"
|
||||||
|
app:canEnable="false"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
app:isOpened="true" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_15"
|
||||||
|
android:layout_height="@dimen/dp_15"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@drawable/right_gray" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginLeft="@dimen/dp_16"
|
||||||
|
android:layout_marginRight="@dimen/dp_16"
|
||||||
|
android:background="@color/color_c" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/rlTwo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="@dimen/dp_16"
|
||||||
|
android:paddingRight="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="退出"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_15"
|
||||||
|
android:layout_height="@dimen/dp_15"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@drawable/right_gray" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
171
app/src/main/res/layout/alert_up_app.xml
Normal file
171
app/src/main/res/layout/alert_up_app.xml
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_bai"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="@dimen/dp_1">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_163"
|
||||||
|
android:src="@drawable/up_img_1"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:text="最新版本"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<View
|
||||||
|
android:layout_marginLeft="@dimen/dp_65"
|
||||||
|
android:layout_marginRight="@dimen/dp_65"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#999999"
|
||||||
|
android:alpha="0.5"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/vs"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="1.0.0新版本"
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="#fff"
|
||||||
|
android:paddingLeft="@dimen/dp_4"
|
||||||
|
android:paddingRight="@dimen/dp_4"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<TextView
|
||||||
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
|
android:layout_marginRight="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_9"
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="更新内容"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:gravity="left"
|
||||||
|
/>
|
||||||
|
<View
|
||||||
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
|
android:layout_marginRight="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_14"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#000000"
|
||||||
|
android:alpha="0.1"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<Button
|
||||||
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
|
android:id="@+id/tv_cancel"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="取消"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textColor="#ffa2a2b3"
|
||||||
|
android:background="@drawable/bg_btn_blue"
|
||||||
|
android:layout_marginBottom="@dimen/dp_3"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
<Button
|
||||||
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
|
android:id="@+id/tv_confirm"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="立即更新"
|
||||||
|
android:textColor="@color/theme_color"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginBottom="@dimen/dp_3"/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
|
android:id="@+id/up_div"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
<ProgressBar
|
||||||
|
android:layout_marginLeft="@dimen/dp_30"
|
||||||
|
android:layout_marginRight="@dimen/dp_30"
|
||||||
|
android:id="@+id/progress"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:progress="0"
|
||||||
|
android:minHeight="@dimen/dp_12"
|
||||||
|
android:minWidth="@dimen/dp_12"
|
||||||
|
style="?android:attr/progressBarStyleHorizontal"
|
||||||
|
android:layout_height="@dimen/dp_12"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:progressDrawable="@drawable/par_bg"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvContent"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="飞速下载中"
|
||||||
|
android:textColor="#ff999999"
|
||||||
|
android:textSize="@dimen/sp_8"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
|
android:layout_marginRight="@dimen/dp_18"
|
||||||
|
android:id="@+id/tvOk"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="立即安装"
|
||||||
|
android:textColor="@color/theme_color"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginBottom="@dimen/dp_13"/>
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/force_box"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_width="@dimen/dp_1"
|
||||||
|
android:layout_height="@dimen/dp_50"
|
||||||
|
android:background="#EFEFEF"/>
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/force_btn"
|
||||||
|
android:layout_width="@dimen/dp_30"
|
||||||
|
android:layout_height="@dimen/dp_30"
|
||||||
|
android:src="@drawable/icon_close"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@null"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
59
app/src/main/res/layout/item_question.xml
Normal file
59
app/src/main/res/layout/item_question.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/shape_bg8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/dp_12">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivBg"
|
||||||
|
android:layout_width="@dimen/dp_100"
|
||||||
|
android:layout_height="@dimen/dp_68"
|
||||||
|
android:background="@color/color_c" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_68"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_12"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:paddingRight="@dimen/dp_8"
|
||||||
|
android:text="安全提示"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:lineSpacingExtra="@dimen/dp_6"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="2023年10月3日"
|
||||||
|
android:textColor="@color/color_9"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -87,6 +87,10 @@ dependencies {
|
|||||||
api 'io.github.lucksiege:compress:v3.11.2'
|
api 'io.github.lucksiege:compress:v3.11.2'
|
||||||
api 'org.greenrobot:eventbus:3.3.1'
|
api 'org.greenrobot:eventbus:3.3.1'
|
||||||
|
|
||||||
|
//更新版本
|
||||||
|
api 'com.github.jenly1314.AppUpdater:app-updater:1.2.0'
|
||||||
|
api 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0'
|
||||||
|
|
||||||
// api 'com.gyf.cactus:cactus:1.1.3-beta13'
|
// api 'com.gyf.cactus:cactus:1.1.3-beta13'
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
package com.dahe.mylibrary.bean;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class VersionBean implements Serializable {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private ParamsDao data;
|
|
||||||
|
|
||||||
public ParamsDao getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(ParamsDao data) {
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class ParamsDao implements Serializable{
|
|
||||||
private int versionId;
|
|
||||||
private int version;
|
|
||||||
private String versionName;
|
|
||||||
private String introduce;
|
|
||||||
private String updateType;
|
|
||||||
private String createTime;
|
|
||||||
private String remark;
|
|
||||||
private String apkUrl;
|
|
||||||
|
|
||||||
public String getApkUrl() {
|
|
||||||
return apkUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApkUrl(String apkUrl) {
|
|
||||||
this.apkUrl = apkUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getVersionId() {
|
|
||||||
return versionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersionId(int versionId) {
|
|
||||||
this.versionId = versionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getVersion() {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersion(int version) {
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVersionName() {
|
|
||||||
return versionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersionName(String versionName) {
|
|
||||||
this.versionName = versionName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIntroduce() {
|
|
||||||
return introduce;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIntroduce(String introduce) {
|
|
||||||
this.introduce = introduce;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUpdateType() {
|
|
||||||
return updateType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUpdateType(String updateType) {
|
|
||||||
this.updateType = updateType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(String createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemark() {
|
|
||||||
return remark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRemark(String remark) {
|
|
||||||
this.remark = remark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.dahe.mylibrary.callback
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SwitchListener
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/27 14:54
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
interface PushAliasListener {
|
||||||
|
fun onResult(isSuccess: Boolean)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user