全局图标优化
This commit is contained in:
@@ -47,7 +47,7 @@ class AddDeviceAdapter(
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val device = devices[position]
|
||||
holder.tvName.text = device.name
|
||||
holder.ivIcon.setImageResource(R.drawable.img)
|
||||
holder.ivIcon.setImageResource(R.mipmap.img)
|
||||
|
||||
// 点击事件
|
||||
holder.itemView.setOnClickListener { onItemClick(device) }
|
||||
|
||||
@@ -49,7 +49,7 @@ class PersonalFragment : Fragment() {
|
||||
.titleBar(binding.headerLayout)
|
||||
.init()
|
||||
Glide.with(this)
|
||||
.load(R.drawable.img)
|
||||
.load(R.mipmap.img)
|
||||
.circleCrop()
|
||||
.into(binding.ivAvatar)
|
||||
binding.headerLayout.setOnClickListener {
|
||||
@@ -243,8 +243,8 @@ class PersonalFragment : Fragment() {
|
||||
}
|
||||
userInfo.avatar?.let {
|
||||
val requestOptions = RequestOptions()
|
||||
.placeholder(R.drawable.img) // 加载中显示
|
||||
.error(R.drawable.img) // 失败时显示
|
||||
.placeholder(R.mipmap.img) // 加载中显示
|
||||
.error(R.mipmap.img) // 失败时显示
|
||||
|
||||
Glide.with(this)
|
||||
.load(it) // 如果 avatar 为 null,Glide 会直接回调 error
|
||||
|
||||
@@ -77,8 +77,8 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
.setLockLand(false)
|
||||
.setShowFullAnimation(true)
|
||||
.setNeedShowWifiTip(false)
|
||||
.setEnlargeImageRes(R.drawable.full_size)
|
||||
.setShrinkImageRes(R.drawable.full_screen)
|
||||
.setEnlargeImageRes(R.mipmap.full_size)
|
||||
.setShrinkImageRes(R.mipmap.full_screen)
|
||||
.setBottomShowProgressBarDrawable(progressDrawable, thumbDrawable)
|
||||
.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||
override fun onPrepared(url: String?, vararg objects: Any?) {
|
||||
@@ -230,12 +230,12 @@ class AlarmLogActivity : AppCompatActivity() {
|
||||
if (isMute) {
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 0, 0)
|
||||
binding.ivMute.setImageResource(
|
||||
R.drawable.mute
|
||||
R.mipmap.mute
|
||||
)
|
||||
} else {
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC) / 2, 0)
|
||||
binding.ivMute.setImageResource(
|
||||
R.drawable.un_mute
|
||||
R.mipmap.un_mute
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,9 +198,9 @@ class LiveVideoActivity : BaseActivity() {
|
||||
isLightOn = !isLightOn
|
||||
|
||||
if (isLightOn) {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.drawable.light_on_open)
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.mipmap.light_on_open)
|
||||
} else {
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.drawable.light_on)
|
||||
binding.ivLight.setImageResource(com.example.defenseapplication.R.mipmap.light_on)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ object ToastUtils {
|
||||
|
||||
// 设置图标和文字
|
||||
if (isSuccess) {
|
||||
ivIcon.setImageResource(R.drawable.fill) // 成功图标
|
||||
ivIcon.setImageResource(R.mipmap.fill) // 成功图标
|
||||
} else {
|
||||
ivIcon.setImageResource(R.drawable.error_circle) // 失败图标
|
||||
ivIcon.setImageResource(R.mipmap.error_circle) // 失败图标
|
||||
}
|
||||
tvMessage.text = message
|
||||
|
||||
|
||||
Reference in New Issue
Block a user