use of com.onesignal.sdktest.callback.PairItemActionCallback 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