From 10838d1f63bc65889a846f0f24613767de78be4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=9C=8B=E9=A3=9E?= Date: Tue, 9 Aug 2022 18:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E6=8F=90=E4=BA=A4:2022-08-09?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/wpf/app/quickbind/plugins/BindViewPlugin.kt | 2 +- app/src/main/java/com/wpf/app/quick/demo/TestFragment.kt | 8 +++++--- gradle.properties | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/QuickBind/src/main/java/com/wpf/app/quickbind/plugins/BindViewPlugin.kt b/QuickBind/src/main/java/com/wpf/app/quickbind/plugins/BindViewPlugin.kt index 949bb7a7..dd0f110e 100644 --- a/QuickBind/src/main/java/com/wpf/app/quickbind/plugins/BindViewPlugin.kt +++ b/QuickBind/src/main/java/com/wpf/app/quickbind/plugins/BindViewPlugin.kt @@ -18,7 +18,7 @@ class BindViewPlugin : BasePlugin { try { val findViewA = field.getAnnotation(BindView::class.java) ?: return false field.isAccessible = true - if (field[getRealObj(obj, viewModel)] != null) return true +// if (field[getRealObj(obj, viewModel)] != null) return true field[getRealObj(obj, viewModel)] = findView(obj, findViewA.value) return true } catch (e: Exception) { diff --git a/app/src/main/java/com/wpf/app/quick/demo/TestFragment.kt b/app/src/main/java/com/wpf/app/quick/demo/TestFragment.kt index 071c39c1..39d8be7d 100644 --- a/app/src/main/java/com/wpf/app/quick/demo/TestFragment.kt +++ b/app/src/main/java/com/wpf/app/quick/demo/TestFragment.kt @@ -3,6 +3,7 @@ package com.wpf.app.quick.demo import android.annotation.SuppressLint import android.util.Log import android.view.View +import android.widget.TextView import com.wpf.app.quick.activity.QuickFragment import com.wpf.app.quick.activity.QuickViewModelFragment import com.wpf.app.quick.annotations.BindView @@ -15,11 +16,12 @@ import com.wpf.app.quick.widgets.recyclerview.QuickRecyclerView */ class TestFragment: QuickFragment(R.layout.activity_recyclerview_test) { @SuppressLint("StaticFieldLeak") - @BindView(R.id.list) - var list: QuickRecyclerView? = null + @BindView(R.id.btnClean) + var btnClean: TextView? = null override fun initView(view: View?) { - Log.e("TestFragment", "id:${list}---baseview:${view}") + Log.e("TestFragment", "id:${btnClean}---baseview:${view}") + btnClean?.text = "123123" } } diff --git a/gradle.properties b/gradle.properties index 8fe9d66b..1203d398 100755 --- a/gradle.properties +++ b/gradle.properties @@ -28,7 +28,7 @@ android.nonTransitiveRClass=true IS_REMOTE=true IS_ONLY_PLUGIN=false GROUP=com.wpf.app.quick -VERSION_NAME=0.2.14 +VERSION_NAME=0.2.15 POM_DESCRIPTION=Quick Android.