admin
2021-03-31 5d475ef2f856a1415c5b2de255a1c1088d6a2ec2
白色背景修改
1个文件已删除
41个文件已修改
11个文件已添加
1166 ■■■■ 已修改文件
BuWanVideo/AndroidManifest.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/ic_follow_add_w.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/ic_player_browser_more_bg.9.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/ic_video_detail_download.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/ic_video_detail_favourite1.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/ic_video_detail_share.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable-xhdpi/icon_player_back.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_item_follow_bg.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_item_follow_btn.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_detail_follow_bg.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_detail_follow_btn.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_detail_resource_bg.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_list_nav_bg.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_list_nav_highlight_bg.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/drawable/shape_video_small_tag_bg.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/browser_fengxing_activity.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/browser_pptv_activity.xml 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/category_top_bar.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/fragment_player_funshion.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/fragment_splash_ad.xml 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_album_list_ad.xml 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_follow2.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_resource.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_video_search_result_album.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/mvideo_activity.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/search_result_activity.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/video_detail_activity.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/values/colors.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/entity/HomeType.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/entity/ad/AdPidInfo.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/entity/ad/AdPositionEnum.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/entity/vo/VideoDetailAdInfoVO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/SplashActivity.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/ad/SplashADFragment.java 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/ad/SplashAdActivity.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/common/VideosFragment.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/media/VideoDetailActivity2.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/mine/PPTVPlayFragment.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendNewAdapter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchResultActivity.java 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/video/SearchResultAdapter.java 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoColumn2Adapter.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoRecommendAdapter.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/ad/CSJConstant.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/ad/GDTConstant.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/ad/SplashAdUtil.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/video/VideoUIUtil.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
library-GDTSDK/build.gradle 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
library-GDTSDK/libs/GDTSDK.unionNormal.4.333.1203.aar 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/AndroidManifest.xml
@@ -224,7 +224,7 @@
            android:name="com.weikou.beibeivideo.ui.ad.SplashAdActivity"
            android:hardwareAccelerated="true"
            android:label="@string/app_name"
            android:launchMode="singleInstance"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"></activity>
@@ -296,7 +296,7 @@
            android:value="570f28a578d6e12cba6f7f200b8d1c83"></meta-data>
        <meta-data
            android:name="UMENG_CHANNEL"
            android:value="huawei"></meta-data>
            android:value="qq"></meta-data>
        <provider
BuWanVideo/res/drawable-xhdpi/ic_follow_add_w.png
BuWanVideo/res/drawable-xhdpi/ic_player_browser_more_bg.9.png
BuWanVideo/res/drawable-xhdpi/ic_video_detail_download.png

BuWanVideo/res/drawable-xhdpi/ic_video_detail_favourite1.png

BuWanVideo/res/drawable-xhdpi/ic_video_detail_share.png

BuWanVideo/res/drawable-xhdpi/icon_player_back.png
BuWanVideo/res/drawable/shape_item_follow_bg.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/page_content_bg_color" />
    <corners
        android:bottomLeftRadius="5dp"
        android:bottomRightRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />
</shape>
BuWanVideo/res/drawable/shape_item_follow_btn.xml
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/follow_btn_bg_color" />
    <corners android:radius="20dp" />
</shape>
BuWanVideo/res/drawable/shape_video_detail_follow_bg.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/page_content_bg_color" />
    <solid android:color="@color/video_detail_follow_bg_color" />
    <corners
        android:bottomLeftRadius="5dp"
        android:bottomRightRadius="5dp"
BuWanVideo/res/drawable/shape_video_detail_follow_btn.xml
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/follow_btn_bg_color" />
    <corners android:radius="20dp" />
    <solid android:color="@color/page_content_bg_color" />
    <stroke
        android:width="1dp"
        android:color="#59d0d0d0" />
</shape>
BuWanVideo/res/drawable/shape_video_detail_resource_bg.xml
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffffff" />
    <stroke
        android:width="1dp"
        android:color="#59000000"></stroke>
    <corners android:radius="16dp" />
</shape>
BuWanVideo/res/drawable/shape_video_list_nav_bg.xml
New file
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/video_list_nav_bg_color"></solid>
    <stroke
        android:width="1dp"
        android:color="@color/video_list_nav_text_color"></stroke>
    <corners android:radius="20dp"></corners>
</shape>
BuWanVideo/res/drawable/shape_video_list_nav_highlight_bg.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/video_list_nav_hightlight_bg_color"></solid>
    <corners android:radius="20dp"></corners>
</shape>
BuWanVideo/res/drawable/shape_video_small_tag_bg.xml
@@ -4,7 +4,7 @@
    <gradient
        android:angle="90"
        android:endColor="#00000000"
        android:startColor="#ff000000"
        android:startColor="#80000000"
        android:type="linear"
        android:useLevel="true" />
    <corners
BuWanVideo/res/layout/browser_fengxing_activity.xml
@@ -27,7 +27,7 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:drawableLeft="@drawable/ic_back_two"
                android:drawableLeft="@drawable/icon_player_back"
                android:drawablePadding="3dp"
                android:gravity="center"
                android:padding="8dp" />
@@ -70,10 +70,9 @@
                android:gravity="center"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:text="横屏"
                android:textColor="@color/white"
                android:textSize="18sp"
                android:visibility="gone"></TextView>
                android:visibility="visible"></TextView>
        </LinearLayout>
        <ProgressBar
@@ -109,6 +108,7 @@
                    android:layout_height="wrap_content"
                    android:layout_gravity="right|top"
                    android:layout_marginRight="4dp"
                    android:background="@drawable/ic_player_browser_more_bg"
                    android:orientation="vertical">
                    <TextView
@@ -117,7 +117,7 @@
                        android:layout_height="wrap_content"
                        android:drawableLeft="@drawable/icon_browser_more_refresh"
                        android:drawablePadding="9dp"
                        android:padding="11dp"
                        android:padding="9dp"
                        android:text="刷新"
                        android:textColor="#ff666666"
                        android:textSize="15sp" />
@@ -128,7 +128,7 @@
                        android:layout_height="wrap_content"
                        android:drawableLeft="@drawable/icon_browser_more_copy"
                        android:drawablePadding="9dp"
                        android:padding="11dp"
                        android:padding="9dp"
                        android:text="复制链接"
                        android:textColor="#ff666666"
                        android:textSize="15sp" />
@@ -139,7 +139,9 @@
                        android:layout_height="wrap_content"
                        android:drawableLeft="@drawable/icon_browser_more_open"
                        android:drawablePadding="9dp"
                        android:padding="11dp"
                        android:paddingLeft="9dp"
                        android:paddingTop="9dp"
                        android:paddingBottom="9dp"
                        android:text="用其他浏览器打开"
                        android:textColor="#ff666666"
                        android:textSize="15sp" />
BuWanVideo/res/layout/browser_pptv_activity.xml
@@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000"
    android:background="@color/page_content_bg_color"
    android:orientation="vertical">
    <LinearLayout
@@ -17,16 +17,17 @@
            android:layout_height="48dp"
            android:gravity="center_vertical">
            <TextView
                android:id="@+id/tv_top_bar_left"
                style="@style/TextBuleNormal"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:drawableLeft="@drawable/ic_back_two"
                android:drawableLeft="@drawable/icon_player_back"
                android:drawablePadding="3dp"
                android:gravity="center"
                android:padding="8dp"
                android:visibility="invisible" />
                android:padding="8dp" />
            <LinearLayout
                android:layout_width="0dp"
@@ -42,7 +43,7 @@
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:text=""
                    android:textColor="#DDDDDD"
                    android:textColor="@color/page_title_text_color"
                    android:textSize="15sp"></TextView>
                <TextView
@@ -52,19 +53,24 @@
                    android:layout_marginTop="3dp"
                    android:ellipsize="end"
                    android:maxLines="1"
                    android:textColor="#DDDDDD"
                    android:textColor="#999999"
                    android:textSize="8sp"></TextView>
            </LinearLayout>
            <ImageView
                android:id="@+id/iv_refresh"
            <TextView
                android:id="@+id/tv_right"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="15dp"
                android:src="@drawable/ic_refresh"></ImageView>
                android:layout_height="match_parent"
                android:drawableRight="@drawable/icon_browser_more"
                android:gravity="center"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:textColor="@color/white"
                android:textSize="18sp"
                android:visibility="visible"></TextView>
        </LinearLayout>
@@ -107,6 +113,64 @@
                    android:text="恭喜你!免广告权益180分后可重新获得"
                    android:textColor="#ffffffff"
                    android:textSize="14sp" />
                <FrameLayout
                    android:id="@+id/fl_menu"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="#80000000"
                    android:visibility="gone">
                    <LinearLayout
                        android:id="@+id/ll_menu"
                        android:layout_width="172dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="right|top"
                        android:layout_marginRight="4dp"
                        android:background="@drawable/ic_player_browser_more_bg"
                        android:orientation="vertical">
                        <TextView
                            android:id="@+id/tv_refresh"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:drawableLeft="@drawable/icon_browser_more_refresh"
                            android:drawablePadding="9dp"
                            android:padding="9dp"
                            android:text="刷新"
                            android:textColor="#ff666666"
                            android:textSize="15sp" />
                        <TextView
                            android:id="@+id/tv_copy"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:drawableLeft="@drawable/icon_browser_more_copy"
                            android:drawablePadding="9dp"
                            android:padding="9dp"
                            android:text="复制链接"
                            android:textColor="#ff666666"
                            android:textSize="15sp" />
                        <TextView
                            android:id="@+id/tv_open"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:drawableLeft="@drawable/icon_browser_more_open"
                            android:drawablePadding="9dp"
                            android:paddingLeft="9dp"
                            android:paddingTop="9dp"
                            android:paddingBottom="9dp"
                            android:text="用其他浏览器打开"
                            android:textColor="#ff666666"
                            android:textSize="15sp" />
                    </LinearLayout>
                </FrameLayout>
            </FrameLayout>
@@ -188,7 +252,7 @@
    </LinearLayout>
    <TextView
        android:id="@+id/tv_top_bar_left"
        android:id="@+id/tv_top_bar_left1"
        style="@style/TextBuleNormal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
@@ -196,10 +260,11 @@
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:layout_gravity="left|top"
        android:drawableLeft="@drawable/ic_back_two"
        android:drawableLeft="@drawable/icon_player_back"
        android:drawablePadding="3dp"
        android:gravity="center"
        android:padding="8dp" />
        android:padding="8dp"
        android:visibility="gone" />
</FrameLayout>
BuWanVideo/res/layout/category_top_bar.xml
@@ -16,15 +16,15 @@
            android:layout_height="wrap_content"
            android:layout_gravity="right|center_vertical"
            android:layout_marginRight="15dp"
            android:background="@drawable/ic_select2"
            android:background="@drawable/shape_video_list_nav_highlight_bg"
            android:gravity="center"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:paddingTop="3dp"
            android:paddingRight="8dp"
            android:paddingBottom="3dp"
            android:text="最新更新"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="#3B3B3B" />
            android:textColor="@color/video_list_nav_hightlight_text_color" />
    </FrameLayout>
    <FrameLayout
@@ -38,15 +38,15 @@
            android:layout_height="wrap_content"
            android:layout_gravity="left|center_vertical"
            android:layout_marginLeft="15dp"
            android:background="@drawable/shape_video_detail_follow_btn"
            android:background="@drawable/shape_video_list_nav_bg"
            android:gravity="center"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:paddingTop="3dp"
            android:paddingRight="8dp"
            android:paddingBottom="3dp"
            android:text="最热视频"
            android:textColor="#EFEFEF" />
            android:textColor="@color/video_list_nav_text_color" />
    </FrameLayout>
    <FrameLayout
BuWanVideo/res/layout/fragment_player_funshion.xml
@@ -3,6 +3,7 @@
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000"
    android:orientation="vertical">
BuWanVideo/res/layout/fragment_splash_ad.xml
@@ -3,77 +3,55 @@
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#010005"
    android:background="@color/transparent"
    android:orientation="vertical">
    <FrameLayout
        android:id="@+id/fl_ad"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">
        <FrameLayout
            android:id="@+id/fl_ad"
            android:layout_width="match_parent"
            android:layout_height="match_parent"></FrameLayout>
        <LinearLayout
            android:id="@+id/ll_input"
            android:layout_width="wrap_content"
            android:layout_height="34dp"
            android:layout_gravity="top|right"
            android:layout_marginTop="20dp"
            android:layout_marginRight="20dp"
            android:background="@drawable/shape_splash_ad"
            android:gravity="center"
            android:orientation="horizontal"
            android:paddingLeft="20dp"
            android:paddingRight="20dp"
            android:visibility="invisible">
            <TextView
                android:id="@+id/ad_input"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:maxLines="1"
                android:padding="2dp"
                android:text="跳过"
                android:textColor="@color/white"
                android:textSize="14sp"
                android:visibility="visible" />
            <TextView
                android:id="@+id/ad_close_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="2dp"
                android:maxLines="1"
                android:padding="2dp"
                android:text="5"
                android:textColor="@color/white"
                android:textSize="14sp"
                android:visibility="visible" />
        </LinearLayout>
    </FrameLayout>
        android:layout_height="match_parent"></FrameLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:padding="15dp">
        android:id="@+id/ll_input"
        android:layout_width="wrap_content"
        android:layout_height="34dp"
        android:layout_gravity="top|right"
        android:layout_marginTop="20dp"
        android:layout_marginRight="20dp"
        android:background="@drawable/shape_splash_ad"
        android:gravity="center"
        android:orientation="horizontal"
        android:paddingLeft="20dp"
        android:paddingRight="20dp"
        android:visibility="invisible">
        <ImageView
            android:layout_width="28dp"
            android:layout_height="28dp"
            android:src="@drawable/ic_launcher"></ImageView>
        <ImageView
        <TextView
            android:id="@+id/ad_input"
            android:layout_width="wrap_content"
            android:layout_height="27dp"
            android:layout_marginLeft="5dp"
            android:src="@drawable/ic_splash_bottom_small"></ImageView>
            android:layout_height="wrap_content"
            android:maxLines="1"
            android:padding="2dp"
            android:text="跳过"
            android:textColor="@color/white"
            android:textSize="14sp"
            android:visibility="visible" />
        <TextView
            android:id="@+id/ad_close_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="2dp"
            android:maxLines="1"
            android:padding="2dp"
            android:text="5"
            android:textColor="@color/white"
            android:textSize="14sp"
            android:visibility="visible" />
    </LinearLayout>
</FrameLayout>
BuWanVideo/res/layout/item_album_list_ad.xml
New file
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/page_content_bg_color"
    android:orientation="vertical">
    <com.qq.e.ads.nativ.widget.NativeAdContainer
        android:id="@+id/root"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <com.lcjian.library.widget.RatioLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="95"
                app:ratio="1.39">
                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">
                    <ImageView
                        android:id="@+id/iv_picture"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:scaleType="centerCrop"></ImageView>
                </FrameLayout>
            </com.lcjian.library.widget.RatioLayout>
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="17dp"
                android:layout_weight="190"
                android:orientation="vertical">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:gravity="bottom"
                    android:orientation="horizontal">
                    <TextView
                        android:id="@+id/tv_name"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:ellipsize="end"
                        android:maxLines="2"
                        android:text="以家人之名"
                        android:textColor="@color/video_list_title_text_color"
                        android:textSize="15sp" />
                </LinearLayout>
                <TextView
                    android:id="@+id/tv_type"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:textColor="@color/video_list_subtitle_text_color"
                    android:textSize="12sp">
                </TextView>
                <View
                    android:layout_width="1dp"
                    android:layout_height="0dp"
                    android:layout_weight="1"></View>
                <TextView
                    android:id="@+id/tv_actors"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:lines="2"
                    android:text="主演: 谭松韵 / 宋威龙 / 张新成 / 孙铱 / 何瑞贤"
                    android:textColor="@color/video_list_subtitle_text_color"
                    android:textSize="12sp" />
                <View
                    android:layout_width="1dp"
                    android:layout_height="0dp"
                    android:layout_weight="1"></View>
                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <TextView
                        android:id="@+id/tv_play"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="@drawable/shape_video_search_result_album_play"
                        android:paddingLeft="30dp"
                        android:paddingTop="6dp"
                        android:paddingRight="30dp"
                        android:paddingBottom="6dp"
                        android:text="查看详情"
                        android:textColor="#ffffe74d"
                        android:textSize="12sp" />
                </FrameLayout>
            </LinearLayout>
        </LinearLayout>
    </com.qq.e.ads.nativ.widget.NativeAdContainer>
</FrameLayout>
BuWanVideo/res/layout/item_follow2.xml
@@ -4,7 +4,7 @@
    android:id="@+id/ll_add_attention"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/shape_video_detail_follow_bg"
    android:background="@drawable/shape_item_follow_bg"
    android:gravity="center_vertical"
    android:orientation="horizontal"
    android:padding="6.5dp">
@@ -59,7 +59,7 @@
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_marginRight="6dp"
        android:background="@drawable/shape_video_detail_follow_btn"
        android:background="@drawable/shape_item_follow_btn"
        android:drawableLeft="@drawable/ic_follow_add"
        android:drawablePadding="7dp"
        android:gravity="center"
@@ -69,6 +69,6 @@
        android:paddingBottom="5dp"
        android:text="已关注"
        android:textColor="@color/follow_btn_text_color"
        android:textSize="10sp" />
        android:textSize="12sp" />
</LinearLayout>
BuWanVideo/res/layout/item_resource.xml
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="#666666" >
    android:layout_height="40dp"
    android:background="@color/page_content_bg_color">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:paddingTop="5dp"
        android:paddingBottom="5dp"
        android:gravity="center" >
        android:paddingBottom="5dp">
        <ImageView
            android:id="@+id/iv_resource"
@@ -22,8 +22,8 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:textColor="@color/white"
            android:gravity="center" />
            android:gravity="center"
            android:textColor="@color/video_detail_resource_text_color" />
    </LinearLayout>
</FrameLayout>
BuWanVideo/res/layout/item_video_search_result_album.xml
@@ -3,6 +3,7 @@
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/page_content_bg_color"
    android:orientation="vertical">
@@ -47,7 +48,7 @@
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="95"
            app:ratio="1.38">
            app:ratio="1.39">
            <FrameLayout
                android:layout_width="match_parent"
BuWanVideo/res/layout/mvideo_activity.xml
@@ -25,12 +25,12 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:drawableStart="@drawable/ic_back"
                android:drawableLeft="@drawable/ic_back_two"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:padding="8dp"
                android:textColor="@color/page_title_text_color" />
                android:textColor="@color/page_title_text_color"
                android:textSize="17sp" />
        </FrameLayout>
        <LinearLayout
BuWanVideo/res/layout/search_result_activity.xml
@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/page_content_bg_color"
    android:background="@color/page_bg_color"
    android:orientation="vertical">
    <include layout="@layout/view_status_bar" />
@@ -11,6 +11,7 @@
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:background="@color/page_content_bg_color"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:padding="8dp">
@@ -87,6 +88,7 @@
                    android:id="@+id/rv_video_search"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/page_content_bg_color"
                    android:paddingLeft="10dp"
                    android:paddingRight="10dp"></android.support.v7.widget.RecyclerView>
            </com.weikou.beibeivideo.widget.MySwipeRefreshLayout>
BuWanVideo/res/layout/video_detail_activity.xml
@@ -119,10 +119,9 @@
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="15dp"
                android:drawableLeft="@drawable/ic_back_two"
                android:drawableLeft="@drawable/icon_player_back"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:src="@drawable/ic_back_two"
                android:textColor="@color/white" />
        </FrameLayout>
BuWanVideo/res/values/colors.xml
@@ -137,5 +137,15 @@
    <color name="video_detail_content_text_color">#999999</color>
    <color name="video_detail_resource_text_color">#666666</color>
    <color name="video_detail_resource_bg_color">#F0F0F0</color>
    <color name="video_detail_follow_bg_color">#FAFAFA</color>
    <color name="video_detail_follow_text_color">#666666</color>
    <color name="video_list_nav_hightlight_text_color">#FFFFFF</color>
    <color name="video_list_nav_hightlight_bg_color">#51B3FF</color>
    <color name="video_list_nav_text_color">#717481</color>
    <color name="video_list_nav_bg_color">#FFFFFF</color>
</resources>
BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java
@@ -35,6 +35,8 @@
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;
import com.umeng.socialize.UMShareAPI;
import com.weikou.beibeivideo.entity.ad.AdPidInfo;
import com.weikou.beibeivideo.entity.ad.AdPositionEnum;
import com.weikou.beibeivideo.entity.ad.SplashAdLoadInfo;
import com.weikou.beibeivideo.ui.SplashActivity;
import com.weikou.beibeivideo.ui.ad.SplashADFragment;
@@ -43,6 +45,9 @@
import com.weikou.beibeivideo.util.BeibeiConstant;
import com.weikou.beibeivideo.util.CrashHandler;
import com.weikou.beibeivideo.util.FunshionConstant;
import com.weikou.beibeivideo.util.ad.AdUtil;
import com.weikou.beibeivideo.util.ad.CSJConstant;
import com.weikou.beibeivideo.util.ad.GDTConstant;
import com.weikou.beibeivideo.util.ad.TTAdManagerHolder;
import com.weikou.beibeivideo.util.downutil.StringUtils;
import com.yeshi.push.PushUtil;
@@ -301,7 +306,38 @@
                ComponentName cn = am.getRunningTasks(1).get(0).topActivity;
                if (!cn.getClassName().equalsIgnoreCase(SplashActivity.class.getName())) {
                    Log.i(TAG, "应当展示开屏广告");
                    SplashADFragment.loadAd(getApplicationContext(), null, null, true, new SplashADFragment.AdLoadResultListener() {
                    //小于30分钟不展示
                    if (System.currentTimeMillis() - SplashADFragment.lastShowTime < 1000 * 60 * 30L)
                        return;
                    if (SplashADFragment.isAdLoaded()) {
                        startActivity(new Intent(getApplicationContext(), SplashAdActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
                        return;
                    }
                    AdUtil.AD_TYPE type1 = AdUtil.getAdType(getApplicationContext(), AdPositionEnum.splashHotStart);
                    String pid1 = AdUtil.getAdPid(getApplicationContext(), AdPositionEnum.splashHotStart);
                    AdPidInfo adPidInfo1 = null;
                    AdPidInfo adPidInfo2 = null;
                    if (type1 != null) {
                        String defaultPid = null;
                        if (type1 == AdUtil.AD_TYPE.csj) {
                            defaultPid = CSJConstant.SPLASH_AD_HOT;
                        } else if (type1 == AdUtil.AD_TYPE.gdt) {
                            defaultPid = GDTConstant.PID_SPLASH_HOT;
                        }
                        if (StringUtils.isNullOrEmpty(pid1)) {
                            defaultPid = pid1;
                        }
                        adPidInfo1 = new AdPidInfo(type1, defaultPid);
                        if (type1 == AdUtil.AD_TYPE.csj) {
                            adPidInfo2 = new AdPidInfo(AdUtil.AD_TYPE.gdt, GDTConstant.PID_SPLASH_HOT);
                        } else if (type1 == AdUtil.AD_TYPE.gdt) {
                            adPidInfo2 = new AdPidInfo(AdUtil.AD_TYPE.csj, CSJConstant.SPLASH_AD_HOT);
                        }
                    }
                    SplashADFragment.loadAd(getApplicationContext(), adPidInfo1, adPidInfo2, null, null, true, new SplashADFragment.AdLoadResultListener() {
                        @Override
                        public void onAdLoad(SplashAdLoadInfo adLoadInfo) {
BuWanVideo/src/com/weikou/beibeivideo/entity/HomeType.java
@@ -59,7 +59,7 @@
    @Expose
    private int count;
    @Expose
    private int pageSize;
    private int number;
    //当前页码(0-开始)
    private int currentPage;
@@ -233,12 +233,12 @@
        this.count = count;
    }
    public int getPageSize() {
        return pageSize;
    public int getNumber() {
        return number;
    }
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    public void setNumber(int number) {
        this.number = number;
    }
    public int getCurrentPage() {
BuWanVideo/src/com/weikou/beibeivideo/entity/ad/AdPidInfo.java
New file
@@ -0,0 +1,31 @@
package com.weikou.beibeivideo.entity.ad;
import com.weikou.beibeivideo.util.ad.AdUtil;
import java.io.Serializable;
public class AdPidInfo implements Serializable {
    private AdUtil.AD_TYPE adType;
    private String pid;
    public AdPidInfo(AdUtil.AD_TYPE adType, String pid) {
        this.adType = adType;
        this.pid = pid;
    }
    public AdUtil.AD_TYPE getAdType() {
        return adType;
    }
    public void setAdType(AdUtil.AD_TYPE adType) {
        this.adType = adType;
    }
    public String getPid() {
        return pid;
    }
    public void setPid(String pid) {
        this.pid = pid;
    }
}
BuWanVideo/src/com/weikou/beibeivideo/entity/ad/AdPositionEnum.java
@@ -2,6 +2,7 @@
public enum AdPositionEnum {
    splash("splash"),//开屏
    splashHotStart("splashHotStart"),//热启动开屏
    videoPlayPre("videoPlayPre"),//视频播放前贴
    exitApp("exitApp"),//APP退出广告
    videoSearch("videoSearch"),//搜索页广告
BuWanVideo/src/com/weikou/beibeivideo/entity/vo/VideoDetailAdInfoVO.java
New file
@@ -0,0 +1,30 @@
package com.weikou.beibeivideo.entity.vo;
import com.google.gson.annotations.Expose;
public class VideoDetailAdInfoVO {
    //播放前贴广告
    @Expose
    private boolean playVideo;
    //全屏视频广告
    @Expose
    private boolean fullVideo;
    public boolean isPlayVideo() {
        return playVideo;
    }
    public void setPlayVideo(boolean playVideo) {
        this.playVideo = playVideo;
    }
    public boolean isFullVideo() {
        return fullVideo;
    }
    public void setFullVideo(boolean fullVideo) {
        this.fullVideo = fullVideo;
    }
}
BuWanVideo/src/com/weikou/beibeivideo/ui/SplashActivity.java
@@ -35,6 +35,7 @@
import com.weikou.beibeivideo.BeibeiVideoAPI;
import com.weikou.beibeivideo.BeibeiVideoApplication;
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.entity.ad.AdPidInfo;
import com.weikou.beibeivideo.entity.ad.AdPositionEnum;
import com.weikou.beibeivideo.entity.ad.AdTypeVO;
import com.weikou.beibeivideo.entity.ad.SplashAdLoadInfo;
@@ -416,32 +417,23 @@
    private SplashADFragment splashADFragment;
    private void loadSplashAd(final AdUtil.AD_TYPE adType, final String pid) {
        SplashADFragment.loadAd(getApplicationContext(), adType, pid, true, new SplashADFragment.AdLoadResultListener() {
            @Override
            public void onAdLoad(SplashAdLoadInfo adLoadInfo) {
                splashADFragment = SplashADFragment.newInstance();
                splashADFragment.setAdShowListener(new SplashADFragment.AdShowListener() {
                    @Override
                    public void onClose() {
                        toMainActivity();
                    }
                });
                getSupportFragmentManager().beginTransaction().replace(R.id.fl_splash_ad, splashADFragment).commitAllowingStateLoss();
            }
    private void loadSplashAd(AdUtil.AD_TYPE adType, String pid) {
        AdPidInfo adPidInfo2 = null;
        if (adType == AdUtil.AD_TYPE.gdt) {
            adPidInfo2 = new AdPidInfo(AdUtil.AD_TYPE.csj, CSJConstant.SPLASH_AD);
        } else {
            adPidInfo2 = new AdPidInfo(AdUtil.AD_TYPE.gdt, BeibeiConstant.GDT_SPLASH_POSITION_ID);
        }
            @Override
            public void onNoAd() {
                toMainActivity();
            }
        splashADFragment = SplashADFragment.newInstance(new AdPidInfo(adType, pid), adPidInfo2);
        splashADFragment.setAdShowListener(new SplashADFragment.AdShowListener() {
            @Override
            public void onClose() {
                toMainActivity();
            }
        });
        //直接加载广告
        getSupportFragmentManager().beginTransaction().replace(R.id.fl_splash_ad, splashADFragment).commitAllowingStateLoss();
    }
    private void myRequetPermission() {
BuWanVideo/src/com/weikou/beibeivideo/ui/ad/SplashADFragment.java
@@ -13,7 +13,9 @@
import android.widget.TextView;
import com.bytedance.sdk.openadsdk.TTSplashAd;
import com.qq.e.ads.splash.SplashAD;
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.entity.ad.AdPidInfo;
import com.weikou.beibeivideo.entity.ad.AdPositionEnum;
import com.weikou.beibeivideo.entity.ad.SplashAdLoadInfo;
import com.weikou.beibeivideo.ui.SplashActivity;
@@ -36,6 +38,7 @@
    private FrameLayout fl_ad;
    private static SplashAdLoadInfo adLoadInfo;
    public static long lastShowTime = 0L;
    private AdShowListener mAdShowListener;
@@ -43,29 +46,39 @@
        this.mAdShowListener = mAdShowListener;
    }
    /**
     * 加载开屏广告
     *
     * @param adType
     */
    private SplashADFragment() {
    }
    public static SplashADFragment newInstance(AdPidInfo pid1, AdPidInfo pid2) {
        SplashADFragment fragment = new SplashADFragment();
        Bundle bundle = new Bundle();
        bundle.putSerializable("pid1", pid1);
        bundle.putSerializable("pid2", pid2);
        fragment.setArguments(bundle);
        return fragment;
    }
    /**
     * 加载开屏广告
     *
     * @param context
     * @param adType1
     * @param pid1
     * @param adPidInfo1
     * @param adPidInfo2
     * @param skip
     * @param time
     * @param first
     * @param adLoadResultListener
     */
    public static void loadAd(Context context, AdUtil.AD_TYPE adType1, String pid1, boolean first, AdLoadResultListener adLoadResultListener) {
        if (adType1 == null) {
            adType1 = AdUtil.getAdType(context, AdPositionEnum.splash);
            pid1 = AdUtil.getAdPid(context, AdPositionEnum.splash);
    public static void loadAd(Context context, AdPidInfo adPidInfo1, AdPidInfo adPidInfo2, View skip, TextView time, boolean first, AdLoadResultListener adLoadResultListener) {
        if (adPidInfo1 == null) {
            if (adLoadResultListener != null)
                adLoadResultListener.onNoAd();
            return;
        }
        final AdUtil.AD_TYPE adType = adType1;
        final String pid = pid1;
        SplashAdUtil.loadAD(pid, adType, context, null, null, null, new SplashAdUtil.SplashAdListener() {
        SplashAdUtil.loadAD(adPidInfo1.getPid(), adPidInfo1.getAdType(), context, skip, time, new SplashAdUtil.SplashAdListener() {
            @Override
            public void onAdLoad(SplashAdLoadInfo adLoadInfo) {
                SplashADFragment.adLoadInfo = adLoadInfo;
@@ -82,22 +95,9 @@
            @Override
            public void noAd() {//初次加载未加载出广告
                if (AdUtil.AD_TYPE.csj == adType) {
                    if (first) {
                        loadAd(context, AdUtil.AD_TYPE.gdt, BeibeiConstant.GDT_SPLASH_POSITION_ID, false, adLoadResultListener);
                    } else {
                        if (adLoadResultListener != null)
                            adLoadResultListener.onNoAd();
                    }
                } else if (AdUtil.AD_TYPE.gdt == adType) {
                    //再次加载穿山甲广告
                    if (first) {
                        loadAd(context, AdUtil.AD_TYPE.csj, CSJConstant.SPLASH_AD, false, adLoadResultListener);
                    } else {
                        if (adLoadResultListener != null)
                            adLoadResultListener.onNoAd();
                    }
                if (first) {
                    loadAd(context, adPidInfo2, null, skip, time, false, adLoadResultListener);
                } else {
                    if (adLoadResultListener != null)
                        adLoadResultListener.onNoAd();
@@ -109,7 +109,7 @@
    private Timer timer;
    private int leftTime = 5;
    public void showAd() {
    public boolean showAd() {
        if (isAdLoaded()) {
            //穿山甲广告
            if (adLoadInfo.getCsjAd() != null) {
@@ -123,34 +123,48 @@
                ad.setSplashInteractionListener(new TTSplashAd.AdInteractionListener() {
                    @Override
                    public void onAdClicked(View view, int type) {
                    }
                    @Override
                    public void onAdShow(View view, int type) {
                        lastShowTime = System.currentTimeMillis();
                    }
                    @Override
                    public void onAdSkip() {
                        if (mAdShowListener != null)
                            mAdShowListener.onClose();
                    }
                    @Override
                    public void onAdTimeOver() {
                        if (mAdShowListener != null)
                            mAdShowListener.onClose();
                    }
                });
                if (timer == null)
                    timer = new Timer();
                timer.cancel();
                if (timer != null)
                    timer.cancel();
                timer = new Timer();
                ll_input.setVisibility(View.VISIBLE);
                timer.schedule(new TimerTask() {
                    @Override
                    public void run() {
                        leftTime--;
                        if (leftTime < 0) {
                            timer.cancel();
                            //进入主页
                            mAdShowListener.onClose();
                            if (ad_close_time != null)
                                ad_close_time.post(new Runnable() {
                                    @Override
                                    public void run() {
                                        if (ad_close_time != null)
                                            ad_close_time.setVisibility(View.GONE);
                                        if (ll_input != null)
                                            ll_input.setClickable(true);
                                    }
                                });
                            return;
                        } else {
                            //倒计时
@@ -162,7 +176,7 @@
                                            ad_close_time.setText(leftTime + "");
                                    }
                                });
                            ll_input.setClickable(false);
                        }
                    }
                }, 1000, 1000);
@@ -171,17 +185,22 @@
                ll_input.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        fl_ad.removeAllViews();
                        mAdShowListener.onClose();
                    }
                });
                adLoadInfo = null;
            } else if (adLoadInfo.getGdtSplashAd() != null) {
                adLoadInfo.getGdtSplashAd().showAd(fl_ad);
                SplashAD splashAD = adLoadInfo.getGdtSplashAd();
                splashAD.showAd(fl_ad);
                lastShowTime = System.currentTimeMillis();
                adLoadInfo = null;
            }
            return true;
        }
        return false;
    }
    /**
@@ -196,17 +215,10 @@
        return false;
    }
    public static SplashADFragment newInstance() {
        Bundle bundle = new Bundle();
        SplashADFragment fragment = new SplashADFragment();
        fragment.setArguments(bundle);
        return fragment;
    }
    private void initView(View root) {
        ll_input = root.findViewById(R.id.ll_input);
        ad_close_time = root.findViewById(R.id.ad_close_time);
        fl_ad = root.findViewById(R.id.fl_ad);
    }
    @Nullable
@@ -214,7 +226,35 @@
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View root = LayoutInflater.from(getContext()).inflate(R.layout.fragment_splash_ad, null);
        initView(root);
        showAd();
        if (!showAd()) {
            Bundle arguments = getArguments();
            AdPidInfo adPidInfo1 = null;
            AdPidInfo adPidInfo2 = null;
            if (arguments != null) {
                adPidInfo1 = (AdPidInfo) arguments.getSerializable("pid1");
                adPidInfo2 = (AdPidInfo) arguments.getSerializable("pid2");
            }
            loadAd(getContext(), adPidInfo1, adPidInfo2, ll_input, ad_close_time, true, new SplashADFragment.AdLoadResultListener() {
                @Override
                public void onAdLoad(SplashAdLoadInfo adLoadInfo) {
                    showAd();
                }
                @Override
                public void onNoAd() {
                    if (mAdShowListener != null)
                        mAdShowListener.onClose();
                }
                @Override
                public void onClose() {
                    if (mAdShowListener != null)
                        mAdShowListener.onClose();
                }
            });
        }
        return root;
    }
BuWanVideo/src/com/weikou/beibeivideo/ui/ad/SplashAdActivity.java
@@ -23,10 +23,10 @@
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setContentView(R.layout.activity_splash_ad);
        TopStatusSettings.setStatusViewAndDeepColor(this);
        EventBus.getDefault().register(this);
        splashADFragment = SplashADFragment.newInstance();
        splashADFragment = SplashADFragment.newInstance(null, null);
        splashADFragment.setAdShowListener(new SplashADFragment.AdShowListener() {
            @Override
            public void onClose() {
BuWanVideo/src/com/weikou/beibeivideo/ui/common/VideosFragment.java
@@ -280,11 +280,11 @@
                rl_category_video.setRefreshing(true);
                category_two = 1;
                tv_new.setBackgroundResource(R.drawable.ic_select2);
                tv_hot.setBackgroundResource(R.drawable.shape_video_detail_follow_btn);
                tv_new.setBackground(getResources().getDrawable(R.drawable.shape_video_list_nav_highlight_bg));
                tv_hot.setBackground(getResources().getDrawable(R.drawable.shape_video_list_nav_bg));
                tv_new.setTextColor(Color.parseColor("#3B3B3B"));
                tv_hot.setTextColor(Color.parseColor("#efefef"));
                tv_new.setTextColor(getResources().getColor(R.color.video_list_nav_hightlight_text_color));
                tv_hot.setTextColor(getResources().getColor(R.color.video_list_nav_text_color));
                getVideoList();
                break;
@@ -292,10 +292,10 @@
                mCurrentPage = 1;
                category_two = 2;
                rl_category_video.setRefreshing(true);
                tv_new.setBackgroundResource(R.drawable.shape_video_detail_follow_btn);
                tv_hot.setBackgroundResource(R.drawable.ic_select2);
                tv_hot.setTextColor(Color.parseColor("#3B3B3B"));
                tv_new.setTextColor(Color.parseColor("#efefef"));
                tv_hot.setBackground(getResources().getDrawable(R.drawable.shape_video_list_nav_highlight_bg));
                tv_new.setBackground(getResources().getDrawable(R.drawable.shape_video_list_nav_bg));
                tv_hot.setTextColor(getResources().getColor(R.color.video_list_nav_hightlight_text_color));
                tv_new.setTextColor(getResources().getColor(R.color.video_list_nav_text_color));
                getVideoList();
                break;
BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java
@@ -14,6 +14,9 @@
import android.os.Handler;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -124,7 +127,7 @@
            .build();
    public static EpisodeFragment newInstance(VideoInfo videoInfo,
                                              int playingPosition, int start, int end,String from) {
                                              int playingPosition, int start, int end, String from) {
        EpisodeFragment episodeFragment = new EpisodeFragment();
        Bundle args = new Bundle();
        args.putSerializable("video_info", videoInfo);
@@ -214,12 +217,14 @@
    }
    private void setFollowData(boolean attention) {
        tv_cancle_follow.setBackgroundResource(R.drawable.shape_video_detail_follow_btn);
        tv_cancle_follow.setTextColor(getResources().getColor(R.color.video_detail_follow_text_color));
        if (attention) {
            tv_cancle_follow.setText("已关注");
            tv_cancle_follow.setCompoundDrawables(null, null, null, null);
        } else {
            tv_cancle_follow.setText("关注");
            Drawable drawable = getResources().getDrawable(R.drawable.ic_follow_add);
            Drawable drawable = getResources().getDrawable(R.drawable.ic_follow_add_w);
            drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
            tv_cancle_follow.setCompoundDrawables(drawable, null, null, null);
        }
@@ -247,6 +252,7 @@
        tv_video_resource = contentView.findViewById(R.id.tv_video_resource);
        ll_add_attention = contentView.findViewById(R.id.ll_add_attention);
        ll_add_attention.setBackgroundResource(R.drawable.shape_video_detail_follow_bg);
        tv_title = contentView.findViewById(R.id.tv_title);
        tv_score = contentView.findViewById(R.id.tv_score);
        tv_play_num = contentView.findViewById(R.id.tv_play_num);
@@ -684,21 +690,30 @@
    private ProgressDialog pd;
    private void setResource(String resource) {
        SpannableString st = new SpannableString(resource);
        st.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.video_detail_resource_text_color)), 3, resource.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
        tv_video_resource.setText(st);
    }
    private void initResource() {
        if (mVideoInfo.getResourceList() != null
                && mVideoInfo.getResourceList().size() > 0) {
            tv_video_resource.setVisibility(View.VISIBLE);
            String resource = "";
            if (selectedUrl == null || selectedUrl.getPicture() == null) {
                tv_video_resource.setText("来源:其他");
                resource = "来源:其他";
            } else {
                tv_video_resource.setText("来源:" + selectedUrl.getName());
                resource = "来源:" + selectedUrl.getName();
            }
            setResource(resource);
            popupWindow = new PopupWindow(
                    com.weikou.beibeivideo.util.DimenUtils.dip2px(getContext(), 120),
                    android.view.WindowManager.LayoutParams.WRAP_CONTENT);
            popupWindow.setOutsideTouchable(true);// 点击外部可点击
            popupWindow.setBackgroundDrawable(new ColorDrawable(0));// 设置背景
            popupWindow.setBackgroundDrawable(getResources().getDrawable(R.drawable.shape_video_detail_resource_bg));
            popupWindow.setAnimationStyle(R.style.PopupAnimation);
            popupWindow.setFocusable(true);// 获取焦点
@@ -706,6 +721,8 @@
            ListView.LayoutParams param = new ListView.LayoutParams(
                    FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT);
            lv.setLayoutParams(param);
            lv.setBackground(getResources().getDrawable(R.drawable.shape_video_detail_resource_bg));
            lv.setOnItemClickListener(new OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> parent, View view,
@@ -722,20 +739,19 @@
                        pd.show();
                        getVideoDetail(mVideoInfo.getId(), urlList
                                .get(position).getId(), mVideoInfo
                                .getThirdType(), true,fromName);
                                .getThirdType(), true, fromName);
                    }
                    selectedUrl = urlList.get(position);
                    if (selectedUrl == null || selectedUrl.getPicture() == null) {
                        tv_video_resource.setText("来源:其他");
                        setResource("来源:其他");
                    } else {
                        tv_video_resource.setText("来源:" + selectedUrl.getName());
                        setResource("来源:" + selectedUrl.getName());
                    }
                }
            });
            lv.setAdapter(new ResourceAdapter(urlList));
            lv.setDivider(new ColorDrawable(Color.BLACK));
            lv.setDividerHeight(1);
            lv.setDividerHeight(0);
            popupWindow.setContentView(lv);
            /*
             * Window dialogWindow = dialog.getWindow(); dialogWindow.get
@@ -776,9 +792,7 @@
            TextView tv = view.findViewById(R.id.tv_resource);
            try {
                Glide.with(getActivity().getApplicationContext())
                        .load(reList.get(position).getPicture().contains("http://") ? reList
                                .get(position).getPicture() : BeibeiConstant.HOST
                                + "/BuWan/" + reList.get(position).getPicture())
                        .load(reList.get(position).getPicture())
                        .apply(new RequestOptions().placeholder(R.drawable.from_other).error(R.drawable.from_other))
                        .into(iv);
            } catch (IllegalArgumentException e) {
BuWanVideo/src/com/weikou/beibeivideo/ui/media/VideoDetailActivity2.java
@@ -61,6 +61,7 @@
import com.weikou.beibeivideo.entity.VideoInfo;
import com.weikou.beibeivideo.entity.VideoResource;
import com.weikou.beibeivideo.entity.video.ChangeVideoEvent;
import com.weikou.beibeivideo.entity.vo.VideoDetailAdInfoVO;
import com.weikou.beibeivideo.ui.BaseActivity;
import com.weikou.beibeivideo.ui.ad.PlayVideoPreADFragment;
import com.weikou.beibeivideo.ui.common.ShareActivity;
@@ -131,6 +132,8 @@
    private boolean playerLock;//播放器是否锁屏
    private String from;
    private VideoDetailAdInfoVO adInfo;
    @Override
    protected void onSaveInstanceState(Bundle outState) {
@@ -280,6 +283,8 @@
    private void loadFullVideoAd() {
        if (adInfo == null || !adInfo.isFullVideo())
            return;
        //加载广告
        if (BeibeiConstant.AD_TYPE.isVideoDetailSplashAd()) {
            if (FullVideoAdManager.getInstance().isCacahed()) {
@@ -324,7 +329,7 @@
        if (BeibeiConstant.IS_TEST)
            BeibeiConstant.AD_TYPE = null;
        //需要加载广告
        if (BeibeiConstant.AD_TYPE != null && BeibeiConstant.AD_TYPE.isPlayerAd() && playUrl != null && playUrl.getPlayType() != 2) {
        if (BeibeiConstant.AD_TYPE != null && BeibeiConstant.AD_TYPE.isPlayerAd() && playUrl != null && playUrl.getPlayType() != 2 && adInfo != null && adInfo.isPlayVideo()) {
            mVideoDetailVideoAdFragment = new PlayVideoPreADFragment();
            mVideoDetailVideoAdFragment.setPageEventListener(new IPageEventListener() {
                @Override
@@ -814,25 +819,28 @@
                            Gson gson = new GsonBuilder().setFieldNamingPolicy(
                                    FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            JSONObject videoJson = data.optJSONObject("Video");
                            final VideoInfo videoInfo = gson
                                    .fromJson(jsonObject.getJSONObject("Data")
                                    .fromJson(videoJson
                                                    .toString(),
                                            new TypeToken<VideoInfo>() {
                                            }.getType());
                            if (videoInfo != null) {
                                VideoUtil.saveVideoEpisodeList(BeibeiVideoApplication.application, videoInfo.getVideoDetailList(), false);
                            }
                            // 附加字段
                            if (jsonObject.optJSONObject("Extra1") != null) {
                                if (jsonObject.optJSONObject("Extra1").optJSONObject("Attention") != null) {
                                    JSONObject obj = jsonObject.optJSONObject("Extra1").optJSONObject("Attention");
                                    Follow attention = new Follow();
                                    attention.setMovieName(obj.optString("Name"));
                                    attention.setMoviePicture(obj.optString("Picture"));
                                    attention.setUpdateInfo(obj.optString("UpdateInfo"));
                                    attention.setAttention(Boolean.parseBoolean(obj.optString("IsAttention")));
                                    videoInfo.setAttention(attention);
                                }
                            if (data.optJSONObject("AdInfo") != null) {
                                adInfo = gson.fromJson(data.optJSONObject("AdInfo").toString(), VideoDetailAdInfoVO.class);
                            }
                            // 关注
                            if (data.optJSONObject("Attention") != null) {
                                JSONObject obj = data.optJSONObject("Attention");
                                Follow attention = new Follow();
                                attention.setMoviePicture(obj.optString("Picture"));
                                attention.setMovieName(obj.optString("Name"));
                                attention.setUpdateInfo(obj.optString("UpdateInfo"));
                                attention.setAttention(obj.optBoolean("Attention"));
                                videoInfo.setAttention(attention);
                            }
                            VideoDetailActivity2.this.videoInfo = videoInfo;
                            JSONArray extraData = jsonObject
BuWanVideo/src/com/weikou/beibeivideo/ui/mine/PPTVPlayFragment.java
@@ -7,6 +7,7 @@
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.os.Bundle;
@@ -31,6 +32,7 @@
import android.widget.TextView;
import android.widget.Toast;
import com.androidquery.AQuery;
import com.lcjian.library.RetainViewFragment;
import com.lcjian.library.dialog.DialogUtil;
import com.lcjian.library.util.SingleToast;
@@ -50,6 +52,7 @@
import com.weikou.beibeivideo.ui.dialog.VIPDialog;
import com.weikou.beibeivideo.ui.login.LoginActivity;
import com.weikou.beibeivideo.ui.main.MainActivity;
import com.weikou.beibeivideo.ui.video.VideoPlayerBrowserActivity;
import com.weikou.beibeivideo.util.BeibeiConstant;
import com.weikou.beibeivideo.util.ConfigUtil;
import com.weikou.beibeivideo.util.DimenUtils;
@@ -91,7 +94,9 @@
    private boolean showAd = true;
    private Dialog loadingDialog;
    private ImageView iv_refresh;
    private TextView tv_right;
    private AQuery query;
    private void getPPVideoInfo(String url) {
@@ -168,6 +173,13 @@
                return super.onConsoleMessage(consoleMessage);
            }
            @Override
            public void onReceivedTitle(WebView view, String title) {
                super.onReceivedTitle(view, title);
                tv_url.setText(view.getUrl());
                tv_title.setText(title);
            }
            /**
             * 全屏播放配置
             */
@@ -187,6 +199,7 @@
                getActivity().getWindow().setAttributes(attrs);
                ll_bottom.setVisibility(View.GONE);
                ll_top.setVisibility(View.GONE);
                query.id(R.id.tv_top_bar_left1).visibility(View.VISIBLE);
            }
            @Override
@@ -207,6 +220,7 @@
                attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;
                getActivity().getWindow().setAttributes(attrs);
                setLeftTime();
                query.id(R.id.tv_top_bar_left1).visibility(View.GONE);
            }
        });
        WebSettings webSetting = webview.getSettings();
@@ -275,6 +289,7 @@
    @Override
    public void onCreateView(View contentView, Bundle savedInstanceState) {
        query = new AQuery(contentView);
        initView(contentView);
        Bundle bundle = getArguments();
        if (bundle != null) {
@@ -320,13 +335,14 @@
        ll_top = view.findViewById(R.id.ll_top);
        tv_title = view.findViewById(R.id.tv_title);
        tv_url = view.findViewById(R.id.tv_url);
        iv_refresh = view.findViewById(R.id.iv_refresh);
        tv_right = view.findViewById(R.id.tv_right);
        query.id(R.id.tv_top_bar_left1).clicked(this);
        iv_favourite.setOnClickListener(this);
        iv_watch_history.setOnClickListener(this);
        ll_vip_open.setOnClickListener(this);
        iv_refresh.setOnClickListener(this);
        tv_right.setOnClickListener(this);
        tv_url.setOnClickListener(new View.OnClickListener() {
            @Override
@@ -361,6 +377,41 @@
                jumpToVIP();
            }
        }).create();
        query.id(R.id.fl_menu).clicked(new OnClickListener() {
            @Override
            public void onClick(View v) {
                hiddenMenu();
            }
        });
        query.id(R.id.tv_refresh).clicked(new OnClickListener() {
            @Override
            public void onClick(View v) {
                hiddenMenu();
                webview.reload();
            }
        });
        query.id(R.id.tv_copy).clicked(new OnClickListener() {
            @Override
            public void onClick(View v) {
                hiddenMenu();
                ClipboardUtil.copy(getContext(), tv_url.getText().toString());
                Toast.makeText(getContext(), "复制成功", Toast.LENGTH_SHORT).show();
            }
        });
        query.id(R.id.tv_open).clicked(new OnClickListener() {
            @Override
            public void onClick(View v) {
                hiddenMenu();
                String url = tv_url.getText().toString();
                Uri uri = Uri.parse(url);
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);
            }
        });
    }
@@ -459,10 +510,20 @@
        super.onDestroy();
    }
    private void hiddenMenu() {
        query.id(R.id.fl_menu).visibility(View.GONE);
    }
    private void showMenu() {
        query.id(R.id.fl_menu).visibility(View.VISIBLE);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_top_bar_left: {
            case R.id.tv_top_bar_left:
            case R.id.tv_top_bar_left1: {
                if (getActivity().getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
                    if (webview != null)
                        webview.loadUrl("javascript:exitFullScreenPlay();");
@@ -484,10 +545,11 @@
            case R.id.ll_vip_open:
                jumpToVIP();
                break;
            case R.id.iv_refresh:
                if (webview != null) {
                    webview.reload();
                }
            case R.id.tv_right:
                if (query.id(R.id.fl_menu).getView().getVisibility() == View.VISIBLE)
                    hiddenMenu();
                else
                    showMenu();
                break;
            default:
                break;
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
@@ -263,9 +263,7 @@
        rl_recommend.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                if (position == 0) {
                    getHotStars();
                }
                //加载广告
                loadAd();
                getHomeAd();
@@ -289,8 +287,6 @@
                    rl_recommend.setRefreshing(true);
                    getHomeAd();
                    Log.i("mResult", "onCreate---postDelayed---loadAD1");
                    if (position == 0)
                        getHotStars();
                }
            }
        }, 500);
@@ -716,11 +712,18 @@
                                List<HomeVideo> homeList = new ArrayList<HomeVideo>();
                                if (homeArray != null && homeArray.length() > 0) {
                                    for (int j = 0; j < homeArray.length(); j++) {
                                        homeList.add(gson.fromJson(homeArray
                                                        .optJSONObject(j).toString(),
                                                HomeVideo.class));
                                        //TODO 测试
                                        if (i == 1 && j == 0) {
                                            homeList.get(0).setBigPicture(true);
                                        }
                                    }
                                }
                                type.setHomeVideoList(homeList);
                                JSONArray itemArray = obj
                                        .optJSONArray("ItemTypeList");
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendNewAdapter.java
@@ -275,7 +275,7 @@
            }
            //不足一页不显示刷新
            if (homeType.getCount() <= homeType.getPageSize()) {
            if (homeType.getCount() <= homeType.getNumber()) {
                refreshP = 0;
            }
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchResultActivity.java
@@ -31,6 +31,11 @@
import com.google.gson.reflect.TypeToken;
import com.lcjian.library.util.common.SoftKeyboardUtils;
import com.lcjian.library.util.common.StringUtils;
import com.qq.e.ads.cfg.VideoOption;
import com.qq.e.ads.nativ.NativeADUnifiedListener;
import com.qq.e.ads.nativ.NativeUnifiedAD;
import com.qq.e.ads.nativ.NativeUnifiedADData;
import com.qq.e.comm.util.AdError;
import com.weikou.beibeivideo.BasicTextHttpResponseHandler;
import com.weikou.beibeivideo.BeibeiVideoAPI;
import com.weikou.beibeivideo.R;
@@ -43,6 +48,7 @@
import com.weikou.beibeivideo.util.DimenUtils;
import com.weikou.beibeivideo.util.UmengEventUtil;
import com.weikou.beibeivideo.util.ad.ExpressAdManager;
import com.weikou.beibeivideo.util.ad.GDTConstant;
import com.weikou.beibeivideo.util.ad.manager.SearchResultAdManager;
import com.weikou.beibeivideo.util.ui.DividerItemDecoration;
import com.weikou.beibeivideo.util.ui.TopStatusSettings;
@@ -403,8 +409,10 @@
                    }
                }
            //不存在广告
            if (!hasAd) {
                mVideoInfos.add(0, VideoContent.createAdContent(SearchResultActivity.this.adList.get(0)));
            if (!hasAd && mVideoInfos.size() > 2) {
                //TODO 测试
                VideoContent videoContent = VideoContent.createAdContent(SearchResultActivity.this.adList.get(0));
                mVideoInfos.add(2, videoContent);
                SearchResultActivity.this.adList.remove(0);
                adapter.notifyDataSetChanged();
            }
@@ -412,24 +420,47 @@
    }
    //拉取2.0的自渲染广告
    private void loadAd() {
        ExpressAdContainer ad = SearchResultAdManager.getInstance(getApplicationContext()).consumeAD();
        if (ad == null) {
            SearchResultAdManager.getInstance(getApplicationContext()).loadAD(1, new ExpressAdManager.IAdLoadListener() {
                @Override
                public void onSuccess(List<ExpressAdContainer> adList) {
        String pid = GDTConstant.PID_2_SEARCH_RESULT_ALBUM;
        NativeUnifiedAD mAdManager = new NativeUnifiedAD(this, pid, new NativeADUnifiedListener() {
            @Override
            public void onNoAD(AdError adError) {
            }
            @Override
            public void onADLoaded(List<NativeUnifiedADData> list) {
                if (list != null && list.size() > 0) {
                    List<ExpressAdContainer> adList = new ArrayList<>();
                    adList.add(new ExpressAdContainer(list.get(0)));
                    fillAD(adList);
                }
            });
        } else {
            List<ExpressAdContainer> adList = new ArrayList<>();
            adList.add(ad);
            fillAD(adList);
        }
        //加载下一个需要的广告
        SearchResultAdManager.getInstance(getApplicationContext()).autoLoadAd();
            }
        });
        mAdManager.setVideoPlayPolicy(VideoOption.VideoPlayPolicy.AUTO);
        mAdManager.loadData(1);
    }
//    private void loadAd() {
//        ExpressAdContainer ad = SearchResultAdManager.getInstance(getApplicationContext()).consumeAD();
//        if (ad == null) {
//            SearchResultAdManager.getInstance(getApplicationContext()).loadAD(1, new ExpressAdManager.IAdLoadListener() {
//                @Override
//                public void onSuccess(List<ExpressAdContainer> adList) {
//                    fillAD(adList);
//                }
//            });
//        } else {
//            List<ExpressAdContainer> adList = new ArrayList<>();
//            adList.add(ad);
//            fillAD(adList);
//        }
//        //加载下一个需要的广告
//        SearchResultAdManager.getInstance(getApplicationContext()).autoLoadAd();
//    }
    private List<ExpressAdContainer> adList = new ArrayList<>();
    private void search(String key, String videoType) {
BuWanVideo/src/com/weikou/beibeivideo/ui/video/SearchResultAdapter.java
@@ -11,6 +11,7 @@
import android.text.style.AbsoluteSizeSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -22,6 +23,11 @@
import com.bumptech.glide.Glide;
import com.lcjian.library.util.common.DimenUtils;
import com.lcjian.library.util.common.StringUtils;
import com.qq.e.ads.nativ.NativeADEventListener;
import com.qq.e.ads.nativ.NativeUnifiedADData;
import com.qq.e.ads.nativ.widget.NativeAdContainer;
import com.qq.e.comm.constants.AdPatternType;
import com.qq.e.comm.util.AdError;
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.entity.VideoDetailInfo;
import com.weikou.beibeivideo.entity.VideoInfo;
@@ -31,6 +37,7 @@
import com.weikou.beibeivideo.ui.media.VideoDetailActivity2;
import com.weikou.beibeivideo.util.ad.ExpressAdManager;
import java.util.ArrayList;
import java.util.List;
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;
@@ -40,6 +47,7 @@
 */
public class SearchResultAdapter extends RecyclerView.Adapter {
    private static final String TAG = "SearchResultAdapter";
    private List<VideoContent> contentList;
    private Activity mContext;
@@ -84,7 +92,7 @@
        } else if (viewType == TYPE_FOOTER) {
            return new HeaderViewHolder(footerView);
        } else if (viewType == VideoContent.TYPE_AD) {
            return new VideoAdHolder(inflater.inflate(R.layout.item_video_list_column1_ad, parent, false));
            return new VideoAdHolder(inflater.inflate(R.layout.item_album_list_ad, parent, false));
        } else if (viewType == TYPE_VIDEO_ALBUM) {
            return new AlbumVideoHolder(inflater.inflate(R.layout.item_video_search_result_album, parent, false));
        } else if (viewType == TYPE_VIDEO_SIMPLE) {
@@ -105,8 +113,9 @@
        final VideoContent videoContent = contentList.get(position);
        if (holder instanceof AlbumVideoHolder) {
            final VideoInfo info = videoContent.getVideo();
            final AlbumVideoHolder albumVideoHolder = (AlbumVideoHolder) holder;
            final VideoInfo info = videoContent.getVideo();
            try {
                String pic = info.getVpicture();
                if (StringUtils.isBlank(pic))
@@ -289,15 +298,48 @@
        } else if (holder instanceof VideoAdHolder) {
            final VideoAdHolder viewHolder = (VideoAdHolder) holder;
            final ExpressAdContainer ad = videoContent.getAd();
            viewHolder.fl_ad.removeAllViews();
            ExpressAdManager.renderAndFillAd(mContext, ad, viewHolder.fl_ad, new ExpressAdManager.IAdEventListener() {
                @Override
                public void closeAd(ExpressAdContainer ad) {
                    contentList.remove(videoContent);
                    notifyDataSetChanged();
            if (videoContent.getAd().getGdt2Unfied() != null) {
                NativeUnifiedADData ad = videoContent.getAd().getGdt2Unfied();
                Glide.with(mContext).load(ad.getImgUrl()).transition(withCrossFade()).placeholder(R.drawable.shape_video_list_cover_placeholder).into(viewHolder.iv_picture);
                viewHolder.tv_name.setText(ad.getTitle());
                viewHolder.tv_actors.setText(ad.getDesc());
                List<View> clickableViews = new ArrayList<>();
                clickableViews.add(viewHolder.tv_play);
                clickableViews.add(viewHolder.view);
                ad.setNativeAdEventListener(new NativeADEventListener() {
                    @Override
                    public void onADExposed() {
                        Log.i(TAG, "onADExposed");
                    }
                    @Override
                    public void onADClicked() {
                        Log.i(TAG, "onADClicked");
                    }
                    @Override
                    public void onADError(AdError adError) {
                    }
                    @Override
                    public void onADStatusChanged() {
                        Log.i(TAG, "onADStatusChanged");
                    }
                });
                //删除多余广告标识
                for (int i = 0; i < viewHolder.mNativeAdContainer.getChildCount(); i++) {
                    if (viewHolder.mNativeAdContainer.getChildAt(i) instanceof ImageView) {
                        viewHolder.mNativeAdContainer.removeViewAt(i);
                        i--;
                    }
                }
            });
                // 将布局与广告进行绑定
                ad.bindAdToView(mContext, viewHolder.mNativeAdContainer, null, clickableViews);
            }
        }
    }
@@ -362,13 +404,25 @@
    }
    class VideoAdHolder extends RecyclerView.ViewHolder {
        ImageView iv_picture;
        TextView tv_name;
        TextView tv_type;
        TextView tv_actors;
        TextView tv_play;
        View view;
        FrameLayout fl_ad;
        NativeAdContainer mNativeAdContainer;
        public VideoAdHolder(View view) {
            super(view);
            this.view = view;
            fl_ad = view.findViewById(R.id.fl_ad);
            this.view = view;
            iv_picture = view.findViewById(R.id.iv_picture);
            tv_name = view.findViewById(R.id.tv_name);
            tv_type = view.findViewById(R.id.tv_type);
            tv_actors = view.findViewById(R.id.tv_actors);
            tv_play = view.findViewById(R.id.tv_play);
            mNativeAdContainer = view.findViewById(R.id.root);
        }
    }
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoColumn2Adapter.java
@@ -428,9 +428,9 @@
        } else if (viewHolder instanceof RecommendVideoAdHolder) {//广告
            final RecommendVideoAdHolder holder = (RecommendVideoAdHolder) viewHolder;
            if (columns == 2) {
                holder.rl_container.setRatio(0.625f);
                holder.rl_container.setRatio(0.562f);
            } else if (columns == 3) {
                holder.rl_container.setRatio(1.4f);
                holder.rl_container.setRatio(1.39f);
            }
            ExpressAdContainer ad = content.getAd();
            View v = inflater.inflate(R.layout.item_ad_list_small_gdt2, null);
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java
@@ -148,7 +148,6 @@
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                Log.i(TAG, "shouldOverrideUrlLoading:" + url);
                tv_url.setText(webview.getUrl());
                return super.shouldOverrideUrlLoading(view, url);
            }
@@ -237,6 +236,7 @@
            public void onReceivedTitle(WebView view, String title) {
                super.onReceivedTitle(view, title);
                tv_title.setText(title);
                tv_url.setText(view.getUrl());
            }
            /**
@@ -288,7 +288,6 @@
//        loadHander.sendEmptyMessage(0);
        String url = getIntent().getStringExtra("url");
        webview.loadUrl(url);
        tv_url.setText(url);
    }
    private void hiddenMenu() {
@@ -457,18 +456,13 @@
            }
            break;
            case R.id.tv_right: {
                setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                findViewById(R.id.v_status_bar).setVisibility(View.GONE);
                findViewById(R.id.top).setVisibility(View.GONE);
            }
            break;
            case R.id.tv_more:
                if (query.id(R.id.fl_menu).getView().getVisibility() == View.VISIBLE)
                    hiddenMenu();
                else
                    showMenu();
                break;
            }
            break;
            default:
                break;
        }
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoRecommendAdapter.java
@@ -472,9 +472,9 @@
        } else if (viewHolder instanceof RecommendVideoAdHolder) {//广告
            final RecommendVideoAdHolder holder = (RecommendVideoAdHolder) viewHolder;
            if (columns == 2) {
                holder.rl_container.setRatio(0.625f);
                holder.rl_container.setRatio(0.562f);
            } else if (columns == 3) {
                holder.rl_container.setRatio(1.4f);
                holder.rl_container.setRatio(1.39f);
            }
            ExpressAdContainer ad = content.getAd();
            View v = inflater.inflate(R.layout.item_ad_list_small_gdt2, null);
BuWanVideo/src/com/weikou/beibeivideo/util/ad/CSJConstant.java
@@ -11,6 +11,9 @@
    //开屏广告
    public static String SPLASH_AD = "887360667";
    //开屏广告热启动
    public static String SPLASH_AD_HOT = "887455481";
    //软件退出广告
    public static String APP_EXIT = "945469133";
BuWanVideo/src/com/weikou/beibeivideo/util/ad/GDTConstant.java
@@ -6,6 +6,8 @@
    public static String PID_HOME_RECOMMEND_BIG_IMG = "2011627548122579";
    public static String PID_VIDEO_DETAIL_PLAYER = "5061928359494942";
    public static String PID_SPLASH_HOT = "4081479119572059";
    //视频播放器下方广告位
    public static String PID_2_VIDEO_DETAIL_PLAY_EXPRESS1 = "9031528552257617";
    //相关视频下方广告位
@@ -15,6 +17,9 @@
    public static String PID_2_VIDEO_LIST_SMALL_AD_COLUMN2 = "7001426565143389";
    //专辑搜索结果
    public static String PID_2_SEARCH_RESULT_ALBUM = "1041571271169104";
    //PPTV视频前贴
    public static String PID_2_VIDEO_DETAIL_PLAYER_PRE_PPTV = "5091266068484315";
@@ -23,4 +28,6 @@
    public static String PID_2_VIDEO_DETAIL_PLAYER_REWARD_PPTV = "9051467743649673";
}
BuWanVideo/src/com/weikou/beibeivideo/util/ad/SplashAdUtil.java
@@ -2,6 +2,8 @@
import android.app.Activity;
import android.content.Context;
import android.os.SystemClock;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -22,25 +24,26 @@
public class SplashAdUtil {
    private static final String TAG = "SplashAdUtil";
    /**
     * 加载开屏广告
     *
     * @param adType
     * @param context
     * @param skip
     * @param vg_ad
     * @param tv_time
     * @param splashAdListener
     */
    public static void loadAD(String pid, AdUtil.AD_TYPE adType, Context context, final View skip, ViewGroup vg_ad, final TextView tv_time, final SplashAdListener splashAdListener) {
    public static void loadAD(String pid, AdUtil.AD_TYPE adType, Context context, final View skip, final TextView tv_time, final SplashAdListener splashAdListener) {
        if (adType == null) {
            splashAdListener.close();
            return;
        }
        if (AdUtil.AD_TYPE.csj == adType) {
            loadCSJ(pid, context, skip, vg_ad, splashAdListener);
            loadCSJ(pid, context, skip, splashAdListener);
        } else if (AdUtil.AD_TYPE.gdt == adType) {
            loadGDT(pid, context, skip, vg_ad, tv_time, splashAdListener);
            loadGDT(pid, context, skip, tv_time, splashAdListener);
        } else {
            splashAdListener.close();
        }
@@ -48,11 +51,12 @@
    private static SplashAD gdtSplashAD;
    private static void loadGDT(String code, Context context, final View skip, ViewGroup vg_ad, final TextView tv_time, final SplashAdListener splashAdListener) {
    private static void loadGDT(String code, Context context, final View skip, final TextView tv_time, final SplashAdListener splashAdListener) {
        String channel = ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL");
        if (StringUtils.isNullOrEmpty(code))
            code = BeibeiConstant.GDT_SPLASH_POSITION_ID;
        skip.setVisibility(View.VISIBLE);
        gdtSplashAD = new SplashAD(context, skip, code, new SplashADListener() {
            @Override
            public void onADDismissed() {
@@ -61,18 +65,20 @@
            @Override
            public void onNoAD(AdError adError) {
                Log.i(TAG, "GDT:onNoAD-" + adError.getErrorMsg());
                splashAdListener.noAd();
            }
            @Override
            public void onADPresent() {
                skip.post(new Runnable() {
                    @Override
                    public void run() {
                        skip.setVisibility(View.VISIBLE);
                    }
                });
                if (skip != null)
                    skip.post(new Runnable() {
                        @Override
                        public void run() {
                            skip.setVisibility(View.VISIBLE);
                        }
                    });
            }
            @Override
@@ -82,12 +88,13 @@
            @Override
            public void onADTick(final long l) {
                tv_time.post(new Runnable() {
                    @Override
                    public void run() {
                        tv_time.setText(l / 1000 + "");
                    }
                });
                if (tv_time != null)
                    tv_time.post(new Runnable() {
                        @Override
                        public void run() {
                            tv_time.setText(l / 1000 + "");
                        }
                    });
            }
            @Override
@@ -97,9 +104,8 @@
            @Override
            public void onADLoaded(long l) {
//                gdtSplashAD.preLoad();
//                System.out.println("");
                splashAdListener.onAdLoad(new SplashAdLoadInfo(gdtSplashAD, l));
                Log.i(TAG, "GDT:onADLoaded-" + l);
                splashAdListener.onAdLoad(new SplashAdLoadInfo(gdtSplashAD, System.currentTimeMillis() + (l - SystemClock.elapsedRealtime())));
            }
        }, 0);
        gdtSplashAD.fetchAdOnly();
@@ -111,11 +117,11 @@
     *
     * @param context
     * @param skip
     * @param vg_ad
     * @param splashAdListener
     */
    private static void loadCSJ(String code, Context context, final View skip, final ViewGroup vg_ad, final SplashAdListener splashAdListener) {
        skip.setVisibility(View.GONE);
    private static void loadCSJ(String code, Context context, final View skip, final SplashAdListener splashAdListener) {
        if (skip != null)
            skip.setVisibility(View.GONE);
        TTAdManager ttAdManager = TTAdManagerHolder.get();
        TTAdNative mTTAdNative = ttAdManager.createAdNative(context.getApplicationContext());
        //穿山甲广告
@@ -152,10 +158,10 @@
                    return;
                }
                splashAdListener.onAdLoad(new SplashAdLoadInfo(gdtSplashAD, System.currentTimeMillis()+1000*60*30L));
                splashAdListener.onAdLoad(new SplashAdLoadInfo(System.currentTimeMillis() + 1000 * 60 * 30L, ad));
            }
        },4000);
        }, 4000);
    }
BuWanVideo/src/com/weikou/beibeivideo/util/video/VideoUIUtil.java
@@ -27,11 +27,11 @@
    public static void setVideoListItem(Context mContext, VideoHolder viewHolder, View.OnClickListener itemOnClickListener, final VideoInfo info, int columns) {
        viewHolder.ll_video_show.setVisibility(View.VISIBLE);
        if (columns == 2) {
            viewHolder.rl_ratio.setRatio(0.625f);
            viewHolder.rl_ratio.setRatio(0.562f);
        } else if (columns == 3) {
            viewHolder.rl_ratio.setRatio(1.4f);
            viewHolder.rl_ratio.setRatio(1.39f);
        } else {
            viewHolder.rl_ratio.setRatio(0.625f);
            viewHolder.rl_ratio.setRatio(0.562f);
        }
        String picture = "";
@@ -106,7 +106,6 @@
            viewHolder.iv_high.setVisibility(View.GONE);
        }
        info.setSubTitle("副标题副标题副标题副标题副标题副标题副标题");
        viewHolder.tv_movie_sub_title.setText(info.getSubTitle()==null?"":info.getSubTitle());
    }
library-GDTSDK/build.gradle
@@ -3,7 +3,7 @@
dependencies {
    api fileTree(include: '*.jar', dir: 'libs')
    api 'com.android.support:support-v4:27.1.1'
    api files('libs/GDTSDK.unionNormal.4.333.1203.aar')
    api 'com.qq.e.union:union:+'
}
android {
library-GDTSDK/libs/GDTSDK.unionNormal.4.333.1203.aar
Binary files differ