Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. BaseRewardNotificationAdapter 인터페이스를 구현하는 클래스를 생성하세요.

    Code Block
    languagejava
    public class CustomBaseRewardNotificationAdapter implements BaseRewardNotificationAdapter {
        
        @NonNull
        @Override
        public View onCreateView(@NonNull Context context, @NonNull ViewGroup viewGroup) {
            return LayoutInflater.from(context).inflate(R.layout.YOUR_LAYOUT, viewGroup, false);
        }
    
        @Override
        public void onBindView(@NonNull View view, int reward) {
            TextView textView = view.findViewById(R.id.YOUR_TEXT_ID);
            textView.setText(reward + " 포인트가 적립되었습니다.");
        }
    }
  2. FeedConfig에서 이전 단계에서 생성한 CustomBaseRewardNotificationAdapterFeedConfig설정하세요.

    Code Block
    languagejava
    final FeedConfig feedConfig = new FeedConfig.Builder("YOUR_FEED_UNIT_ID")
          .baseRewardNotificationAdapterClass(CustomBaseRewardNotificationAdapter.class)
          .build();

...