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.
我有一个由具有available和inavailable状态的数据填充的列表视图。如果单击绑定了可用状态数据的项目,则项目视图的背景将变为按下状态可绘制。以及如果item绑定了不可用的状态数据被点击,背景不会改变。</p>
available
inavailable
但是,如果我长按该项目,无论它的绑定数据是可用还是不可用,它的背景都应该变为长按状态可绘制。
那么我该如何实现这一点,我曾尝试使用选择器,但它没有状态意味着 long press 。