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.
我想知道是否可以用按钮替换 CheckedTextView 的 CheckMark,这样我就可以单击按钮并删除该项目。如果是这样,推荐的方法是什么?如果不是,我可以采取哪些其他方法来达到相同的结果?
您可以尝试从您的项目中制作一个常规的列表视图,然后为每个要实现的列表项创建一个特定的 listitem.xml 布局。然后,此布局可以包含删除按钮或您想要的任何其他小部件。在代码中,将 onClick 侦听器附加到此按钮以发挥作用。