use of org.chromium.chrome.browser.infobar.InfoBarControlLayout.InfoBarArrayAdapter in project AndroidChromium by JackyAndroid.
the class UpdatePasswordInfoBar method createContent.
@Override
public void createContent(InfoBarLayout layout) {
super.createContent(layout);
if (mTitleLinkRangeStart != 0 && mTitleLinkRangeEnd != 0) {
SpannableString title = new SpannableString(mTitle);
title.setSpan(new ClickableSpan() {
@Override
public void onClick(View view) {
onLinkClicked();
}
}, mTitleLinkRangeStart, mTitleLinkRangeEnd, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
layout.setMessage(title);
}
InfoBarControlLayout controlLayout = layout.addControlLayout();
if (mUsernames.length > 1) {
InfoBarArrayAdapter<String> usernamesAdapter = new InfoBarArrayAdapter<String>(getContext(), mUsernames);
mUsernamesSpinner = controlLayout.addSpinner(R.id.password_infobar_accounts_spinner, usernamesAdapter);
} else {
controlLayout.addDescription(mUsernames[0]);
}
}
Aggregations