On Tue, Jul 17, 2012 at 8:10 PM, billb <[email protected]> wrote:

> I have overridden the Preference class onClick method with the below,
> however, I set a breakpoint that is never reached.


Can't help you there as I've never extended Preference and tried what
you're doing. I'll reiterate that you can just use findPreference. Even if
it is deprecated, it's not going away any time soon and you'll achieve what
you're after in 1 line of code and about 30 seconds.

findPreference("pref").setIntent(new Intent(...));

Done.

Later, when you have time, you can refactor it to do it "correctly" using
the fancy new Fragments stuff.

Deriving a custom Preference class for the explicit purpose of handling one
very specific action on clicking it is kinda overkill, IMO.

-------------------------------------------------------------------------------------------------
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to