use of com.afollestad.materialdialogs.simplelist.MaterialSimpleListAdapter in project material-dialogs by afollestad.
the class MainActivity method showSimpleList.
@OnClick(R.id.simpleList)
public void showSimpleList() {
final MaterialSimpleListAdapter adapter = new MaterialSimpleListAdapter((dialog, index1, item) -> showToast(item.getContent().toString()));
adapter.add(new MaterialSimpleListItem.Builder(this).content("username@gmail.com").icon(R.drawable.ic_account_circle).backgroundColor(Color.WHITE).build());
adapter.add(new MaterialSimpleListItem.Builder(this).content("user02@gmail.com").icon(R.drawable.ic_account_circle).backgroundColor(Color.WHITE).build());
adapter.add(new MaterialSimpleListItem.Builder(this).content(R.string.add_account).icon(R.drawable.ic_content_add).iconPaddingDp(8).build());
new MaterialDialog.Builder(this).title(R.string.set_backup).adapter(adapter, null).show();
}
Aggregations