如果ExpandableListView的childview中包含EditText,既想讓EditText可以編輯,又可以觸發(fā)ExpandableListView的setOnChildClickListener事件 可以做到嗎?
感覺想要觸發(fā)setOnChildClickListener事件,必須所有的view沒有焦點(diǎn),但是這要EditText又不能編輯
ExpandableListView默認(rèn)能傳遞事件給其items,但是傳遞完后焦點(diǎn)就會(huì)被ExpandableListView搶回來,這個(gè)問題很簡單,只需設(shè)置ExpandableListView不能獲取焦點(diǎn)就行。ExpandableListView.setFocusable(false);一句代碼足矣。