T
T
tadius2019-04-04 21:48:13
Java
tadius, 2019-04-04 21:48:13

Android. Where to store mutable string resources?

There is a ready-made payroll application. It has 5 categories - salary, advance payment, sick leave, vacation pay, other. Categories are stored in the SQLite database with values ​​0-4 respectively. Now the category name is converted in the method that assigns the name by number from the database. Also, when adding to the database, there is a drop-down list with these categories, which are stored as a string array in the resource file.
I want to implement the possibility of renaming these categories by the user. You can add one more column to the database table with a category string name, but you don't want to change the existing structure. Where and how else can you do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2019-04-04
@zagayevskiy

in db

C
Carburn, 2019-04-05
@Carburn

Have you heard of normalization? Create a separate table Категория. Or even store the title in SharedPreferences.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question