mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-31 09:36:58 +01:00
Disable expand/collapse when there's only one item
This commit is contained in:
parent
ad6abf7ccc
commit
66363caf4c
@ -10,10 +10,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||
import com.simplemobiletools.commons.extensions.getTextSize
|
||||
import com.simplemobiletools.commons.extensions.onGlobalLayout
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
|
||||
import com.simplemobiletools.smsmessenger.R
|
||||
import com.simplemobiletools.smsmessenger.activities.SimpleActivity
|
||||
@ -83,12 +80,15 @@ class VCardViewerAdapter(
|
||||
.into(this)
|
||||
}
|
||||
expand_collapse_icon.applyColorFilter(textColor)
|
||||
if (items.size > 1) {
|
||||
setOnClickListener {
|
||||
expandOrCollapseRow(view, item)
|
||||
}
|
||||
}
|
||||
onGlobalLayout {
|
||||
if (items.size == 1) {
|
||||
expandOrCollapseRow(view, item)
|
||||
view.expand_collapse_icon.beGone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user