There is an application that downloads lines from the network, enters them into the database and lists them on 协袣袪袗袧袝 1 . The user selects several options from the list, and they appear in the new list on 协袣袪袗袧袝 2 . When the application is restarted, the list should not disappear on 协袣袪袗袧袝 2 , in addition, the user may from time to time delete / add / change the list on 协袣袪袗袧袝 2 . Actually the question is: how to implement this task correctly in terms of oop and android architecture?
Store the list with 协袣袪袗袧袗 2 in onSaveInstance , or create a second database, and use it to manage the list on 协袣袪袗袧袝 2 (will the applications slow down due to 2 databases?)? Or is there some kind of 3rd right path?

  • one
    1. When you restart the application. 2. it is not necessary to create a second database, it is enough to create a second table. This option is correct - Vladyslav Matviienko
  • @metalurgus i.e. In such a situation, the surest way is to create a second table in the same database, right? - ivanovd422
  • The data stored in onSaveInstance will be lost when exiting the application, you need another table with selected results in the same database. - pavlofff
  • And in the second table it is enough to save only the ID of the records selected from the first table, that is, between them there will be a one-to-one connection - pavlofff
  • four
    You can still do one table. In the main table, make another field-sign, selected this entry for the screen2 or not. Then just do a sample of this field for the screen2, in a number of cases this decision is preferable - pavlofff

0