Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我总共有 9 行。我只想在一行中更改文本样式,例如在一行中,其中 TextView 文本等于“已禁用”。当我为此行设置文本样式时,它会影响另外 3 行。结果我有 4 行 TextView 文本是粗体的。这是什么问题?
在 ListView 适配器视图中被重用或回收。在您的代码中,当“禁用”时将其设置为您的特殊 textStyle,否则设置为默认值。