On Wed, Feb 16, 2011 at 7:53 AM, Mattias Svala <thebra...@gmail.com> wrote:
> OK. I was exploring TreKing's initial suggestion. If I interpreted him > correctly than I should be able to use a Preference instance, without > subclassing it, and setting the on click handler on it to launch some > activity and then handle the result of that activity in my > PreferenceActivity. Yes. > Handling the result would mean to me that I need to set that value in the > Preference instance that was clicked. No. At least not necessarily. I guess the question what is it that you want to do when you get back this contact data. I presume you want to save it? Well you will launch the contact picker activity with a specific intent result, which in onActivityResult tells you you want to save that value. So you can find the preference that launched the intent and call setTitle() and / or setSummary() to update what it displays and call getSharedPreferences() on it to save the data you got back to the SharedPreferences object for later. > Perhaps that is not possible? Certainly should be. > Which would suggest that I need to sublclass Preference in order to create > a contact picking preference. You could, but I really don't think you do. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- 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@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en