Search in sources :

Example 1 with OnDeleteListener

use of com.nolanlawson.keepscore.data.TextWithDeleteAdapter.OnDeleteListener in project KeepScore by nolanlawson.

the class SettingsActivity method createAvailableSettingSetsAdapter.

private TextWithDeleteAdapter createAvailableSettingSetsAdapter() {
    List<String> availableSettingSets = new ArrayList<String>(SettingSetHelper.getAvailableSettingSets(this));
    Collections.sort(availableSettingSets);
    final TextWithDeleteAdapter adapter = new TextWithDeleteAdapter(this, availableSettingSets);
    adapter.setOnDeleteListener(new OnDeleteListener() {

        @Override
        public void onDelete(final String settingSetName) {
            onDeleteSettingSet(adapter, settingSetName);
        }
    });
    return adapter;
}
Also used : ArrayList(java.util.ArrayList) OnDeleteListener(com.nolanlawson.keepscore.data.TextWithDeleteAdapter.OnDeleteListener) TextWithDeleteAdapter(com.nolanlawson.keepscore.data.TextWithDeleteAdapter)

Aggregations

TextWithDeleteAdapter (com.nolanlawson.keepscore.data.TextWithDeleteAdapter)1 OnDeleteListener (com.nolanlawson.keepscore.data.TextWithDeleteAdapter.OnDeleteListener)1 ArrayList (java.util.ArrayList)1