Commit 4da19e6e authored by wanglei's avatar wanglei

[添加]添加lottie依赖

parent 2475e1a9
......@@ -103,6 +103,8 @@ dependencies {
//第三方UI控件
implementation("io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4")
//lottie
implementation("com.airbnb.android:lottie:6.4.0")
//firebase
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
......
......@@ -16,6 +16,7 @@ import com.applovin.mediation.nativeAds.MaxNativeAdViewBinder
import com.base.appzxhy.R
import com.google.android.gms.ads.nativead.NativeAd
import com.google.android.gms.ads.nativead.NativeAdView
import androidx.core.content.withStyledAttributes
@SuppressLint("ViewConstructor")
class NativeParentView(context: Context, attrs: AttributeSet? = null) :
......@@ -25,20 +26,15 @@ class NativeParentView(context: Context, attrs: AttributeSet? = null) :
init {
// 获取XML属性
val a = context.obtainStyledAttributes(
attrs,
R.styleable.NativeParentView,
0,
0
)
context.withStyledAttributes(attrs, R.styleable.NativeParentView, 0, 0) {
// 从XML中读取属性值
// 例如,如果你的XML中有自定义属性 `app:customAttribute="value"`
removeAll = a.getBoolean(R.styleable.NativeParentView_removeAll, true)
// 从XML中读取属性值
// 例如,如果你的XML中有自定义属性 `app:customAttribute="value"`
removeAll = getBoolean(R.styleable.NativeParentView_removeAll, true)
// 回收TypedArray
a.recycle()
// 回收TypedArray
}
}
......
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