List of usage examples for android.preference Preference getIntent
public Intent getIntent()
From source file:com.door43.translationstudio.SettingsActivity.java
/** * Intercepts clicks and passes the resource to the intent. * The preference should be configured as an action to an intent for the LegalDocumentActivity * @param preference/*from w w w . ja v a 2s.c om*/ * @param res */ public static void bindPreferenceClickToLegalDocument(Preference preference, final int res) { preference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { Intent intent = preference.getIntent(); intent.putExtra(LegalDocumentActivity.ARG_RESOURCE, res); preference.setIntent(intent); return false; } }); }