use of com.android.settings.DividerPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class PremiumSmsAccess method updatePrefs.
private void updatePrefs(ArrayList<AppEntry> apps) {
if (apps == null)
return;
setEmptyText(R.string.premium_sms_none);
setLoading(false, true);
final PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getPrefContext());
screen.setOrderingAsAdded(true);
for (int i = 0; i < apps.size(); i++) {
final PremiumSmsPreference smsPreference = new PremiumSmsPreference(apps.get(i), getPrefContext());
smsPreference.setOnPreferenceChangeListener(this);
screen.addPreference(smsPreference);
}
if (apps.size() != 0) {
DividerPreference summary = new DividerPreference(getPrefContext());
summary.setSelectable(false);
summary.setSummary(R.string.premium_sms_warning);
summary.setDividerAllowedAbove(true);
screen.addPreference(summary);
}
setPreferenceScreen(screen);
}
Aggregations