전면 광고 노출시 아래와 같은 커스텀 옵션을 제공합니다. (InterstitialAd.CustomExtraData 에 정의되어 있는 값 사용)
필요한 옵션 설정 후 "endingInterstitialAd.setCustomExtras(extras);" API 를 호출합니다.
ONESTORE_AD_BACKGROUND_COLOR 전면 광고 배경색 및 투명도 변경(Int 형) -> Default : Black , 투명도 : 0 (#ff000000)
ONESTORE_AD_HIDE_CLOSE_BTN 전면 광고 우측 상단 닫기 버튼 노출 여부 설정 (Boolean 형) -> Default : false
ONESTORE_AD_CLOSE_BTN_MARGIN_FROM_EDGE 기본 값은 true , 중앙 광고 이미지를 기준으로 마진을 주고 싶은 경우 false로 변경하여 사용
ONESTORE_AD_CLOSE_BTN_LEFT_MARGIN : ONESTORE 전면 광고 닫기 버튼 좌측 마진 -> Default : -28dp
ONESTORE_AD_CLOSE_BTN_RIGHT_MARGIN : ONESTORE 전면 광고 닫기 버튼 우측 마진 -> Default : 20dp
ONESTORE_AD_CLOSE_BTN_TOP_MARGIN : ONESTORE 전면 광고 닫기 버튼 상단 마진 -> Default : 20dp
ONESTORE_AD_CLOSE_BTN_BOTTOM_MARGIN : ONESTORE 전면 광고 닫기 버튼 하단 마진 -> Default : 0
ONESTORE_AD_DISABLE_BACK_BTN ONESTORE 전면 광고 백키 종료 사용 안함(Boolean형) -> Default : false
IS_ENDING_AD : 전면 광고에 종료 메시지 노출 여부 (Boolean 형) -> Default : false
ENDING_TEXT 종료 광고 메시지 변경 (String 형) -> Default : 뒤로가기를 한 번 더 누르시면 종료됩니다.
ENDING_TEXT_SIZE : 종료 광고 메시지 크기 변경 (Int 형) -> Default : 11sp
ENDING_TEXT_COLOR : 종료 광고 메시지 색상 변경 (Int 형) -> Default : White
ENDING_TEXT_GRAVITY : 종료 광고 메시지 정렬 위치 변경 (Int 형) -> Default : 우측 정렬
endingInterstitialAd = new AdPopcornSSPInterstitialAd (this);
endingInterstitialAd.setPlacementId(TEST_INTERSTITIAL_PLACEMENT_ID);
HashMap extras = new HashMap<>();
// Option1. 배경색 변경
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_BACKGROUND_COLOR, Color.parseColor("#ff0000"));
// Option2. 배경색 + 투명도 변경
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_BACKGROUND_COLOR, Color.parseColor("#11000000"));
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_HIDE_CLOSE_BTN , true);
// Option3. 전면광고를 Ending 배너로 사용하실 경우 아래 옵션을 추가합니다.
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.IS_ENDING_AD, true);
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ENDING_TEXT, "백키를 누르시면 종료 시켜드립니다! 감사합니다\n");
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ENDING_TEXT_SIZE, 14);
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ENDING_TEXT_COLOR, Color.parseColor("#ffffff"));
extras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ENDING_TEXT_GRAVITY, Gravity.RIGHT);
endingInterstitialAd.setCustomExtras(extras);
// Option4. Close 버튼 디바이스 우측 상단 기준 커스텀
HashMap customExtras = new HashMap<>();
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_LEFT_MARGIN , -28); // 영향 받지 않음
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_RIGHT_MARGIN , 50);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_TOP_MARGIN , 50);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_BOTTOM_MARGIN , 0); // 영향 받지 않음
interstitialAd.setCustomExtras(customExtra);
// Option5. 중앙 광고물의 Close 버튼 우측 상단 기준 커스텀
// - 광고물 기준으로 커스텀 진행 시 디바이스 가로 , 세로 길이와 광고물의 가로 , 세로 길이에 따라 영향 받는 옵션 값이 달라짐.
// - 광고물이 전체 화면에 노출 되는 경우
//ONESTORE_AD_CLOSE_BTN_RIGHT_MARGIN, IGAW_AD_CLOSE_BTN_TOP_MARGIN 영향 받음.
// - 디바이스 화면이 광고물 보다 더 큰 경우
//ONESTORE_AD_CLOSE_BTN_LEFT_MARGIN, IGAW_AD_CLOSE_BTN_BOTTOM_MARGIN 영향 받음.
HashMap customExtras = new HashMap<>();
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_MARGIN_FROM_EDGE , false);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_LEFT_MARGIN , -28);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_RIGHT_MARGIN , 50);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_TOP_MARGIN , 50);
customExtras.put(AdPopcornSSPInterstitialAd.CustomExtraData.ONESTORE_AD_CLOSE_BTN_BOTTOM_MARGIN , 0);
interstitialAd.setCustomExtras(customExtra);