Configure preset booth means to control the display of the booth (for example, the page where the booth is located and the location of the booth) through the client-side code, and at the same time obtaining other booth information from the server through calling API, such as booth height, display style, content type, etc.
About this task
You can preset the CdpAdvertisementView booth parameters through XML to the layout.xml file on the interface where the booth is located in the App, or add the parameters to the layout.xml file with Java code. Then, calling the updated interface during the life cycle of onResume() in Activity.
CdpAdvertisementView parameter. Procedures
Preset
CdpAdvertisementViewin the layout by one of the following methods.Preset
CdpAdvertisementViewparameters via XML:<com.mpaas.cdp.CdpAdvertisementViewandroid:id="@+id/pit_cdp_cav"android:layout_width="match_parent"android:layout_height="wrap_content" />
Add the
CdpAdvertisementViewparameter with Java code:CdpAdvertisementView cdpView = new CdpAdvertisementView(context);parentView.addView(cdpView);
Call the update interface.
cdpView.updateSpaceCode("my_space_code");