Android LoaderManager Callbacks -


hi i'm using onloadfinished callback set variables

public class mainactivity   ...  double foo;  ...  public void onloadfinished(loader<cursor> loader, cursor cursor) {              if (cursor.movetofirst()){                 int index = cursor.getcolumnindex(database_table.field);                 double value = cursor.getdouble(index);                 if (lat > 0)                     **foo = value;**              }          } 

but, when try use variable seems unset.

what doing wrong?

should synchronize method main thread?

p.d cursor have data.

the mainactivity class has implement loadercallbacks interface like

public class mainactivity implements loadermanager.loadercallbacks<cursor>   

then should provide instance parameter initloader method


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -