private void rebuildCreditCardList() {
PreferenceGroup profileCategory =
(PreferenceGroup) findPreference(PREF_AUTOFILL_CREDIT_CARDS);
profileCategory.removeAll();
for (CreditCard card : PersonalDataManager.getInstance().getCreditCardsForSettings()) {
// Add an item on the current page...
Preference pref = new Preference(getActivity());
pref.setTitle(card.getObfuscatedNumber());
pref.setSummary(card.getFormattedExpirationDate(getActivity()));
if (card.getIsLocal()) {
pref.setFragment(AutofillLocalCardEditor.class.getName());
} else {
pref.setFragment(AutofillServerCardEditor.class.getName());
pref.setWidgetLayoutResource(R.layout.autofill_server_data_label);
}
Bundle args = pref.getExtras();
args.putString(AUTOFILL_GUID, card.getGUID());
profileCategory.addPreference(pref);
}
}
AutofillPreferences.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:chromium-for-android-56-debug-video
作者:
评论列表
文章目录