android - Createloader not being called -
i'm facing peculiar problem, have 2 separate activities, if required both might call 1 fragment inserting data in local db. since fragment common kept should be. working , in 1st activity. utter dismay when try same thing other activity never works.
i debugged , found whenever i'm calling initloader method, didn't go createloader method. doesn't matter whether use force load or not doesn't work, comes down directly loadfinished method.
i'm pretty confused why work 1st activity , why not work second, anyway fragment can call correct?
edit:
two activities opening same fragment, inside fragment there loader insert data in local db using asynctask loader. since same fragment loader id same, doing
getactivity().getsupportloadermanager().destroyloader(loader.getid());
at end of loadfinshed loader id removed. , not case 1st activity started @ first, if go second 1 doesn't work, if go other 1 works.
createloader not called goes directly loadfinshed.
any hint might doing wrong?
Comments
Post a Comment