How to disable the particular list item in list-view in android?

后端 未结 6 716
陌清茗
陌清茗 2021-02-05 13:40

How to disable the particular list item in list-view in android? I mean if once i selected any one of item from a list-view,that item suppose to be disabled which means that ite

6条回答
  •  忘了有多久
    2021-02-05 14:44

     mlistView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
    {
    
     public void onItemSelected(AdapterView arg0, View arg1, int arg2,long arg3)
    {
       arg1.setEnabled(false);
     }
    }
    

提交回复
热议问题