Commit 4af20218 by 徐丛奇

xxxx

parent 1d9202ed
......@@ -83,6 +83,9 @@ public class EyeTestActivity extends BaseActivity {
@BindView(R.id.iv_eye_test_center_e1)
ImageView eImageView1;
@BindView(R.id.test_distance)
TextView mDistanceText;
private int mDistance = EyeConfig.EYE_DISTANCE_5;
private int mDirection = EYE_DIRECTION_4;
private int mGroupDecimal = EyeConfig.EYE_SETTING_5;
......@@ -135,6 +138,8 @@ public class EyeTestActivity extends BaseActivity {
mGroupDecimal = PreferencesUtils.getInt(EyeConfig.EYE_SETTING_KEY, EyeConfig.EYE_SETTING_5);
mAutoJudge = PreferencesUtils.getInt(EyeConfig.EYE_WAIT_SETTING_KEY, 0);
isTemporary = getIntent().getBooleanExtra("isTemporary",false);
String dis = mDistance==EyeConfig.EYE_DISTANCE_5?"5":"2.5";
mDistanceText.setText("当前测视距离为"+dis+"米");
mList.clear();
for (int i = 0; i < 14; i++) {
mList.add(initLineList(i));
......@@ -243,6 +248,7 @@ 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:
......@@ -494,9 +500,10 @@ public class EyeTestActivity extends BaseActivity {
} else {
verifyErrorCount = 0;
}
ToastUtil.showLongMessage("verifyErrorCount:"+verifyErrorCount+"---errorCount:"+errorCount);
//必须答对一半才往下走一行的
//如果错误次数超过一半 (默认位置时上一行没有数据时候)回退一行
if (errorCount > verifyErrorCount) {
if (errorCount >= verifyErrorCount) {
//如果上一行数据不为空 结束测试
if (mLevelIndex == 0 ||
(mCollect.containsKey(mLevelIndex - 1) && !CheckUtil.isEmpty(mCollect.get(mLevelIndex - 1)))) {
......
......@@ -125,4 +125,11 @@
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="#4A4A4A"
android:textSize="12sp"
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