Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haihang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐丛奇
haihang
Commits
4af20218
Commit
4af20218
authored
Sep 11, 2018
by
徐丛奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xxxx
parent
1d9202ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
EyeTestActivity.java
app/src/main/java/com/oo/eye/activity/EyeTestActivity.java
+8
-1
activity_eye_test.xml
app/src/main/res/layout/activity_eye_test.xml
+8
-0
No files found.
app/src/main/java/com/oo/eye/activity/EyeTestActivity.java
View file @
4af20218
...
...
@@ -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
))))
{
...
...
app/src/main/res/layout/activity_eye_test.xml
View file @
4af20218
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment