Commit 08e6c416 authored by wanglei's avatar wanglei

...

parent 7e5a143d
......@@ -97,6 +97,7 @@ class LargeFileActivity : BaseActivity<ActivityLargeFileBinding>() {
binding.flFilter.setOnClickListener {
showLargeFileTypeDialog(selectType) { type ->
selectType = type
binding.tvType.text = selectType
largeFileAdapter.setData(largeData.filter { selectFilter(it) })
}
}
......
......@@ -30,12 +30,12 @@ object ConstObject {
const val SCAN_DOCUMENTS = 2
const val SCAN_VIDEOS = 3
const val SELECT_FILE_ALL = 0
const val SELECT_FILE_PICTURE = 1
const val SELECT_FILE_VIDEO = 2
const val SELECT_FILE_AUDIO = 3
const val SELECT_FILE_DOCUMENT = 4
const val SELECT_FILE_OTHER = 5
const val SELECT_FILE_ALL = "All types"
const val SELECT_FILE_PICTURE = "Picture"
const val SELECT_FILE_VIDEO = "Video"
const val SELECT_FILE_AUDIO = "Audio"
const val SELECT_FILE_DOCUMENT = "Document"
const val SELECT_FILE_OTHER = "Other types"
var ifAgreePrivacy = false
......
......@@ -332,7 +332,7 @@ object DialogViews {
}
}
fun Context.showLargeFileTypeDialog(type: Int, click: (type: Int) -> Unit) {
fun Context.showLargeFileTypeDialog(type: String, click: (type: String) -> Unit) {
val binding = DialogLargeFileTypeBinding.inflate(LayoutInflater.from(this))
val dialog = AlertDialog.Builder(this).create()
dialog.setView(binding.root)
......
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