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
Post a Comment