|
|
@@ -1,47 +1,77 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:background="@android:color/black"
|
|
|
- android:orientation="vertical">
|
|
|
+ android:id="@+id/fl_root"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:background="@android:color/black"
|
|
|
+ android:orientation="vertical">
|
|
|
|
|
|
<VideoView
|
|
|
- android:id="@+id/splash_video_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:layout_gravity="center"
|
|
|
- android:visibility="gone" />
|
|
|
+ android:id="@+id/splash_video_view"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:layout_gravity="center"
|
|
|
+ android:visibility="gone"/>
|
|
|
|
|
|
<ImageView
|
|
|
- android:id="@+id/splash_image_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:scaleType="centerCrop"
|
|
|
- android:src="@drawable/kaipin" />
|
|
|
+ android:id="@+id/splash_image_view"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:scaleType="centerCrop"
|
|
|
+ android:src="@drawable/kaipin"/>
|
|
|
<TextView
|
|
|
- android:id="@+id/splash_skip"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="24dp"
|
|
|
- android:layout_gravity="top|end"
|
|
|
- android:gravity="center"
|
|
|
- android:paddingStart="10dp"
|
|
|
- android:paddingEnd="10dp"
|
|
|
- android:layout_margin="@dimen/content_padding_20"
|
|
|
- android:textColor="#ffffff"
|
|
|
- android:textSize="13sp"
|
|
|
- android:background="@drawable/shape_ash_solid_rectangle_small_tra30"
|
|
|
- android:visibility="gone" />
|
|
|
+ android:id="@+id/splash_skip"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="24dp"
|
|
|
+ android:layout_gravity="top|end"
|
|
|
+ android:gravity="center"
|
|
|
+ android:paddingStart="10dp"
|
|
|
+ android:paddingEnd="10dp"
|
|
|
+ android:layout_margin="@dimen/content_padding_20"
|
|
|
+ android:textColor="#ffffff"
|
|
|
+ android:textSize="13sp"
|
|
|
+ android:background="@drawable/shape_ash_solid_rectangle_small_tra30"
|
|
|
+ android:visibility="gone"/>
|
|
|
|
|
|
<TextView
|
|
|
- android:id="@+id/ad_flag"
|
|
|
- android:visibility="gone"
|
|
|
- android:text="广告"
|
|
|
- android:textSize="12sp"
|
|
|
- android:textColor="@color/white"
|
|
|
- android:layout_margin="12dp"
|
|
|
- android:background="#50000000"
|
|
|
- android:gravity="center"
|
|
|
- android:layout_width="36dp"
|
|
|
- android:layout_height="20dp" />
|
|
|
+ android:id="@+id/ad_flag"
|
|
|
+ android:visibility="gone"
|
|
|
+ android:text="广告"
|
|
|
+ android:textSize="12sp"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:layout_margin="12dp"
|
|
|
+ android:background="#50000000"
|
|
|
+ android:gravity="center"
|
|
|
+ android:layout_width="36dp"
|
|
|
+ android:layout_height="20dp"/>
|
|
|
+
|
|
|
+ <com.jasmine.cantaloupe.ui.widget.AdFrameLayout
|
|
|
+ android:id="@+id/fv_splash_yt"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:visibility="invisible">
|
|
|
+
|
|
|
+ <!-- 2.开屏广告容器区域:-->
|
|
|
+ <!-- 注意:该区域高度不得小于400dp。在本示例中没有写死splash_container的高度值,是因为第1部分的app_logo区域是一个高度很小的图片。 -->
|
|
|
+ <FrameLayout
|
|
|
+ android:id="@+id/splash_container"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"/>
|
|
|
+
|
|
|
+ <!-- 3.自定义跳过按钮区域:开发者可以根据需要自己实现不同样式的跳过按钮 -->
|
|
|
+ <!-- 注意1:根据广告法规定,跳过按钮必须在屏幕当中出现。因此广告展示的时候,必须让将SkipView显示出来,即visible,否则将SDK将不展示广告。 -->
|
|
|
+ <!-- 注意2:SDK除了会检查跳过按钮的可见性,还将检测它的尺寸,其尺寸不得小于3dp*3dp,否则将SDK将不展示广告。 -->
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/splash_skip_view"
|
|
|
+ android:layout_width="96dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_gravity="right"
|
|
|
+ android:layout_margin="16dp"
|
|
|
+ android:background="@drawable/jasmine_common_button"
|
|
|
+ android:gravity="center"
|
|
|
+ android:textColor="@android:color/white"
|
|
|
+ android:textSize="14sp"
|
|
|
+ android:visibility="visible"/>
|
|
|
+ </com.jasmine.cantaloupe.ui.widget.AdFrameLayout>
|
|
|
|
|
|
</FrameLayout>
|