Search in sources :

Example 1 with InAppMessageRecyclerViewAdapter

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

the class MainActivityViewModel method setupInAppMessagingLayout.

private void setupInAppMessagingLayout() {
    recyclerViewBuilder.setupRecyclerView(inAppMessagingRecyclerView, 4, false, true);
    GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
    inAppMessagingRecyclerView.setLayoutManager(gridLayoutManager);
    inAppMessagingRecyclerViewAdapter = new InAppMessageRecyclerViewAdapter(context, InAppMessage.values());
    inAppMessagingRecyclerView.setAdapter(inAppMessagingRecyclerViewAdapter);
}
Also used : GridLayoutManager(androidx.recyclerview.widget.GridLayoutManager) InAppMessageRecyclerViewAdapter(com.onesignal.sdktest.adapter.InAppMessageRecyclerViewAdapter)

Aggregations

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