全局图标优化2
This commit is contained in:
@@ -8,6 +8,7 @@ import android.util.Log
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
import com.example.defenseapplication.R
|
import com.example.defenseapplication.R
|
||||||
import com.example.defenseapplication.adapter.AlarmLogHorizontalAdapter
|
import com.example.defenseapplication.adapter.AlarmLogHorizontalAdapter
|
||||||
import com.example.defenseapplication.base.BaseActivity
|
import com.example.defenseapplication.base.BaseActivity
|
||||||
@@ -27,6 +28,7 @@ class LiveVideoActivity : BaseActivity() {
|
|||||||
|
|
||||||
private var isVoiceEnabled = false
|
private var isVoiceEnabled = false
|
||||||
private var isLightOn = false
|
private var isLightOn = false
|
||||||
|
private var isConsoleVisible = false
|
||||||
private var deviceId: String? = null
|
private var deviceId: String? = null
|
||||||
private var alarmList: MutableList<DeviceAlarmBean> = mutableListOf()
|
private var alarmList: MutableList<DeviceAlarmBean> = mutableListOf()
|
||||||
private var alarmAdapter: AlarmLogHorizontalAdapter? = null
|
private var alarmAdapter: AlarmLogHorizontalAdapter? = null
|
||||||
@@ -210,6 +212,31 @@ class LiveVideoActivity : BaseActivity() {
|
|||||||
intent.putExtra("from_live_video", true)
|
intent.putExtra("from_live_video", true)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.llRecord.setOnClickListener {
|
||||||
|
isConsoleVisible = !isConsoleVisible
|
||||||
|
if (isConsoleVisible) {
|
||||||
|
binding.llAlarmLog.visibility = View.GONE
|
||||||
|
binding.consoleBar.visibility = View.VISIBLE
|
||||||
|
binding.ivRecord.setImageResource(R.mipmap.copy_open)
|
||||||
|
} else {
|
||||||
|
binding.llAlarmLog.visibility = View.VISIBLE
|
||||||
|
binding.consoleBar.visibility = View.GONE
|
||||||
|
binding.ivRecord.setImageResource(R.mipmap.copy)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.llVoice.setOnClickListener {
|
||||||
|
isVoiceEnabled = !isVoiceEnabled
|
||||||
|
if (isVoiceEnabled) {
|
||||||
|
Glide.with(this)
|
||||||
|
.asGif()
|
||||||
|
.load(R.mipmap.voice_open)
|
||||||
|
.into(binding.ivVoice)
|
||||||
|
} else {
|
||||||
|
binding.ivVoice.setImageResource(R.mipmap.voice)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchAlarmList(page: Int = 1) {
|
private fun fetchAlarmList(page: Int = 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user