3 Replies - 1905 Views - Last Post: 10 January 2012 - 08:01 AM

#1 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Add settings-support in my app

Posted 02 January 2012 - 06:19 AM

Hi.
I would like to add settings-support in my app. (menu-button->settings)
So, my question is, how do i save my settings and then access them from different activities?

i've been googeling around, but didn't find any clear and useful information or help.


Thanks in advance :)

Is This A Good Question/Topic? 0
  • +

Replies To: Add settings-support in my app

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10786
  • View blog
  • Posts: 40,163
  • Joined: 27-December 08

Re: Add settings-support in my app

Posted 02 January 2012 - 12:51 PM

Designing a StateManager is a good way to do this. Remember to separate your logic/data from your GUI.
Was This Post Helpful? 0
  • +
  • -

#3 htc(hot-taco-cheese)  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 71
  • Joined: 04-December 10

Re: Add settings-support in my app

Posted 02 January 2012 - 01:17 PM

You can also use preferences.

Here is a tutorial

Example of them implemented in an app: (Android's stock music player)
SettingsActivity.java
settings.xml

This post has been edited by htc(hot-taco-cheese): 02 January 2012 - 01:21 PM

Was This Post Helpful? 3
  • +
  • -

#4 EndLessMind  Icon User is offline

  • These are the droids you're looking for
  • member icon

Reputation: 194
  • View blog
  • Posts: 1,099
  • Joined: 13-March 09

Re: Add settings-support in my app

Posted 10 January 2012 - 08:01 AM

Thanks :)
I manage to get it to work just fine :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1