Android Tutorial PreferenceActivity tutorial

SandroB4A

Member
Licensed User
Longtime User
Thanks Erel for your reply!

You can use a single manager and screen. Put it in Process_Globals and it will be accessible from other activities as well.
This was my first idea but something didn't work, I'll retry again paying more attention.

You cannot change the color or text style of the preference screen.
Ok, it's not a big problem.

Bye!
 

SandroB4A

Member
Licensed User
Longtime User
Ok, I just forgot to put the prefix with name of Activity where the settings was created :BangHead:

I take the chance to do another question: it's possible to launch the AH color dialog pressing an item on Preference Activity?

I'd like to give the user the possibility to change the interface color in a smart way instead of selecting predefined color on a listview.

Thanks
 

sorex

Expert
Licensed User
Longtime User
just wondering...

Can I use hidden settings with this system so that I don't need to read/write an extra ini/settings file?
 

sorex

Expert
Licensed User
Longtime User
Is this documented anywhere? it's not mentioned in this thread.
 

sorex

Expert
Licensed User
Longtime User
thanks!

so I could use

setstring("lastupdate",datetime.now)

and those addcheckbox and other prefscreen commands also envoke this setstring command at click events?
 

sorex

Expert
Licensed User
Longtime User
but when I use it in that preference activity it means an autosave of data?
 

CidTek

Active Member
Licensed User
Longtime User
You can use a single manager and screen. Put it in Process_Globals and it will be accessible from other activities as well.

You cannot change the color or text style of the preference screen.

What fonts and size do you use in the Preference screen? I would like to make some other activities use similar font styles.
 

alexis

Member
Licensed User
Longtime User
Manager Variable

Hello. I saw that the variable "manager" is declared as PreferenceManager but then I don't see it initialized or anything else until it is used to set/retrieve the key values set on the preference screens.
My question is:
Should I declared only one variable as a PreferenceManager in the whole project? if so, does it have to be named "manager"?
and if I can declare more than one, how the program knows which key belong to which PreferenceManager?
 

noclass1980

Active Member
Licensed User
Longtime User
 

yttrium

Active Member
Licensed User
Longtime User

What Android version are you on, and what is your target API level?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…