use of com.onesignal.sdktest.adapter.PairRecyclerViewAdapter in project OneSignal-Android-SDK by OneSignal.
the class MainActivityViewModel method setupTriggerRecyclerView.
private void setupTriggerRecyclerView() {
recyclerViewBuilder.setupRecyclerView(triggersRecyclerView, 20, false, true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
triggersRecyclerView.setLayoutManager(linearLayoutManager);
triggerPairRecyclerViewAdapter = new PairRecyclerViewAdapter(context, triggerArrayList, key -> {
OneSignal.removeTriggerForKey(key);
triggerSet.remove(key);
refreshTriggerRecyclerView();
toaster.makeCustomViewToast("Deleted trigger " + key, ToastType.SUCCESS);
});
triggersRecyclerView.setAdapter(triggerPairRecyclerViewAdapter);
}
use of com.onesignal.sdktest.adapter.PairRecyclerViewAdapter in project OneSignal-Android-SDK by OneSignal.
the class MainActivityViewModel method setupTagRecyclerView.
private void setupTagRecyclerView() {
recyclerViewBuilder.setupRecyclerView(tagsRecyclerView, 20, false, true);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
tagsRecyclerView.setLayoutManager(linearLayoutManager);
tagPairRecyclerViewAdapter = new PairRecyclerViewAdapter(context, tagArrayList, new PairItemActionCallback() {
@Override
public void onLongClick(String key) {
OneSignal.deleteTag(key);
tagSet.remove(key);
refreshTagRecyclerView();
toaster.makeCustomViewToast("Deleted tag " + key, ToastType.SUCCESS);
}
});
tagsRecyclerView.setAdapter(tagPairRecyclerViewAdapter);
}
Aggregations