Questions tagged [preference]

445 questions
0
votes
1 answer

Preference bundle icon for theos tweak

possibly an easy answer to this.? I have a theos built tweak with a preference bundle displayed in the settings app. This allows me to activate / deactivate my tweak. My question is, how do you put an icon on the main settings app list along side…
John Clifford
  • 16
  • 1
  • 5
0
votes
0 answers

Android preference non-deprecated onClickListener

I've recently started coding an app and I've come to add preferences. Now I need some kind of non-deprecated onClickListener. I want to be able to clear a set of SharedPreferences using this preference which should be handled as a button. Is that…
rhbvkleef
  • 214
  • 3
  • 12
0
votes
1 answer

Android: How to implement simple "rate it" preferences button?

I've googled and searched for an answer to my question but all I can find is people asking about rating systems that pop up a dialogue after a number of launches. My application is for a live wallpaper so I expect most people to launch and set it…
SDKP
  • 3
  • 1
0
votes
1 answer

The constructor is undefinedd

So I'm trying to incorporate a changelog into my app. And everything works well if I put this code into the onCreate method of my activity but I don't want that, I want it to work when the user clicks the "changelog" preference in my preferences…
Fernando
  • 450
  • 1
  • 7
  • 22
0
votes
1 answer

Cannot set bool simple-prefs

This is the preference I'm trying to set: { "name": "datestamp", "title": "Date stamp?", "type": "bool", "value": true } Heres the addon code, preference.js var preference = require("simple-prefs"); exports.set…
bobbyrne01
  • 6,295
  • 19
  • 80
  • 150
0
votes
3 answers

Naming preference: getSupportedModes() vs supportedModes()?

I'm having hard time deciding which name to choose for my method. I think they both are pretty much self-explanatory, but the latter is faster to type, so, my current preference is supportedModes(). What do you think?
Tower
  • 98,741
  • 129
  • 357
  • 507
0
votes
0 answers

Dedicated class to store results from shared Preferences

this may be a stupid question as I am new to this, but is there anyway to create a class which stores not the sharedpreferences of a user but the result of shared preferences? As I have a main screen which will be generating possibly hundreds of…
ToeKnee
  • 47
  • 1
  • 10
0
votes
1 answer

Preference default value not activating

I have a weird problem in my program. I need to click the preference menu before the defaults value are activated. This is not good... How can you make the preference default value activated when the program starts and not when you click on the…
The One
  • 1,085
  • 6
  • 13
  • 25
0
votes
2 answers

include layout into preference

I have a layout for the header and the footer. And I also have a preference.xml layout. What I want to do right now is I want to include the normal layout into the preference.xml Any idea on how to include the normal xml layout into the…
MAJ
  • 27
  • 1
  • 6
0
votes
3 answers

"prefs" showing up as NOT used?

I'm trying to save a string in preference by adding it to the editor when a user press a button. Then i'm trying to retreieve the strings from the preference and turn it into an arrayList. in onCreate this.context =…
user2872261
  • 151
  • 1
  • 2
  • 7
0
votes
0 answers

onSharedPreferenceChanged() can't be called any way when Preference changes

this might seems a often-asked question, but I still cannot get through, using very method proposed on Stack Overflow. I have a preference.xml as below:
Yuchun Cui
  • 69
  • 2
  • 7
0
votes
0 answers

Change background of row in PrefefenceActivity

I have a problem with Preference, I can't change the background of row(checkboxpreference, edittextpreference,..) . anyone know this function in PreferenceActivity. Tone of thanks, Regards,
0
votes
1 answer

Custom Dialog preference with a list view in android

I need to add a search bar editText in a list preference. Could anyone please guide me on how to build a custom listpreference and how to integrate that in my xml preference file. Thank you in advance.
0
votes
1 answer

Trying to establish best practices for SharedPreferences

I am trying to work out the best practice for accessing SharedPreferences. Should they ALWAYS be accessed through the PreferenceManager? And can they ONLY be read and written to via the UI thread? Any pointers or links to where I can read about this…
helper
  • 15
  • 5
0
votes
1 answer

Add preferences on button click - Android

I need a preference screen with multiple contact details. So I have 1 by default and a button "Add Contact" to add additional contacts. For some reason, it all works well, but the new preference does not show up when I visit the settings again.…
rtindru
  • 5,107
  • 9
  • 41
  • 59