Example usage for android.preference PreferenceGroup addItemFromInflater

List of usage examples for android.preference PreferenceGroup addItemFromInflater

Introduction

In this page you can find the example usage for android.preference PreferenceGroup addItemFromInflater.

Prototype

public void addItemFromInflater(Preference preference) 

Source Link

Document

Called by the inflater to add an item to this group.

Usage

From source file:nya.miku.wishmaster.chans.nullchancc.NullchanccModule.java

private void addOnlyNewPostsPreference(PreferenceGroup group) {
    Context context = group.getContext();
    CheckBoxPreference onlyNewPostsPreference = new CheckBoxPreference(context);
    onlyNewPostsPreference.setTitle(R.string.nullchancc_prefs_only_new_posts);
    onlyNewPostsPreference.setSummary(R.string.nullchancc_prefs_only_new_posts_summary);
    onlyNewPostsPreference.setKey(getSharedKey(PREF_KEY_ONLY_NEW_POSTS));
    onlyNewPostsPreference.setDefaultValue(true);
    group.addItemFromInflater(onlyNewPostsPreference);
}