Commit d7975c25 authored by fengruiyu's avatar fengruiyu

项目的页面禁止旋转已完成

精选体验的下标越界已修改
parent f2f1ec67
......@@ -49,19 +49,20 @@ class ItemEnterDestinationAdapter(
holder.binding.tvName.text = it[position].area
holder.binding.tvNumberPeople.text = "${it[position].activeNum}W人去过"
it[position].url?.let { url ->
for (index in 0..2) {
val size = it[position].url?.size?:0
for (index in 0 until size) {
when (index) {
0 -> {
ImageLoader.ImageBuilder.with(context)
.setUrl(url[index]).setTargetView(holder.binding.image3).start()
.setUrl(url[index]).setTargetView(holder.binding.image3).start()
}
1 -> {
ImageLoader.ImageBuilder.with(context)
.setUrl(url[index]).setTargetView(holder.binding.image2).start()
.setUrl(url[index]).setTargetView(holder.binding.image2).start()
}
2 -> {
ImageLoader.ImageBuilder.with(context)
.setUrl(url[index]).setTargetView(holder.binding.image1).start()
.setUrl(url[index]).setTargetView(holder.binding.image1).start()
}
}
......
......@@ -7,7 +7,7 @@ class VreperienceBean: Serializable {
inner class Data(
val activeNum: Double,
val area: String,
val url: List<String>
val url: List<String>?=null
)
}
......
......@@ -79,17 +79,8 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_PHONE_STATE
)
.request(RequestCallback { allGranted, grantedList, deniedList ->
})
}
override fun onResume() {
super.onResume()
viewModel.checkUpgrade()
}
var oldTime: Long = 0
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
when (keyCode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment