ListView and Buttons inside ListView

后端 未结 5 2271
花落未央
花落未央 2020-11-29 00:54

I want to display a Button inside the ListView. The goal should be to click on the ListView line or on the button.

Click on th

5条回答
  •  心在旅途
    2020-11-29 01:19

    Add the line below to your list item XML.

    android:descendantFocusability="blocksDescendants"
    

    Then your list item will be like this:

    
    
    
        // Your layout objects here
    
    
    

提交回复
热议问题