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.
我有一个listViewin Activity(A),其中包含两个按钮。创建行时应禁用其中之一,并在警报响起时启用它。
listView
Activity(A)
我编写了一个代码来执行此操作,但是当警报响起时,它会启用按钮并将我activity (A)移至Activity (A)getView()
activity (A)
Activity (A)
getView()
即使警报将我转移到Activity (A)... ,我怎样才能启用它?
注意:我的适配器扩展:baseAdapter
baseAdapter
任何建议提前谢谢
莫奈拉...
您的适配器包含一些数据。您应该为每一行提供属性,指示是否应启用按钮。例如 boolean isButtonEnabled = false。当闹钟设置为 isButtonEnabled = true; 在 getView 检查按钮是否启用,并根据它启用或禁用按钮