OnItemCLickListener not working in listview

前端 未结 24 1943
悲&欢浪女
悲&欢浪女 2020-11-22 11:21

Activity class code:

conversationList = (ListView)findViewById(android.R.id.list);
ConversationArrayAdapter conversationArrayAdapter=new  Conver         


        
24条回答
  •  盖世英雄少女心
    2020-11-22 11:57

    For my lists, my rows have other things that can be clicked, like buttons, so doing a blanket blocksDescendants doesn't work. Instead I add a line in the button's xml:

        android:focusable="false"
    

    That keeps the buttons from blocking the clicks on the rows, but still lets the buttons take the clicks, too.

提交回复
热议问题