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.bitmap.RoundedCorners
|
||||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||||
import com.bumptech.glide.request.RequestOptions
|
import com.bumptech.glide.request.RequestOptions
|
||||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
|
||||||
import com.simplemobiletools.commons.extensions.getTextSize
|
|
||||||
import com.simplemobiletools.commons.extensions.onGlobalLayout
|
|
||||||
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
|
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
|
||||||
import com.simplemobiletools.smsmessenger.R
|
import com.simplemobiletools.smsmessenger.R
|
||||||
import com.simplemobiletools.smsmessenger.activities.SimpleActivity
|
import com.simplemobiletools.smsmessenger.activities.SimpleActivity
|
||||||
@ -83,12 +80,15 @@ class VCardViewerAdapter(
|
|||||||
.into(this)
|
.into(this)
|
||||||
}
|
}
|
||||||
expand_collapse_icon.applyColorFilter(textColor)
|
expand_collapse_icon.applyColorFilter(textColor)
|
||||||
setOnClickListener {
|
if (items.size > 1) {
|
||||||
expandOrCollapseRow(view, item)
|
setOnClickListener {
|
||||||
|
expandOrCollapseRow(view, item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onGlobalLayout {
|
onGlobalLayout {
|
||||||
if (items.size == 1) {
|
if (items.size == 1) {
|
||||||
expandOrCollapseRow(view, item)
|
expandOrCollapseRow(view, item)
|
||||||
|
view.expand_collapse_icon.beGone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user