feat(ui): 添加地址显示功能到调味品网格适配器

- 在 Seasoning22GridAdapter 中启用地址显示
- 在 Seasoning18GridAdapter 中启用地址显示
- 更新点击事件以显示地址对话框
- 为网格项目添加地址显示支持
This commit is contained in:
2026-04-27 08:57:30 +08:00
parent c4fbf9dcd6
commit fda88fff33
@@ -103,7 +103,8 @@ class SlaveActivity : BaseActivity() {
scale22Adapter = Seasoning22GridAdapter(
size.largeSize,
size.smallSize,
showNameOnly = false
showNameOnly = false,
showAddress = true
).also {
it.onItemClick = { scale, _ -> showTareDialog(scale.address) }
}
@@ -116,7 +117,7 @@ class SlaveActivity : BaseActivity() {
override fun getSpanSize(position: Int) = 1
}
}
scale18Adapter = Seasoning18GridAdapter(showNameOnly = false).also {
scale18Adapter = Seasoning18GridAdapter(showNameOnly = false, showAddress = true).also {
it.onItemClick = { scale, _ -> showTareDialog(scale.address) }
}
binding.rvScaleList.adapter = scale18Adapter