get Preference from PreferenceFragment - Android User Interface

Android examples for User Interface:PreferenceFragment

Description

get Preference from PreferenceFragment

Demo Code


//package com.java2s;
import android.preference.PreferenceFragment;

public class Main {
    public static <T> T getPreference(PreferenceFragment fragment,
            CharSequence key) {//from w w w.  j  a  va2 s  .co  m
        return (T) fragment.getPreferenceScreen().findPreference(key);
    }
}

Related Tutorials