Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvTodoTitle disappeared #2

Open
sha-wake opened this issue Jun 7, 2021 · 2 comments
Open

tvTodoTitle disappeared #2

sha-wake opened this issue Jun 7, 2021 · 2 comments

Comments

@sha-wake
Copy link

sha-wake commented Jun 7, 2021

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants