Jump to content

Bug preferences Android 2.1


Pierre87

Recommended Posts

Dans mon applications, j'utilise un système de preferences dont voici un extrait :

           android:defaultValue="false"
           android:title="@string/text_enabled"
           android:key="lol" />

j'ai aussi d'autres péférences de type EditTextPreference

Quand je lance mon application, je fait :

preferences = PreferenceManager.getDefaultSharedPreferences(this);
       PreferenceManager.setDefaultValues(this, R.xml.settings, true);

Toutes les préférences sont initialisées à leurs valeurs par défaut, comme indiqué dans le fichier XML

SAUF les CheckBoxPreference, qui sont stockée sous forme de boolean

Elles ne sont pas du tout initialisées

A noter que je n'avais pas ce bug sur mon Hero (Android 1.5), mais il est présent sur le Nexus One (Android 2.1)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...