isRightOut = true;
ta = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1f,
Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0);
ta.setDuration(500);
ta.setFillAfter(true);
this.startAnimation(ta);
this.setClickable(false);
} else {
this.setVisibility(VISIBLE);
}
}
}
mListview.setOnTouchListener(onTouchListener);
private boolean isTabShow = true;
private float downY = 0;
// 拖动listview时,如果点击到的地方是item里的一些view,可能出现ACTION_DOWN触发不了的问题。
// 利用isActionDown,当为false时就触发了ACTION_MOVE,第一个action需要当成ACTION_DOWN处理
boolean isActionDown = false;
View.OnTouchListener onTouchListener = new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent