private void initDialog(Modification mod) {
   Dialogs.showSelectDialog(
       getContext(),
       mod.title,
       Stream.of(mod.offerModifications).collect(Collectors.toList()),
       this::OfferModificationApply,
       newOfferModification -> {
         mod.setSelectedModification(newOfferModification);
         setModificationValue(newOfferModification.title, mod.id);
       });
 }
  @Override
  protected void onStart() {
    super.onStart();
    final String[] accountsHex = getIntent().getStringArrayExtra(EXTRA_STR_ARR_ACCOUNTS_HEX);
    final List<NacPublicKey> accPublicKeys =
        Stream.of(accountsHex).map(NacPublicKey::new).collect(Collectors.toList());

    final ArrayAdapter<NacPublicKey> adapter =
        new ArrayAdapter<>(this, R.layout.list_item_select_sender, accPublicKeys);
    final ListView accountsList = (ListView) findViewById(R.id.listview_accounts);
    accountsList.setAdapter(adapter);
    accountsList.setOnItemClickListener(this::onAccountClick);
  }
Beispiel #3
0
 public List<Category> getStaticCategory() {
   return Stream.of(getCategories())
       .filter(sec -> sec.getLink() == null)
       .collect(Collectors.toList());
 }