Search in sources :

Example 1 with NotificationRecyclerViewAdapter

use of com.onesignal.sdktest.adapter.NotificationRecyclerViewAdapter in project OneSignal-Android-SDK by OneSignal.

the class MainActivityViewModel method setupPushNotificationLayout.

private void setupPushNotificationLayout() {
    recyclerViewBuilder.setupRecyclerView(pushNotificationRecyclerView, 16, false, true);
    GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
    pushNotificationRecyclerView.setLayoutManager(gridLayoutManager);
    pushNotificationRecyclerViewAdapter = new NotificationRecyclerViewAdapter(context, Notification.values());
    pushNotificationRecyclerView.setAdapter(pushNotificationRecyclerViewAdapter);
}
Also used : NotificationRecyclerViewAdapter(com.onesignal.sdktest.adapter.NotificationRecyclerViewAdapter) GridLayoutManager(androidx.recyclerview.widget.GridLayoutManager)

Aggregations

GridLayoutManager (androidx.recyclerview.widget.GridLayoutManager)1 NotificationRecyclerViewAdapter (com.onesignal.sdktest.adapter.NotificationRecyclerViewAdapter)1