Versions Compared

Key

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

...

다음은 앱에 연동한 전체 지면의 주요 색상을 변경하는 예시입니다.

Code Block
languagexmljava
BuzzAdTheme buzzAdTheme = new BuzzAdTheme()
    ...생략...
    .colorPrimary(R.color.your_primary_color)
    .colorPrimaryDark(R.color.your_primary_color_dark)
    .colorPrimaryLight(R.color.your_primary_color_light)
    .colorPrimaryLighter(R.color.your_primary_color_lighter)
    .colorPrimaryLightest(R.color.your_primary_color_lightest);
BuzzAdTheme.setGlobalTheme(buzzAdTheme);

BuzzAdBenefit.init(...);

...

다음은 BuzzAdThemerewardIcon를 추가해 리워드 아이콘을 변경하는 예시입니다.

Code Block
languagexmljava
BuzzAdTheme buzzAdTheme = new BuzzAdTheme()
    ...생략...
    .rewardIcon(R.drawable.your_reward_icon);
BuzzAdTheme.setGlobalTheme(buzzAdTheme);

BuzzAdBenefit.init(...);

...

전체 지면의 CTA 버튼 디자인을 변경하려면 ApplicationonCreate에서 다음과 같이 설정하세요.

Code Block
languagexmljava
BuzzAdTheme buzzAdTheme = new BuzzAdTheme()
    ...생략...
    .participatedIcon(R.drawable.your_participated_icon) // 광고 참여 완료 후 CTA 버튼의 아이콘
    .ctaBackgroundSelector(R.drawable.your_cta_background) // CTA 버튼의 배경 색상(state_enabled 필수 적용)
    .ctaTextColorSelector(R.color.your_cta_text_color) // CTA 버튼의 텍스트 색상
    .ctaTextSize(R.dimen.your_cta_text_size);// CTA 버튼의 텍스트 크기
BuzzAdTheme.setGlobalTheme(buzzAdTheme);

BuzzAdBenefit.init(...);

...

다음은 BuzzAdFeedTheme에서 구성 요소를 설정해 Feed의 CTA 버튼 디자인을 변경하는 예시입니다.

Code Block
languagejava
final BuzzAdFeedTheme buzzAdFeedTheme = 
      BuzzAdFeedTheme.getDefault()
          ...생략...
          .ctaBackgroundSelector(R.color.your_background_color) // CTA 버튼의 배경 색상. state_enabled 필수
          .ctaTextColorSelector(R.color.your_text_color)  // CTA 버튼의 텍스트 색상
          .rewardIcon(R.drawable.your_reward_icon) // 리워드 아이콘. 광고 참여전 CTA 버튼의 아이콘
          .participatedIcon(R.drawable.your_participated_icon); // 광고 참여 완료 후 CTA 버튼의 아이콘
final BuzzAdFeed buzzAdFeed = new BuzzAdFeed.Builder()
                                .theme(buzzAdFeedTheme)
                                .build();

...

다음은 BuzzAdInterstitialTheme에서 구성 요소를 설정해 Interstital의 CTA 버튼 디자인을 변경하는 예시입니다.

Code Block
languagejava
final BuzzAdInterstitialTheme theme = 
    BuzzAdInterstitialTheme
        .getDefault()
        .ctaBackgroundSelector(R.color.your_background_color)
        .ctaTextColorSelector(R.color.your_text_color)
        .ctaTextSize(R.dimen.your_cta_text_size)
        .rewardIcon(R.drawable.your_reward_icon);
final BuzzAdInterstitial buzzAdInterstitial = 
    new BuzzAdInterstitial.Builder("YOUR_INTERSTITIAL_UNIT_ID")
        ...생략...
        .theme(theme)
        .buildDialog();

...