android-developers
[Arriba] [Todas las Listas]

Re: [android-developers] Cuestión básica: SharedPreferences y Preferen

To: android-developers@xxxxxxxxxxxxxxxx
Subject: Re: [android-developers] Cuestión básica: SharedPreferences y PreferenceActivity
From: Kostya Vasilyev <kmansoft@xxxxxxxxx>
Date: Mon, 31 Oct 2011 23:28:02 +0400
Delivery-date: Mon, 31 Oct 2011 15:28:30 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=BWd2KQe7q/77OAO1B1g1DvLgixddDNVis3TluugW0kc=; b=jsD+PtSIyQiNRfnVNpBUH6DktYBmlsl/fJ5BzQT2rS7c+8nqKuS9c2s732J8vzh1yf a9VOK8QI5hV0dfd88ETp1/RPM5l1RowRRvx4tKrkMnkL3EZyDN41x8pP4V/O3HUvibyp F83fFt1ST0+zb7Ukx3rKOa8sY5puZvnYb9fsk=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <CAA_CB1+4s2Og6-bvcoNWSWTXnkaL_RM1B0B3AejDW9POTe4r_g@mail.gmail.com>
List-archive: <http://groups.google.com/group/android-developers?hl=en_US>
List-help: <http://groups.google.com/support/?hl=en_US>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <http://groups.google.com/group/android-developers/post?hl=en_US>, <mailto:android-developers@googlegroups.com>
List-subscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+unsubscribe@googlegroups.com>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
References: <CAA_CB1+kiDGpp1qVWO=-r_WL0KfCWf6u2fTRqa0P3bBHZF5ZAA@mail.gmail.com> <CANCScghr=edYt0ZOki6h_pjsSYH+B8TOi0t0y0GS68CaJ=PXPg@mail.gmail.com> <CAA_CB1+4s2Og6-bvcoNWSWTXnkaL_RM1B0B3AejDW9POTe4r_g@mail.gmail.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
Seguro, aquello es un caso bueno:

Especialmente si utilizas un *subclass de *PreferenceActivity para dejar el usuario modifica aquellas opciones, y uso *prefManager.*setSharedPreferencesName De modo que él *automagically trabajos con el correcto (la cuenta específica) archivo de preferencia.

-- *Kostya

31.10.2011 23:20, John *Goche пишет:

*Thanks *TreKing para vuestra respuesta,

> para añadir a *Kostya, no todo *settings es aplicación-ancho - algunos son componente *scoped. Como si tienes > un *email *app con cuentas múltiples, quieres ser capaz de configurar cada cuenta individualmente. Tienen el mismo *settings, pero casos diferentes, así que cada cuenta tendría es archivo de preferencia propia.

Esto es la razón para habiendo preferencias múltiples que hace la mayoría de sentido a mí.

--
*Kostya *Vasilyev

--
Recibiste este mensaje porque eres *subscribed al *Google
Grupos "*Android *Developers" grupo.
A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx

Puesto que más opciones, visita este grupo en
*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

Sure, that's a good case:

Especially if you use a subclass of PreferenceActivity to let the user modify those options, and use prefManager.setSharedPreferencesName so that it automagically works with the correct (account specific) preference file.

-- Kostya

31.10.2011 23:20, John Goche пишет:

Thanks TreKing for your reply,

> To add to Kostya, not all settings are application-wide - some are component scoped. Like if you have > an email app with multiple accounts, you want to be able to configure each account individually. They > have the same settings, but different instances, so each account would have it's own preference file.

This is the reason for having multiple preferences that makes most sense to me.

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-developers+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<Anterior por Tema] Tema Actual [Siguiente por Tema>