1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-10 04:52:38 +01:00

Merge pull request #1697 from AllanWang/kpref-text-seekbar

Append percentage on first bind
This commit is contained in:
Allan Wang 2020-07-18 19:06:28 -07:00 committed by GitHub
commit 1b26bce26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,9 +46,7 @@ class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) {
@SuppressLint("MissingSuperCall")
override fun bindView(holder: ViewHolder, payloads: List<Any>) {
super.bindView(holder, payloads)
descOriginalSize = holder.desc?.textSize ?: 1f
holder.desc?.layoutParams
builder.toText = {
holder.desc?.setTextSize(
TypedValue.COMPLEX_UNIT_PX,
@ -56,6 +54,7 @@ class KPrefTextSeekbar(builder: KPrefSeekbarContract) : KPrefSeekbar(builder) {
)
"$it%"
}
super.bindView(holder, payloads)
}
override fun unbindView(holder: ViewHolder) {