Commit 00affc7a by 徐丛奇

nnnnn

parent f50b2c35
......@@ -5,7 +5,6 @@ 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;
......@@ -233,7 +232,7 @@ public class EyeTestActivity extends BaseActivity {
nextE(true);
}
}.start();
speak("请遮住您的" + eye + "眼");
speak("测试马上开始,请遮住您的" + eye + "眼");
mCollect.clear();
}
......@@ -248,8 +247,6 @@ public class EyeTestActivity extends BaseActivity {
*/
private void drewE(E e) {
int angle = 0;
ToastUtil.showLongMessage("getDirect:"+e.getDirect());
LogUtil.e("getDirect:"+e.getDirect());
switch (e.getDirect()){
case TOP:
angle = 0;
......@@ -500,7 +497,6 @@ public class EyeTestActivity extends BaseActivity {
} else {
verifyErrorCount = 0;
}
ToastUtil.showLongMessage("verifyErrorCount:"+verifyErrorCount+"---errorCount:"+errorCount);
//必须答对一半才往下走一行的
//如果错误次数超过一半 (默认位置时上一行没有数据时候)回退一行
if (errorCount >= verifyErrorCount) {
......@@ -691,22 +687,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) {
......@@ -726,6 +722,8 @@ public class EyeTestActivity extends BaseActivity {
int next = currentIndex+1;
if (next < mStudentList.size()) {
prepareStudentTest(next);
}else{
finish();
}
break;
}
......
......@@ -129,7 +129,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="40dp"
android:textColor="#4A4A4A"
android:textSize="12sp"
android:textSize="20sp"
android:id="@+id/test_distance"/>
</RelativeLayout>
\ No newline at end of file
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