• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris

Store textview color

Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm pretty new to Android development. Little by little I'm learning heaps of new things. After a few tutorials I'm making a program with al kinds of basic features so I know how to do it myself.

One of the features is changing the color of a textview (mWelcomeUser) by input of the user. When he/she pushes on the "SetColor" button, a dialog shows with different colors. This all works fine untill the orientation changes. I want to safe my color in onPause() and retrieve it in onResume(). The colorsettings are set in color.xml.

So If the user selects purple;

So the color isnt stored as an hex number to a variable. Thats what is giving me a hard time. If it was a hex value I could write that to an int (or a string) variable and retrieve it. But thats not the case here.
What should I do to make this works? It should be something like this (imo):

Thank you,
What a stench! Central nervous system shutting down. Save yourself tiny ad!
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
    Bookmark Topic Watch Topic
  • New Topic