Commit a46a944b by chengxiuhong

test main

parent 8076c5f7
......@@ -5,6 +5,7 @@ import android.os.CountDownTimer;
import android.os.Handler;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
......@@ -691,22 +692,22 @@ public class EyeTestActivity extends BaseActivity {
return Double.parseDouble(levelByIndex);
}
// @Override
// public boolean onTouchEvent(MotionEvent event) {
// if(event.getAction() == MotionEvent.ACTION_DOWN){
// //两次点击大于1秒
// long currentTime = System.currentTimeMillis();
// if (mLastOnKeyTime > 0 && currentTime - mLastOnKeyTime < 500) {
// return true;
// }
// mLastOnKeyTime = currentTime;
// if(isKeyDwon) {
// userChooseError();
// }
// }
// return super.onTouchEvent(event);
//
// }
@Override
public boolean onTouchEvent(MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN){
//两次点击大于1秒
long currentTime = System.currentTimeMillis();
if (mLastOnKeyTime > 0 && currentTime - mLastOnKeyTime < 500) {
return true;
}
mLastOnKeyTime = currentTime;
if(isKeyDwon) {
userChooseError();
}
}
return super.onTouchEvent(event);
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
......
......@@ -14,11 +14,13 @@
android:padding="@dimen/dp_12">
<ImageView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/exitwhite" />
<TextView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_6"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment