如何启用和禁用alertdialog中的项目

时间:2017-07-17 12:32:11

标签: android android-alertdialog

我的问题是我不想两次选择相同的选项。 当它第一次被点击时,它应该被禁用。稍后当我们选择其他项目时,应启用已禁用的项目。我怎样才能做到这一点?

Must be lValue

2 个答案:

答案 0 :(得分:0)

为什么不使用带有here描述的选项的对话框?

答案 1 :(得分:0)

    In you Adapter 
    1. Take a list, add the selected item(Model) to the list and disable the item position(or show a check mark to right side),  
before adding this model to the list clear the list and update the adapter using notifyDataSetChanged().

    so always there is only one item in the list
    you can get the value using that list.
相关问题