TreKing thanks! I'm now showing my preferences as before but I'm not
capturing the click event.
I have overridden the Preference class onClick method with the below,
however, I set a breakpoint that is never reached.
@Override
public void onClick()
{
PrefsActivity act = (PrefsActivity)
this.getContext();
act.finish();
} //onClick
I even attempted to register an onclick event inside the subclass
constructor like this but to no avail.
this.setOnPreferenceClickListener(new OnPreferenceClickListener()
{
public boolean onPreferenceClick(Preference preference)
{
PrefsActivity act = (PrefsActivity)mContext;
act.finish();
return true;
};
});
I would appreciate any further thoughts you might have on capturing the
click event.
Sorry for all of this, but the good news is I am learning quite a bit from
your experience.
Thanks so much,
B.
On Tuesday, July 17, 2012 3:28:50 PM UTC-7, TreKing wrote:
>
> I've done some searching and have found the "finish()" method for
>> PreferencesActivity, however, I am now at a loss on how to call this method
>> from within the Preference subclass.
>
>
> The Context used to initialize the Preference will be the Activity. Just
> get it and cast it.
>
>
> -------------------------------------------------------------------------------------------------
> 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