mBinding.testClick.setOnClickListener {
LogUtils.d("testClick")
}
binding.bottomNavigationView.setOnItemSelectedListener {
switchPage(it.itemId)
return@setOnItemSelectedListener true
}
2022-10-14 14:30:29.367 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall -> view:com.google.android.material.bottomnavigation.BottomNavigationItemView{8dba269 VFE...C.. ..SP..ID 0,0-379,126 #7f080044 app:id/action_home}
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getTarget->com.google.android.material.navigation.NavigationBarMenuView$1@d419fae
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getThis->com.google.android.material.navigation.NavigationBarMenuView$1@d419fae
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getKind->method-execution
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getSourceLocation->NavigationBarMenuView.java:136
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getDeclaringTypeName->com.google.android.material.navigation.NavigationBarMenuView$1
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getModifiers->1
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getName->onClick
2022-10-14 14:30:29.368 23251-23251/com.xx.yhd_super.debug E/ViewAspect: afterOnClickMethodCall getDeclaringType->class com.google.android.material.navigation.NavigationBarMenuView$1
2022-10-14 14:30:30.495 23251-23251/com.xx.yhd_super.debug D/HookOnClickListener: testClick
2022-10-14 14:30:30.496 23251-23251/com.xx.yhd_super.debug D/HookOnClickListener: sendAccessibilityEvent: ViewRootImpl/DecorView[0]/LinearLayout[0]/FrameLayout[0]/FitWindowsLinearLayout[0]/ContentFrameLayout[0]/LinearLayout[0]/FrameLayout[0]/ConstraintLayout[0]/LinearLayout[0]/FlexboxLayout[0]/MaterialButton[13]
dependencies {
//aop埋点
classpath("io.github.wurensen:gradle-android-plugin-aspectjx:3.2.0")
}
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("com.google.android.material:material:1.6.1")
> Configure project :app
[ajx] agp version[7.2.1]
[ajx] gradle version[7.5.1] > 4.0
[ajx] auto add dependency: 'implementation org.aspectj:aspectjrt:1.9.6'
[ajx] register AJXTransform:[com.alibaba.android.arouter.register.core.RegisterTransform@2ce7cff4, com.hujiang.gradle.plugin.android.aspectjx.AJXTransform@65cff907]
[ajx] AJXExtension after optimize:AJXExtension(includes=[], excludes=[com.alibaba.android.arouter, com.alibaba.arouter, com.taobao.weex.ui.view.WXFrameLayout, io.dcloud.feature.nativeObj.NativeView, kotlin.internal, kotlin.jvm, kotlinx.coroutines.android, kotlinx.coroutines.internal], ajcArgs=[], enabled=true)