Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加了ClickableSpan的部分响应其点击事件其余部分响应item的点击事件 #1223

Closed
xiang23 opened this issue Jun 16, 2017 · 5 comments · Fixed by #1204
Closed

Comments

@xiang23
Copy link

xiang23 commented Jun 16, 2017

试了几种方法,要么单独响应其一,要么同时两个都响应.试了一下其他issue的方法只能响应clickablespan的其他部分的text点击直接被屏蔽了

@AllenCoder
Copy link
Collaborator

切换点击事件为

adapter.setonItemClickListener(listener)

然后单独设置clickspan 具体代码demo里面有写到。

adapter写法

@xiang23
Copy link
Author

xiang23 commented Jun 17, 2017

试了下demo,同时这样触发了两个点击事件一个item的一个clickspan的,如果把这个textview 加上addOnClickListener的话除了加上clickspan的文字剩下的文字都不触发item的点击事件了。有没有什么好的解决方案?
测试机型:genymotion的 custom phone
android版本:7.0
库版本:2.9.19

@xiang23
Copy link
Author

xiang23 commented Jun 17, 2017

不好意思没注意改成adapter的 setonItemClickListener,改完以后clickspan的点击事件正常但是其余文字不触发item的点击事件

@AllenCoder
Copy link
Collaborator

处理办法参考这篇博文 http://blog.csdn.net/zhaizu/article/details/51038113

AllenCoder added a commit to AllenCoder/BaseRecyclerViewAdapterHelper that referenced this issue Jun 20, 2017
2. Complete kotlin   App Demo
AllenCoder added a commit to AllenCoder/BaseRecyclerViewAdapterHelper that referenced this issue Jun 23, 2017
CymChad added a commit that referenced this issue Jun 23, 2017
@CymChad
Copy link
Owner

CymChad commented Jun 23, 2017

compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.22'

@CymChad CymChad reopened this Jun 23, 2017
@CymChad CymChad closed this as completed Jun 23, 2017
shabanichtbfob added a commit to shabanichtbfob/vitorfigueiredov that referenced this issue Jan 30, 2022
shabanichtbfob added a commit to shabanichtbfob/vitorfigueiredov that referenced this issue Jan 30, 2022
shabanichtbfob added a commit to shabanichtbfob/vitorfigueiredov that referenced this issue Jan 30, 2022
sbswigartszkl added a commit to sbswigartszkl/TigerPeng2m that referenced this issue Jan 30, 2022
sbswigartszkl added a commit to sbswigartszkl/TigerPeng2m that referenced this issue Jan 30, 2022
gylidian4iz7r added a commit to gylidian4iz7r/jcgueriaud1p that referenced this issue Jan 30, 2022
gylidian4iz7r added a commit to gylidian4iz7r/jcgueriaud1p that referenced this issue Jan 30, 2022
gylidian4iz7r added a commit to gylidian4iz7r/jcgueriaud1p that referenced this issue Jan 30, 2022
MertKarlik08choj added a commit to MertKarlik08choj/crdavis2 that referenced this issue Jan 30, 2022
MertKarlik08choj added a commit to MertKarlik08choj/crdavis2 that referenced this issue Jan 30, 2022
mitosisXhers added a commit to mitosisXhers/matjojob that referenced this issue Jan 30, 2022
Liberatysclw9v added a commit to Liberatysclw9v/fluffisx that referenced this issue Jan 30, 2022
xuluxiu5330 added a commit to xuluxiu5330/meet-projects8 that referenced this issue Feb 5, 2022
xuluxiu5330 added a commit to xuluxiu5330/meet-projects8 that referenced this issue Feb 5, 2022
xuluxiu5330 added a commit to xuluxiu5330/meet-projects8 that referenced this issue Feb 5, 2022
Leoakdsalaur added a commit to Leoakdsalaur/theusual2 that referenced this issue Feb 5, 2022
Leoakdsalaur added a commit to Leoakdsalaur/theusual2 that referenced this issue Feb 5, 2022
lorizhixuing added a commit to lorizhixuing/learn-co-studentsx that referenced this issue Feb 5, 2022
lorizhixuing added a commit to lorizhixuing/learn-co-studentsx that referenced this issue Feb 5, 2022
lorizhixuing added a commit to lorizhixuing/learn-co-studentsx that referenced this issue Feb 5, 2022
aaawcoghao added a commit to aaawcoghao/PatriLotoy that referenced this issue Feb 5, 2022
aaawcoghao added a commit to aaawcoghao/PatriLotoy that referenced this issue Feb 5, 2022
niyunwtnfenf added a commit to niyunwtnfenf/DylanVann that referenced this issue Feb 5, 2022
niyunwtnfenf added a commit to niyunwtnfenf/DylanVann that referenced this issue Feb 5, 2022
kwixue added a commit to kwixue/YogurtCodeCharacterw that referenced this issue Feb 6, 2022
kwixue added a commit to kwixue/YogurtCodeCharacterw that referenced this issue Feb 6, 2022
kwixue added a commit to kwixue/YogurtCodeCharacterw that referenced this issue Feb 6, 2022
zhanfong127888 added a commit to zhanfong127888/socadkq that referenced this issue Feb 28, 2022
mfao8ll9vss added a commit to mfao8ll9vss/MayerEmadq that referenced this issue Feb 28, 2022
mfao8ll9vss added a commit to mfao8ll9vss/MayerEmadq that referenced this issue Feb 28, 2022
Neos21yvm7v added a commit to Neos21yvm7v/eshmakar5 that referenced this issue Feb 28, 2022
dodocarlos0od2x added a commit to dodocarlos0od2x/atharvanaik10b that referenced this issue Feb 28, 2022
dodocarlos0od2x added a commit to dodocarlos0od2x/atharvanaik10b that referenced this issue Feb 28, 2022
dodocarlos0od2x added a commit to dodocarlos0od2x/atharvanaik10b that referenced this issue Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants