Questions tagged [preference]

445 questions
337
votes
11 answers

How to open Visual Studio Code's 'settings.json' file

I did it many times, and each time I forgot where it was. Menu File → Preferences → Settings. I get this: I want to open file settings.json (editable JSON file) instead. How can I do that?
Kasheftin
  • 7,509
  • 11
  • 41
  • 68
99
votes
17 answers

Android: How to remove margin/padding in Preference Screen

I am facing very weird problem in designing preference screen. Though I am not giving any margin in layout,it is leaving some space in left. As you can see in image below: XML:
Dory
  • 7,462
  • 7
  • 33
  • 55
75
votes
10 answers

How to change the integrated terminal in Visual Studio Code

I want to change the integrated terminal to Cmder. I use Visual Studio Code on Windows 8.1. I checked the documentation and also the preference file, but I am confused about which line to change. External Terminal // Customizes which terminal to…
user7111196
70
votes
4 answers

How to prevent Sublime Text 2 from opening that last open file / project when starting up

I am on Lion - and in the command line, when I open up my project using "subl ." in my project folder - it opens up the last project I had open before I quit Sublime. I have the Max Preference "Restore windows when quitting" unchecked. How to I…
Joerg
  • 3,553
  • 4
  • 32
  • 41
61
votes
11 answers

How to set the Default Value of a ListPreference

i need to set the defult value for a ListPreference when the Activity starts. I've tried with ListPreference.setDefaultvalue("value"); but it makes the firts Entry of the List as default. I need it because i must check a condition and set as default…
Gnufabio
  • 1,505
  • 4
  • 16
  • 26
47
votes
5 answers

Android shared preferences not saving

I've created an Android live wallpaper and i'm trying to let a user choose an image from their phone and apply it as a background image, but when I launch the activity that start the intent to pick the images, my shared preferences don't seem to…
jOE
  • 491
  • 1
  • 4
  • 5
44
votes
3 answers

Dynamic ListPreference in android

How to generate dynamic listPreference in android? I want to get all wifi access points and make a list using in preference Activity(i.e. make a list using listpreference). How to do this?
kkk
  • 441
  • 1
  • 4
  • 3
37
votes
3 answers

creating a DialogPreference from XML

I have been attempting to use an android.preference.DialogPreference inflated from XML, but the documentation seems to be missing some essential bits, and I cannot find a working example anywhere. My XML now looks like this (I tried many…
Jeremy
  • 1,049
  • 1
  • 15
  • 28
28
votes
9 answers

Visual Studio Code - Can "OPEN EDITORS" panel be sorted?

Sometimes when I'm working I end up with several open tabs. My problem is that every time I need to switch to another file I need to constantly scroll until I find the desired file (which is not always easy to find). For example, I may have over 30…
htafoya
  • 18,261
  • 11
  • 80
  • 104
27
votes
3 answers

Android Checkbox preference

I cannot find any tutorials on checkbox preference. I can use a listpreference, but I can't use checkbox preference. For now, I want that if user sets on the checbox, a toast msg says "true" and if he sets it off, the toast msg says "false". So far…
erdomester
  • 11,789
  • 32
  • 132
  • 234
26
votes
3 answers

PreferenceFragment background color

I am using a PreferenceFragment (without a ListView), but am unable to set the background color, and it seems to be transparent. How can I set the background color to white with PreferenceFragment? EDIT: first screenshot: Overriding onCreateView…
user396707
  • 427
  • 1
  • 4
  • 17
25
votes
5 answers

How can I set the android preference summary text color?

On my preference screen I have a preference that when clicked opens a color picker dialog. What I would like to do is when the user selects a color, that the text summary of the preference is displayed in that color. I know I can have the summary…
Sean
  • 1,278
  • 1
  • 12
  • 11
15
votes
8 answers

Android: How to maximize PreferenceFragment width (or get rid of margin)?

If you look at either Android Settings screenshot or FragmentsBC screenshot, there are margin in PreferenceFragment. How can you get rid of it? I tried making PreferenceFragment width to fill_parent, but no luck.
jclova
  • 5,466
  • 16
  • 52
  • 78
15
votes
3 answers

Android get view of Preference in PreferenceActivity

I would like to get View instance that is used to display specific Preference in my PreferenceActivity, so i can modify its properties, for example: public class SettingsActivity extends PreferenceActivity { public void onCreate(Bundle…
hendrix
  • 3,364
  • 8
  • 31
  • 46
15
votes
2 answers

ActivityNotFoundException when different package's targetClass in PreferenceScreen

The application's default package is "example.app". and the target activity's package is "example.app.abc". Calling startActivity() for "example.app.abc.TheActivity" in java code just works, but specifying it on preference.xml doesn't…
shkim
  • 1,173
  • 3
  • 16
  • 24
1
2 3
29 30