오퍼월 표시와 관련된 설정은 AdisonConfig
를 통해 적용합니다.
val config = AdisonConfig()
config.prepareViewHidden = true // 스플래시 숨김 (기본값: false)
config.infoBarHidden = true // 상단 정보창 숨기 (기본값: false)
config.offerwallListTitle = "오퍼월 테스트" // 목록화면 네비게이션 타이틀 (기본값: 오퍼월)
config.screenOrientation = Orientation.Portrait // 화면 방항 (기본값: Orientation.Portrait, 세로)
Adison.setConfig(config)
AdisonConfig config = new AdisonConfig();
config.setPrepareViewHidden(true); // 스플래시 숨김 (기본값: false)
config.setInfoBarHidden(false); // 상단 정보창 숨기 (기본값: false)
config.setOfferwallListTitle("오퍼월 테스트"); // 목록화면 네비게이션 타이틀 (기본값: 오퍼월)
Adison.setConfig(config);
| | |
| | |
| | |
| | |
| 목록 및 상세 화면 방향 e.g., [ Orientation.Portrait, Orientation.LandScape ] | |
일부 앱에서는 자바스크립트 제어를 위해 타이머를 설정하는 경우가 있습니다. 해당 설정은 글로벌로 적용되어 SDK의 웹뷰에도 적용되므로 싱크를 맞추기 위해 config.javascriptTimerEnabled = true
로 추가적인 설정이 필요합니다.
가로화면
config.screenOrientation = Orientation.Landscape
가로 화면을 설정한 경우 아래와 같이 표시됩니다.
스플래시
스플래시를 표시할 경우 기본적으로 아래와 같이 표시됩니다.
스플래시 하단에 이미지를 포함시킬 경우 config.prepareViewDrawable
를 설정해주면 가능합니다.
config.prepareViewDrawable = resources.getDrawable(R.drawable.img_splash)
config.setPrepareViewDrawable(getResources().getDrawable(R.drawable.img_splash));
애니메이션이 필요한 경우 AnimationDrawable
을 적용하 가능합니다.
var animationDrawable = resources.getDrawable(R.drawable.cookies_anim) as AnimationDrawable
config.prepareViewDrawable = animationDrawable
AnimationDrawable animationDrawable = getResources().getDrawable(R.drawable.cookies_anim);
config.setPrepareViewDrawable(animationDrawable);
스플래시 커스텀
스플래시 화면을 직접 제작하기 위해서는 PrepareView 추상 클래스를 직접 구현해주면 됩니다.
abstract class PrepareView {
abstract fun setAvailableReward(name: String?, unit: String?, points: Int)
}
abstract class PrepareView {
abstract void setAvailableReward(String name, String unit, Int points)
}
이후 직접 구현한 PrepareView를 config에 적용합니다.
config.prepareViewClass = AdisonPrepareView::class.java
config.setPrepareViewClass(AdisonPrepareView.class);
탭 레이아웃 적용
쇼핑탭 등을 별도로 분리하여 사용하기 위해서는 config
에 탭 레이아웃을 활성화 시킵니다.
val config = AdisonConfig()
config.tabEnabled = true
AdisonConfig config = new AdisonConfig();
config.setTabEnabled(true);
탭 레이아웃을 적용한 이후에 특정 탭을 대상으로 오퍼월을 시작하기 위해서는 해당 탭의 slug 명칭을 파라미터로 전달합니다.
전체 목록이 아닌 쇼핑 목록만 표시하기 위해서는 아래와 같이 오퍼월을 실행합니다.
Adison.showOfferwall("shopping")
Adison.showOfferwall("shopping");