philipplackner / TodoList

102 stars 92 forks source link

tvTodoTitle disappeared #2

Open sha-wake opened 3 years ago

sha-wake commented 3 years ago

In TodoAdapter

tvTodoTitle?.paintFlags = tvTodoTitle?.paintFlags?. or (STRIKE_THRU_TEXT_FLAG)!!
tvTodoTitle?.paintFlags = tvTodoTitle?.paintFlags?. and (STRIKE_THRU_TEXT_FLAG)?.inv()!!

My Android studio suggested me to write like this, but when I ran the code, the Title is not showing. How can I fix this . Sorry, I am new to learn the andoid .

socialrupt commented 3 years ago
private fun toggleStrikeThrough(tvToodleTitle: TextView, isChecked: Boolean) {
    if(isChecked) {
        tvToodleTitle.paintFlags = tvToodleTitle.paintFlags or STRIKE_THRU_TEXT_FLAG
    } else {
        tvToodleTitle.paintFlags = tvToodleTitle.paintFlags and STRIKE_THRU_TEXT_FLAG.inv()
    }
}

Copy and paste this. maybe it will work.

segunenix commented 1 year ago

i am having that issue too, pls how do i fix it