android - 跨模块使用 BR 是否安全?
问题描述
我有一个 Android 库模块com.lib
和一个com.app
依赖于 module的 Android 应用程序模块com.lib
。
在com.lib
中,我有一个dummy.xml
使用数据绑定的布局,其中包括<variable name="somevar" ..>
.
在com.app
我有一个布局some_layout.xml
,它也使用数据绑定,它也有<variable name="somevar" ...>
.
com.lib
使用代码com.lib.BR.somevar
(由于布局而可用)通过使用该方法dummy
“动态”设置some_layout
/的值是否安全?SomeLayoutBinding
.setVariable
解决方案
推荐阅读
- python - python中lightGBM的自定义多类对数损失函数返回错误
- android - 如何在动态链接中显示更多内容?
- c# - 为 WPF 画布中的矩形重用 XAML 样式
- regex - 需要在组中调整没有“+”的正则表达式
- android-recyclerview - Recyclerview 中的 Android 无障碍语音助手问题
- arrays - Julia:函数参数——数组的类型规范
- c# - 如何从其他页面访问共享布局页面中的控件
- java - 创建 Stream 后更改 Stream 源时的 Stream 行为
- asp.net - 如何在 ASP.NET Core 中对电子邮件进行动态链接
- typescript - 如何将设置器限制为仅对特定类可用?