mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-02-10 00:10:48 +01:00
reduce the alpha and strike thru text of completed tasks
This commit is contained in:
parent
441b2d204e
commit
2d61509590
@ -1,5 +1,6 @@
|
|||||||
package com.simplemobiletools.notes.pro.adapters
|
package com.simplemobiletools.notes.pro.adapters
|
||||||
|
|
||||||
|
import android.graphics.Paint
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
@ -51,6 +52,14 @@ class ChecklistAdapter(activity: BaseSimpleActivity, var items: ArrayList<Checkl
|
|||||||
checklist_title.apply {
|
checklist_title.apply {
|
||||||
text = checklistItem.title
|
text = checklistItem.title
|
||||||
setTextColor(textColor)
|
setTextColor(textColor)
|
||||||
|
|
||||||
|
if (checklistItem.isDone) {
|
||||||
|
paintFlags = Paint.STRIKE_THRU_TEXT_FLAG
|
||||||
|
alpha = 0.4f
|
||||||
|
} else {
|
||||||
|
paintFlags = 0
|
||||||
|
alpha = 1f
|
||||||
|
}
|
||||||
}
|
}
|
||||||
checklist_holder.isSelected = isSelected
|
checklist_holder.isSelected = isSelected
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
package com.simplemobiletools.notes.pro.models
|
package com.simplemobiletools.notes.pro.models
|
||||||
|
|
||||||
data class ChecklistItem(val id: Int, val title: String, val isDone: Boolean)
|
data class ChecklistItem(val id: Int, var title: String, var isDone: Boolean)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user