| CLASS info |
| public class SplashView |
| Splash ad view, which is used to load an ad. After an ad is loaded, the HUAWEI Ads SDK automatically processes and displays the ad based on the configuration. |
| Type | Name | Desc |
| Class | SplashView.SplashAdLoadListener | Splash ad loading listener. |
| Constructor name |
| SplashView(Context context) Splash ad view constructor. |
| SplashView(Context context, AttributeSet attrs) Splash ad view constructor. |
| SplashView(Context context, AttributeSet attrs, int defStyleAttr) Splash ad view constructor. |
| Return type | Method name |
| void | load(String adId, int orientation, AdParam adParam, SplashAdLoadListener listener) Loads and displays a splash ad. This method must be called in the UI thread. |
| void | setLogo(View logo) Sets the logo area to be hidden. |
| void | setLogo(View logo, int defaultVisibility) Sets the logo area to be operated, and sets the visibility of the app logo. |
| void | setLogoResId(int logoResId) Sets an app logo resource ID. |
| void | setMediaNameResId(int mediaNameResId) Sets an app text resource ID. |
| void | setSloganResId(int resId) Sets a default app launch image in portrait mode, which is displayed before a splash ad is displayed. |
| void | setWideSloganResId(int resId) Sets a default app launch image in landscape mode, which is displayed before a splash ad is displayed. |
| boolean | isLoading() Checks whether a splash ad is being loaded. |
| boolean | isLoaded() Checks whether a splash ad has been loaded. |
| void | setAdDisplayListener(SplashAdDisplayListener adDisplayListener) Sets a listener for the splash ad display or click event. |
| void | setAudioFocusType(int audioFocusType) Sets the audio focus preemption policy for a video splash ad. |
| void | resumeView() Resumes a view. |
| void | pauseView() Suspends a view. |
| void | destroyView() Destroys a view. |
| Constructor |
| public SplashView(Context context) |
| Splash ad view constructor. |
Parameters
| Parameter name | Parameter desc |
| context | Context. |
| Constructor |
| public SplashView(Context context, AttributeSet attrs) |
| Splash ad view constructor. |
Parameters
| Parameter name | Parameter desc |
| context | Context. |
| attrs | View attribute set. |
| Constructor |
| public SplashView(Context context, AttributeSet attrs, int defStyleAttr) |
| Splash ad view constructor. |
Parameters
| Parameter name | Parameter desc |
| context | Context. |
| attrs | View attribute set. |
| defStyleAttr | Default style attribute. |
| Method |
| public void load(String adId, int orientation, AdParam adParam, SplashAdLoadListener listener) |
| Loads and displays a splash ad. This method must be called in the UI thread. |
Parameters
| Parameter name | Parameter desc |
| adId | Ad slot ID. |
| orientation | Screen orientation. |
| adParam | Ad request parameter. |
| listener | Splash ad loading listener. |
| Method |
| public void setLogo(View logo) |
| Sets the logo area to be hidden. |
Parameters
| Parameter name | Parameter desc |
| logo | View instance of an app logo area. |
| Method |
| public void setLogo(View logo, int defaultVisibility) |
| Sets the logo area to be operated, and sets the visibility of the app logo. |
Parameters
| Parameter name | Parameter desc |
| logo | View instance of an app logo area. |
| defaultVisibility | Visibility of the logo area. View.VISIBLE: The logo area is visible. View.INVISIBLE: The logo area is hidden, but retained. View.GONE: The logo area is hidden and removed. |
| Method |
| public void setLogoResId(int logoResId) |
| Sets an app logo resource ID. |
Parameters
| Parameter name | Parameter desc |
| logoResId | App logo resource ID. |
| Method |
| public void setMediaNameResId(int mediaNameResId) |
| Sets an app text resource ID. |
Parameters
| Parameter name | Parameter desc |
| mediaNameResId | App text resource ID. |
| Method |
| public void setSloganResId(int resId) |
| Sets a default app launch image in portrait mode, which is displayed before a splash ad is displayed. |
Parameters
| Parameter name | Parameter desc |
| resId | Resource ID of a default app launch image. |
| Method |
| public void setWideSloganResId(int resId) |
| Sets a default app launch image in landscape mode, which is displayed before a splash ad is displayed. |
Parameters
| Parameter name | Parameter desc |
| resId | Resource ID of a default app launch image. |
| Method |
| public boolean isLoading() |
| Checks whether a splash ad is being loaded. |
Return
| Parameter name | Parameter desc |
| boolean | If the ad is being loaded, true is returned. Otherwise, false is returned. |
| Method |
| public boolean isLoaded() |
| Checks whether a splash ad has been loaded. |
Return
| Parameter name | Parameter desc |
| boolean | If the ad has been loaded, true is returned. Otherwise, false is returned. |
| Method |
| public void setAdDisplayListener(SplashAdDisplayListener adDisplayListener) |
| Sets a listener for the splash ad display or click event. |
Parameters
| Parameter name | Parameter desc |
| adDisplayListener | Splash ad display listener. |
| Method |
| public void setAudioFocusType(int audioFocusType) |
| Sets the audio focus preemption policy for a video splash ad. |
Parameters
| Parameter name | Parameter desc |
| audioFocusType | Audio focus preemption policy. |
| Method |
| public void resumeView() |
| Resumes a view. |
| Method |
| public void pauseView() |
| Suspends a view. |
| Method |
| public void destroyView() |
| Destroys a view. |