Lawrence Gimenez
Lawrence Gimenez

Reputation: 3237

CheckBox inside CheckedTextView

Currently I'm using CheckedTextView for my ListView. I want to activate the checkbox only when i click on the CheckBox but not on the corresponding text. how to achieve such functionality in CheckedTextView?

EDITED:

I've found a way around about this problem above. I used OnTouchListener and on the onTouch method, checked if event.getX() is in a certain range on a view. If you have other ideas, please share. =)

Upvotes: 1

Views: 438

Answers (1)

Pavandroid
Pavandroid

Reputation: 1586

In this case, why can't you go for CustomAdapter for the list by creating a row design in some row.xml, where you can keep a TextView and and Checkbox separately in the row which will work as you expected.

Upvotes: 2

Related Questions