Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
appzxhy
Commits
4da19e6e
Commit
4da19e6e
authored
May 20, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[添加]添加lottie依赖
parent
2475e1a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
build.gradle.kts
app/build.gradle.kts
+2
-0
NativeParentView.kt
app/src/main/java/com/base/appzxhy/ads/NativeParentView.kt
+7
-11
No files found.
app/build.gradle.kts
View file @
4da19e6e
...
@@ -103,6 +103,8 @@ dependencies {
...
@@ -103,6 +103,8 @@ dependencies {
//第三方UI控件
//第三方UI控件
implementation
(
"io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4"
)
implementation
(
"io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4"
)
//lottie
implementation
(
"com.airbnb.android:lottie:6.4.0"
)
//firebase
//firebase
implementation
(
platform
(
"com.google.firebase:firebase-bom:32.3.1"
))
implementation
(
platform
(
"com.google.firebase:firebase-bom:32.3.1"
))
...
...
app/src/main/java/com/base/appzxhy/ads/NativeParentView.kt
View file @
4da19e6e
...
@@ -16,6 +16,7 @@ import com.applovin.mediation.nativeAds.MaxNativeAdViewBinder
...
@@ -16,6 +16,7 @@ import com.applovin.mediation.nativeAds.MaxNativeAdViewBinder
import
com.base.appzxhy.R
import
com.base.appzxhy.R
import
com.google.android.gms.ads.nativead.NativeAd
import
com.google.android.gms.ads.nativead.NativeAd
import
com.google.android.gms.ads.nativead.NativeAdView
import
com.google.android.gms.ads.nativead.NativeAdView
import
androidx.core.content.withStyledAttributes
@SuppressLint
(
"ViewConstructor"
)
@SuppressLint
(
"ViewConstructor"
)
class
NativeParentView
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
)
:
class
NativeParentView
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
)
:
...
@@ -25,20 +26,15 @@ class NativeParentView(context: Context, attrs: AttributeSet? = null) :
...
@@ -25,20 +26,15 @@ class NativeParentView(context: Context, attrs: AttributeSet? = null) :
init
{
init
{
// 获取XML属性
// 获取XML属性
val
a
=
context
.
obtainStyledAttributes
(
context
.
withStyledAttributes
(
attrs
,
R
.
styleable
.
NativeParentView
,
0
,
0
)
{
attrs
,
R
.
styleable
.
NativeParentView
,
0
,
0
)
// 从XML中读取属性值
// 从XML中读取属性值
// 例如,如果你的XML中有自定义属性 `app:customAttribute="value"`
// 例如,如果你的XML中有自定义属性 `app:customAttribute="value"`
removeAll
=
a
.
getBoolean
(
R
.
styleable
.
NativeParentView_removeAll
,
true
)
removeAll
=
getBoolean
(
R
.
styleable
.
NativeParentView_removeAll
,
true
)
// 回收TypedArray
// 回收TypedArray
a
.
recycle
()
}
}
}
...
...
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