android - which is better to execute Database query on MainActivity or SubActivity -


i following tutorial making notepad, tutorial using 2 activity main activity , edit activity, edit activity using fill data database , query executed in main activity data must sent onactivityresult edit activity main activity .
the main question want know why must pass data main activity instead of execute insert or update query on edit activity, best way?,

can explain why?

there have 2 activities, 1 (main) meant ust display notes, other (edit) let user create note. when user confirms creation of new note in editactivity, finish , in mainactivity's "onactivityresult" notes loaded , displayed in list. if want separate creation visualization of (i highly suggest this), want approach.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -