Versions Compared

Key

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

...

"

개요

Pop 디자인 커스터마이징시 고려해야 할 사항은 Pop 디자인 가이드 문서에서 확인 가능합니다. PopConfig 설정을 해야 아래의 사항들을 적용할 수 있습니다.

...

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();

...

  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();

...