fix: default should show ext
This commit is contained in:
parent
23b7b6c6eb
commit
2e3a85ff38
4 changed files with 14 additions and 12 deletions
|
@ -31,10 +31,10 @@ class DocumentAdapter(context: Context, list: ArrayList<DocumentModel>) :
|
|||
)
|
||||
val model = getItem(position) ?: throw RuntimeException()
|
||||
val card = listView.findViewById<TextView>(R.id.iconButton)
|
||||
card.text = if (hideExtension == false) {
|
||||
model.name
|
||||
} else {
|
||||
card.text = if (hideExtension == true) {
|
||||
model.nameWithoutExt
|
||||
} else {
|
||||
model.name
|
||||
}
|
||||
return listView
|
||||
}
|
||||
|
|
|
@ -39,10 +39,11 @@ class ImageAdapter(context: Context, list: ArrayList<ImageModel>) :
|
|||
)
|
||||
val model = getItem(position) ?: throw RuntimeException()
|
||||
listView.findViewById<ImageView>(R.id.pictureCardImage).setImageBitmap(model.thumbnail)
|
||||
listView.findViewById<TextView>(R.id.pictureCardText).text = if (hideExtension == false) {
|
||||
model.name
|
||||
} else {
|
||||
val card = listView.findViewById<TextView>(R.id.pictureCardText)
|
||||
card.text = if (hideExtension == true) {
|
||||
model.nameWithoutExt
|
||||
} else {
|
||||
model.name
|
||||
}
|
||||
listView.setLayoutParams(LayoutParams(GridView.AUTO_FIT, 530))
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@ class MusicAdapter(context: Context, list: ArrayList<MusicModel>) :
|
|||
)
|
||||
val model = getItem(position) ?: throw RuntimeException()
|
||||
val card = listView.findViewById<TextView>(R.id.iconButton)
|
||||
card.text = if (hideExtension == false) {
|
||||
model.name
|
||||
} else {
|
||||
card.text = if (hideExtension == true) {
|
||||
model.nameWithoutExt
|
||||
} else {
|
||||
model.name
|
||||
}
|
||||
return listView
|
||||
}
|
||||
|
|
|
@ -42,10 +42,11 @@ class VideoAdapter(context: Context, list: ArrayList<VideoModel>) :
|
|||
)
|
||||
val model = getItem(position) ?: throw RuntimeException()
|
||||
listView.findViewById<ImageView>(R.id.pictureCardImage).setImageBitmap(model.thumbnail)
|
||||
listView.findViewById<TextView>(R.id.pictureCardText).text = if (hideExtension == false) {
|
||||
model.name
|
||||
} else {
|
||||
val card = listView.findViewById<TextView>(R.id.pictureCardText)
|
||||
card.text = if (hideExtension == true) {
|
||||
model.nameWithoutExt
|
||||
} else {
|
||||
model.name
|
||||
}
|
||||
listView.setLayoutParams(LayoutParams(GridView.AUTO_FIT, 530))
|
||||
|
||||
|
|
Loading…
Reference in a new issue