Versions Compared

Key

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

...

Code Block
languagejava
PopConfig popConfig = new PopConfig.Builder(context, "YOUR_POPFEED_UNIT_ID")
    ...생략...
    .iconResId(R.drawable.your_pop_icon)
    .rewardReadyIconResId(R.drawable.you_pop_icon_reward_ready)

...

Code Block
languagejava
final PopNotificationConfig popNotificationConfig = new PopNotificationConfig.Builder(context)
    .smallIconResId(R.drawable.your_small_icon)
    .titleResId(R.string.your_pop_notification_title)
    .textResId(R.string.your_pop_notification_text)
    .colorResId(R.color.your_pop_notification_color)
    .notificationId(1000)
    .build();
    
PopConfig popConfig = new PopConfig.Builder(context, "YOUR_POPFEED_UNIT_ID")
    ...생략...
    .popNotificationConfig(popNotificationConfig)
    .build();

...

Code Block
languagejava
new PopConfig.Builder(getApplicationContext(), "YOUR_POPFEED_UNIT_ID")
    ...생략...
    .popUtilityLayoutHandlerClass(CustomPopUtilityLayoutHandler.class)
    .build();

...

PopFeed 상단의 Toolbar영역은 DefaultPopToolbarHolder 클래스를 상속한 클래스를 구현하여 변경할 수 있습니다.
DefaultPopToolbarHolder의 아이콘 색상은 테마변경 가이드에 따라 변경할 수 있습니다.

...

Option1. Toolbar 제목 및 아이콘 변경

...

  1. DefaultPopFeedbackHandler를 상속 받는 클래스를 생성합니다.

    Code Block
    public class CustomPopFeedback extends DefaultPopFeedbackHandler {
        @Override
        public void notifyNativeAdReward(
                @NotNull Context context,
                @NotNull View view,
                boolean canUseSnackbar,
                int reward
        ) {
            String message = "Customized feed launch reward message";
    
            if (canUseSnackbar) {
                showSnackbar(message, view);
            } else {
                showToast(message);
            }
        }
    }
  2. PopConfig에이전 스텝에서 생성한 Custom PopFeedbackHandler 클래스를 넘겨줍니다.

    Code Block
    languagejava
    PopConfig popConfig = new PopConfig.Builder(this, "YOUR_POPFEED_UNIT_ID")
          ...생략...
          .popFeedbackHandlerClass(CustomPopFeedbackHandlerClass.class)
          .build();

...