Java 类org.androidannotations.annotations.Touch 实例源码

项目:Coding-Android    文件:VoiceView.java   
@Touch
boolean voiceRecordButton(MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_CANCEL) {
        //long nowTime = System.currentTimeMillis();
        float nowY = event.getRawY();
        if (nowY - touchY <= -100) {
            //上滑取消录音发送
            cancelRecord();
            showToast(R.string.record_has_canceled);
        } else {
            sendVoice();
        }
        return false;
    } else if (event.getAction() == MotionEvent.ACTION_DOWN) {
        touchY = event.getRawY();
        return false;
    } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
        if (out != null) {
            if (!isTouchInside((int) event.getX(), (int) event.getY())) {
                if (isRecoding) {
                    tips_hold_to_talk.setVisibility(View.VISIBLE);
                    tips_hold_to_talk.setText(R.string.loosen_to_cancel);
                    soundWaveLayout.setVisibility(View.GONE);
                    pause();
                }
            } else {
                if (!isRecoding) {
                    touchY = event.getRawY();
                    tips_hold_to_talk.setVisibility(View.GONE);
                    tips_hold_to_talk.setText(R.string.hold_to_talk);
                    soundWaveLayout.setVisibility(View.VISIBLE);
                    reset();
                }
            }
        }

    }
    return false;
}
项目:iSCAU-Android    文件:CardParam.java   
@Touch
void edt_start_date(MotionEvent motionEvent){
    layout_start_date(motionEvent);
}
项目:iSCAU-Android    文件:CardParam.java   
@Touch
void edt_end_date(MotionEvent motionEvent){
    layout_end_date(motionEvent);
}
项目:iSCAU-Android    文件:CardParam.java   
@Touch
void layout_start_date(MotionEvent motionEvent){
    showCaldroidDialog(edt_start_date,motionEvent);
}
项目:iSCAU-Android    文件:CardParam.java   
@Touch
void layout_end_date(MotionEvent motionEvent){
    showCaldroidDialog(edt_end_date,motionEvent);
}
项目:Hipster-Visualization    文件:HipSpiceFragment.java   
@Touch(R.id.hipster_button_yes)
void onYesTouched(MotionEvent event) {
    handleTouch(event, yes, "hipster");
}
项目:Hipster-Visualization    文件:HipSpiceFragment.java   
@Touch(R.id.hipster_button_no)
void onNoTouched(MotionEvent event) {
    handleTouch(event, no, "nothipster");
}
项目:Hipster-Visualization    文件:HipSpiceFragment.java   
@Touch(R.id.hipster_button_dont_know)
void onDunnoTouched(MotionEvent event) {
    handleTouch(event, dunno, "unknown");
}