Commit 00affc7a by 徐丛奇

nnnnn

parent f50b2c35
...@@ -5,7 +5,6 @@ import android.os.CountDownTimer; ...@@ -5,7 +5,6 @@ import android.os.CountDownTimer;
import android.os.Handler; import android.os.Handler;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
...@@ -233,7 +232,7 @@ public class EyeTestActivity extends BaseActivity { ...@@ -233,7 +232,7 @@ public class EyeTestActivity extends BaseActivity {
nextE(true); nextE(true);
} }
}.start(); }.start();
speak("请遮住您的" + eye + "眼"); speak("测试马上开始,请遮住您的" + eye + "眼");
mCollect.clear(); mCollect.clear();
} }
...@@ -248,8 +247,6 @@ public class EyeTestActivity extends BaseActivity { ...@@ -248,8 +247,6 @@ public class EyeTestActivity extends BaseActivity {
*/ */
private void drewE(E e) { private void drewE(E e) {
int angle = 0; int angle = 0;
ToastUtil.showLongMessage("getDirect:"+e.getDirect());
LogUtil.e("getDirect:"+e.getDirect());
switch (e.getDirect()){ switch (e.getDirect()){
case TOP: case TOP:
angle = 0; angle = 0;
...@@ -500,7 +497,6 @@ public class EyeTestActivity extends BaseActivity { ...@@ -500,7 +497,6 @@ public class EyeTestActivity extends BaseActivity {
} else { } else {
verifyErrorCount = 0; verifyErrorCount = 0;
} }
ToastUtil.showLongMessage("verifyErrorCount:"+verifyErrorCount+"---errorCount:"+errorCount);
//必须答对一半才往下走一行的 //必须答对一半才往下走一行的
//如果错误次数超过一半 (默认位置时上一行没有数据时候)回退一行 //如果错误次数超过一半 (默认位置时上一行没有数据时候)回退一行
if (errorCount >= verifyErrorCount) { if (errorCount >= verifyErrorCount) {
...@@ -691,22 +687,22 @@ public class EyeTestActivity extends BaseActivity { ...@@ -691,22 +687,22 @@ public class EyeTestActivity extends BaseActivity {
return Double.parseDouble(levelByIndex); return Double.parseDouble(levelByIndex);
} }
@Override // @Override
public boolean onTouchEvent(MotionEvent event) { // public boolean onTouchEvent(MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN){ // if(event.getAction() == MotionEvent.ACTION_DOWN){
//两次点击大于1秒 // //两次点击大于1秒
long currentTime = System.currentTimeMillis(); // long currentTime = System.currentTimeMillis();
if (mLastOnKeyTime > 0 && currentTime - mLastOnKeyTime < 500) { // if (mLastOnKeyTime > 0 && currentTime - mLastOnKeyTime < 500) {
return true; // return true;
} // }
mLastOnKeyTime = currentTime; // mLastOnKeyTime = currentTime;
if(isKeyDwon) { // if(isKeyDwon) {
userChooseError(); // userChooseError();
} // }
} // }
return super.onTouchEvent(event); // return super.onTouchEvent(event);
//
} // }
@Override @Override
public boolean onKeyDown(int keyCode, KeyEvent event) { public boolean onKeyDown(int keyCode, KeyEvent event) {
...@@ -726,6 +722,8 @@ public class EyeTestActivity extends BaseActivity { ...@@ -726,6 +722,8 @@ public class EyeTestActivity extends BaseActivity {
int next = currentIndex+1; int next = currentIndex+1;
if (next < mStudentList.size()) { if (next < mStudentList.size()) {
prepareStudentTest(next); prepareStudentTest(next);
}else{
finish();
} }
break; break;
} }
......
...@@ -129,7 +129,9 @@ ...@@ -129,7 +129,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="40dp"
android:textColor="#4A4A4A" android:textColor="#4A4A4A"
android:textSize="12sp" android:textSize="20sp"
android:id="@+id/test_distance"/> android:id="@+id/test_distance"/>
</RelativeLayout> </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