listview - Android ActionBarActivity textview from custom cursor adapter -


i need following... have listview actionbar(with textview) , listview populated custom cursor adapter.

i want update textview on actionbar on specific activity in custom cursor adapter class. (when user types number in different listrows want sum of rows displayed on actionbar) now, have covered operation, need display number on textview on actionbar. how can that?

my custom cursor extends cursoradapter, not actionbaractivity. can somehow actionbar textview in cursor adapter , set there?

cursoradapter requires pass in context when initialize it. if want update actionbar within cursoradapter, initialize actionbar object casting activity constructor's context.

private final actionbar mactionbar;  public youradapter (context context, cursor c, int flags) {     mactionbar = ((activity) context).getactionbar(); } 

Comments