android - How to mark textview as strike through in Expandable Listview -


when call action mode on expandable listview item, 1 of options mark done.

what in onactionitemclicked, child_clicked view long clicked:

textview row = (textview) child_clicked.findviewbyid(r.id.todotitle); if (todo.getstatus() == 1) {     int count = msqlitehelper.marktodoascomplete(id, msqlitedatabase);     row.setpaintflags(row.getpaintflags() & ~paint.strike_thru_text_flag); } else {     int count = msqlitehelper.marktodoasactive(id, msqlitedatabase);     row.setpaintflags(row.getpaintflags() & (~paint.strike_thru_text_flag)); } 

row layout looks this:

<linearlayout>      <textview android:id="@+id/todotitle"/> </linearlayout> 

but nothing happening, no errors. have done here make work?

apply code textview of expandablelistview item.

tv.setpaintflags(tv.getpaintflags() | paint.strike_thru_text_flag); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -