Commit a99a7acd authored by jyx's avatar jyx

添加首页快手信息流

parent 7364b611
...@@ -70,6 +70,8 @@ android { ...@@ -70,6 +70,8 @@ android {
buildConfigField "String", "GROMORE_BANNER_CODE", GROMORE_BANNER_CODE buildConfigField "String", "GROMORE_BANNER_CODE", GROMORE_BANNER_CODE
buildConfigField "String", "GROMORE_FULL_CODE", GROMORE_FULL_CODE buildConfigField "String", "GROMORE_FULL_CODE", GROMORE_FULL_CODE
buildConfigField "String", "GROMORE_HALF_CODE", GROMORE_HALF_CODE buildConfigField "String", "GROMORE_HALF_CODE", GROMORE_HALF_CODE
buildConfigField "long", "KS_EXPRESS_CODE", KS_EXPRESS_CODE
buildConfigField "long", "KS_EXPRESS_2_CODE", KS_EXPRESS_2_CODE
buildConfigField "String", "RELEASE_TALKING_DATA_KEY", RELEASE_TALKING_DATA_KEY buildConfigField "String", "RELEASE_TALKING_DATA_KEY", RELEASE_TALKING_DATA_KEY
buildConfigField "String", "WEIXIN_APP_PAY_ID", WEIXIN_APP_PAY_ID buildConfigField "String", "WEIXIN_APP_PAY_ID", WEIXIN_APP_PAY_ID
buildConfigField "String", "SM_APP_ID", SM_APP_ID buildConfigField "String", "SM_APP_ID", SM_APP_ID
...@@ -97,6 +99,8 @@ android { ...@@ -97,6 +99,8 @@ android {
buildConfigField "String", "GROMORE_BANNER_CODE", GROMORE_BANNER_CODE buildConfigField "String", "GROMORE_BANNER_CODE", GROMORE_BANNER_CODE
buildConfigField "String", "GROMORE_FULL_CODE", GROMORE_FULL_CODE buildConfigField "String", "GROMORE_FULL_CODE", GROMORE_FULL_CODE
buildConfigField "String", "GROMORE_HALF_CODE", GROMORE_HALF_CODE buildConfigField "String", "GROMORE_HALF_CODE", GROMORE_HALF_CODE
buildConfigField "long", "KS_EXPRESS_CODE", KS_EXPRESS_CODE
buildConfigField "long", "KS_EXPRESS_2_CODE", KS_EXPRESS_2_CODE
buildConfigField "String", "RELEASE_TALKING_DATA_KEY", RELEASE_TALKING_DATA_KEY buildConfigField "String", "RELEASE_TALKING_DATA_KEY", RELEASE_TALKING_DATA_KEY
buildConfigField "String", "WEIXIN_APP_PAY_ID", WEIXIN_APP_PAY_ID buildConfigField "String", "WEIXIN_APP_PAY_ID", WEIXIN_APP_PAY_ID
buildConfigField "String", "SM_APP_ID", SM_APP_ID buildConfigField "String", "SM_APP_ID", SM_APP_ID
......
...@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager ...@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.duben.miniplaylet.R import com.duben.miniplaylet.R
import com.duben.miniplaylet.ad.express.ExpressAdCallback import com.duben.miniplaylet.ad.express.ExpressAdCallback
import com.duben.miniplaylet.ad.express.MainExpressManager import com.duben.miniplaylet.ad.express.MainExpressManager
import com.duben.miniplaylet.ad.ks.KsExpressManager
import com.duben.miniplaylet.common.Constant import com.duben.miniplaylet.common.Constant
import com.duben.miniplaylet.manager.LocalVedioManager import com.duben.miniplaylet.manager.LocalVedioManager
import com.duben.miniplaylet.mvp.model.* import com.duben.miniplaylet.mvp.model.*
...@@ -150,7 +151,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener ...@@ -150,7 +151,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
} }
private fun loadAd() { private fun loadAd() {
MainExpressManager.instance.loadAd(object : ExpressAdCallback { KsExpressManager.instance.load(object : ExpressAdCallback {
override fun loadSuccess(adView: FrameLayout?) { override fun loadSuccess(adView: FrameLayout?) {
} }
...@@ -162,7 +163,22 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener ...@@ -162,7 +163,22 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
override fun loadFail() { override fun loadFail() {
} }
}) })
// MainExpressManager.instance.loadAd(object : ExpressAdCallback {
// override fun loadSuccess(adView: FrameLayout?) {
//
// }
//
// override fun renderSuccess(adView: FrameLayout?): Boolean {
// adView?.let { addAdView(it) }
// return false
// }
//
// override fun loadFail() {
// }
// })
} }
private fun addAdView(adView: FrameLayout) { private fun addAdView(adView: FrameLayout) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#168FFF" />
<corners android:radius="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tool="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="36dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tool:ignore="SpUsage,ContentDescription">
<ImageView
android:id="@+id/app_icon"
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/test_app_default_icon" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical"
tool:ignore="RtlHardcoded">
<TextView
android:id="@+id/app_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="#222222"
android:textSize="14dp"
tool:text="快手APP" />
<TextView
android:id="@+id/app_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:textColor="#9C9C9C"
android:textSize="11dp"
tool:text="记录美好生活" />
</LinearLayout>
<TextView
android:id="@+id/app_download_btn"
android:layout_width="64dp"
android:layout_height="24dp"
android:background="@drawable/native_item_btn_bg"
android:gravity="center"
android:textColor="#168FFF"
android:textSize="11dp"
tool:text="立即下载" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/ad_container"
tools:ignore="ContentDescription,SpUsage,RtlHardcoded">
<TextView
android:id="@+id/ad_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#020202"
android:textSize="18dp"
tools:text="快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp">
<ImageView
android:id="@+id/ad_image_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/ad_image_mid"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_weight="1"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/ad_image_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:scaleType="centerCrop" />
</LinearLayout>
<include
android:id="@+id/ad_actionBar_container"
layout="@layout/native_item_app_download"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_marginTop="4dp"
tools:ignore="ContentDescription,RtlHardcoded">
<ImageView
android:id="@+id/ksad_logo_icon"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_centerVertical="true"
android:src="@drawable/test_logo_gray"
tools:visibility="visible"
android:layout_marginLeft="3dp"
android:layout_marginRight="2dp" />
<TextView
android:id="@+id/ksad_logo_text"
android:layout_toRightOf="@id/ksad_logo_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:textSize="10sp"
android:fontFamily="sans-serif-condensed-light"
android:paddingLeft="2dp"
android:paddingRight="3dp"
android:text="广告"
tools:visibility="visible"
android:textColor="#9C9C9C" />
<ImageView
android:id="@+id/ad_dislike"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/test_dislike_gray" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="HardcodedText">
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_margin="16dp"
android:gravity="center"
android:text="普通的view" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/ad_container"
tools:ignore="ContentDescription,SpUsage,RtlHardcoded">
<TextView
android:id="@+id/ad_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#020202"
android:textSize="18dp"
tools:text="快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告" />
<ImageView
android:id="@+id/ad_image"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:scaleType="centerCrop" />
<include
android:id="@+id/ad_actionBar_container"
layout="@layout/native_item_app_download"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_marginTop="4dp"
tools:ignore="ContentDescription,RtlHardcoded">
<ImageView
android:id="@+id/ksad_logo_icon"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_centerVertical="true"
android:src="@drawable/test_logo_gray"
tools:visibility="visible"
android:layout_marginLeft="3dp"
android:layout_marginRight="2dp" />
<TextView
android:id="@+id/ksad_logo_text"
android:layout_toRightOf="@id/ksad_logo_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:textSize="10sp"
android:fontFamily="sans-serif-condensed-light"
android:paddingLeft="2dp"
android:paddingRight="3dp"
android:text="广告"
tools:visibility="visible"
android:textColor="#9C9C9C" />
<ImageView
android:id="@+id/ad_dislike"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/test_dislike_gray" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/ad_container"
tools:ignore="ContentDescription,SpUsage,RtlHardcoded">
<TextView
android:id="@+id/ad_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#020202"
android:textSize="18dp"
tools:text="快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告快手广告" />
<FrameLayout
android:id="@+id/video_container"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" />
<include
android:id="@+id/ad_actionBar_container"
layout="@layout/native_item_app_download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="24dp"
android:layout_marginTop="4dp"
tools:ignore="ContentDescription,RtlHardcoded">
<ImageView
android:id="@+id/ksad_logo_icon"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_centerVertical="true"
android:src="@drawable/test_logo_gray"
tools:visibility="visible"
android:layout_marginLeft="3dp"
android:layout_marginRight="2dp" />
<TextView
android:id="@+id/ksad_logo_text"
android:layout_toRightOf="@id/ksad_logo_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:textSize="10sp"
android:fontFamily="sans-serif-condensed-light"
android:paddingLeft="2dp"
android:paddingRight="3dp"
android:text="广告"
tools:visibility="visible"
android:textColor="#9C9C9C" />
<ImageView
android:id="@+id/ad_dislike"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/test_dislike_gray" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
...@@ -56,3 +56,6 @@ GROMORE_DRAW_CODE="" ...@@ -56,3 +56,6 @@ GROMORE_DRAW_CODE=""
GROMORE_BANNER_CODE="102465294" GROMORE_BANNER_CODE="102465294"
GROMORE_FULL_CODE="102473745" GROMORE_FULL_CODE="102473745"
GROMORE_HALF_CODE="102473745" GROMORE_HALF_CODE="102473745"
KS_EXPRESS_CODE=13782000142L
KS_EXPRESS_2_CODE=13782000143L
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment