Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
a99a7acd
Commit
a99a7acd
authored
Oct 24, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加首页快手信息流
parent
7364b611
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1329 additions
and
1 deletion
+1329
-1
build.gradle
video/app/build.gradle
+4
-0
KsExpress2Manager.kt
...ain/java/com/duben/miniplaylet/ad/ks/KsExpress2Manager.kt
+487
-0
KsExpressManager.kt
...main/java/com/duben/miniplaylet/ad/ks/KsExpressManager.kt
+489
-0
MovieFragment.kt
...n/java/com/duben/miniplaylet/ui/fragment/MovieFragment.kt
+17
-1
test_app_default_icon.webp
...pp/src/main/res/drawable-xhdpi/test_app_default_icon.webp
+0
-0
test_dislike_gray.png
video/app/src/main/res/drawable-xhdpi/test_dislike_gray.png
+0
-0
test_logo_gray.webp
video/app/src/main/res/drawable-xhdpi/test_logo_gray.webp
+0
-0
native_item_btn_bg.xml
video/app/src/main/res/drawable/native_item_btn_bg.xml
+8
-0
native_item_app_download.xml
video/app/src/main/res/layout/native_item_app_download.xml
+60
-0
native_item_group_image.xml
video/app/src/main/res/layout/native_item_group_image.xml
+99
-0
native_item_normal.xml
video/app/src/main/res/layout/native_item_normal.xml
+16
-0
native_item_single_image.xml
video/app/src/main/res/layout/native_item_single_image.xml
+73
-0
native_item_video.xml
video/app/src/main/res/layout/native_item_video.xml
+73
-0
gradle.properties
video/gradle.properties
+3
-0
No files found.
video/app/build.gradle
View file @
a99a7acd
...
@@ -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
...
...
video/app/src/main/java/com/duben/miniplaylet/ad/ks/KsExpress2Manager.kt
0 → 100644
View file @
a99a7acd
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/duben/miniplaylet/ad/ks/KsExpressManager.kt
0 → 100644
View file @
a99a7acd
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/duben/miniplaylet/ui/fragment/MovieFragment.kt
View file @
a99a7acd
...
@@ -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
.
loadA
d
(
object
:
ExpressAdCallback
{
KsExpressManager
.
instance
.
loa
d
(
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
)
{
...
...
video/app/src/main/res/drawable-xhdpi/test_app_default_icon.webp
0 → 100644
View file @
a99a7acd
File added
video/app/src/main/res/drawable-xhdpi/test_dislike_gray.png
0 → 100755
View file @
a99a7acd
530 Bytes
video/app/src/main/res/drawable-xhdpi/test_logo_gray.webp
0 → 100644
View file @
a99a7acd
File added
video/app/src/main/res/drawable/native_item_btn_bg.xml
0 → 100644
View file @
a99a7acd
<?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
video/app/src/main/res/layout/native_item_app_download.xml
0 → 100644
View file @
a99a7acd
<?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
video/app/src/main/res/layout/native_item_group_image.xml
0 → 100644
View file @
a99a7acd
<?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
video/app/src/main/res/layout/native_item_normal.xml
0 → 100644
View file @
a99a7acd
<?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
video/app/src/main/res/layout/native_item_single_image.xml
0 → 100644
View file @
a99a7acd
<?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
video/app/src/main/res/layout/native_item_video.xml
0 → 100644
View file @
a99a7acd
<?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
video/gradle.properties
View file @
a99a7acd
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment