The change of R was my guess too and the main reason why I asked here. Ahh, ok, I understand, you would save color names or the code like #RRGGBB. But what happens when I delete or change colors... Once a color is part of my app i can't remove it, cause users who used them saved the code or name into the database and then there is a problem...
What do you think about a separate database table? Not good? Thank you! -Danny Schimke 2010/12/7 Kostya Vasilyev <[email protected]> > Danny, > > The values in R can change as you add and remove resources. > > I'd say store color names, or actual RGB values (and match them to names > when need to present to the user). > > -- Kostya > > 07.12.2010 16:56, Danny Schimke пишет: > >> Hi, >> >> I have 2 textual inputs that I saved to database, furthermore I have a >> spinner with color selection. Color names and color values both stored in >> the application resources. I want to save a color in the database, but what >> is the best way to do this in your mind? Should I save the resource id? I >> figured out, that the int value of the color resource is allways the same, >> e.g. when I delete the "R" file and let it recreate. I do not have the >> certainty that this is correct?! >> >> Or would you put colors in a seperate database table instead using >> resources for this? This seems to be a good way and the user is able to add >> own colors to the application. >> >> I don't know what is the best way to store this. What are your >> experiences? >> >> Thank you very much! >> -Danny Schimke >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > -- > Kostya Vasilyev -- WiFi Manager + pretty widget -- > http://kmansoft.wordpress.com > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

