우리는 비슷한 문제가있는 teaser
이라는 LinearLayout
을 가지고있었습니다 (잠시있었습니다). 어쨌든, 우리는이 "해킹"이 touch
에서 약간의 추가 반응을 얻는 데 도움이되는 것으로 나타났습니다.
teaser.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent motionEvent) {
TransitionDrawable transition = (TransitionDrawable) v.getBackground();
switch(motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
if(transition != null) transition.startTransition(250);
break;
case MotionEvent.ACTION_UP:
loadArticle(position);
case MotionEvent.ACTION_CANCEL:
if(transition != null) transition.reverseTransition(0);
break;
}
return false;
}
});
// Has to be here for the touch to work properly.
teaser.setOnClickListener(null); // <-- the important part for you
솔직히 말해서 어떤 운이나 이유도 줄 수는 없지만 도움이 되었기를 바랍니다.
코드를 표시하십시오. 그렇지 않으면 우리는 단지 추측 할 수 있습니다. 감사! –