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
2f41b15a
Commit
2f41b15a
authored
Sep 10, 2018
by
chengxiuhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test main
parent
88e88305
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
12 deletions
+37
-12
build.gradle
app/build.gradle
+1
-1
EyeTestMainActivity.java
app/src/main/java/com/oo/eye/activity/EyeTestMainActivity.java
+1
-1
MorePeopleAdapter.java
app/src/main/java/com/oo/eye/adapter/MorePeopleAdapter.java
+1
-1
SinglePeopleAdapter.java
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
+1
-1
TestListAdapter.java
app/src/main/java/com/oo/eye/adapter/TestListAdapter.java
+1
-1
TestResultListAdapter.java
app/src/main/java/com/oo/eye/adapter/TestResultListAdapter.java
+1
-1
StudentBean.java
app/src/main/java/com/oo/eye/bean/StudentBean.java
+13
-2
DaoMaster.java
app/src/main/java/com/oo/eye/gen/DaoMaster.java
+2
-2
StudentBeanDao.java
app/src/main/java/com/oo/eye/gen/StudentBeanDao.java
+16
-2
No files found.
app/build.gradle
View file @
2f41b15a
...
...
@@ -22,7 +22,7 @@ android {
}
greendao
{
schemaVersion
2
schemaVersion
3
daoPackage
'com.oo.eye.gen'
targetGenDir
'src/main/java'
}
...
...
app/src/main/java/com/oo/eye/activity/EyeTestMainActivity.java
View file @
2f41b15a
...
...
@@ -96,7 +96,7 @@ public class EyeTestMainActivity extends BaseActivity {
ArrayList
<
StudentBean
>
list
=
new
ArrayList
<>();
StudentBean
student
=
new
StudentBean
();
student
.
setRealname
(
"游客"
+(
count
+
1
));
student
.
setClass
es
(
mSimpleDateFormat
.
format
(
new
Date
()));
student
.
setClass
name
(
mSimpleDateFormat
.
format
(
new
Date
()));
list
.
add
(
student
);
EyeConfig
.
getInstance
().
setStudents
(
list
);
Intent
intent
=
new
Intent
(
EyeTestMainActivity
.
this
,
BeforeEyeTestActivity
.
class
);
...
...
app/src/main/java/com/oo/eye/adapter/MorePeopleAdapter.java
View file @
2f41b15a
...
...
@@ -39,7 +39,7 @@ public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, Item
TextView
orderText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_order
);
orderText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getNumber
())
?
"--"
:
studentBean
.
getNumber
());
TextView
groupText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_group
);
groupText
.
setText
(
studentBean
.
getClass
es
());
groupText
.
setText
(
studentBean
.
getClass
name
());
TextView
nameText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_name
);
nameText
.
setText
(
studentBean
.
getRealname
());
TextView
birthdayText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_birthday
);
...
...
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
View file @
2f41b15a
...
...
@@ -49,7 +49,7 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
TextView
orderText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_order
);
orderText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getNumber
())
?
"--"
:
studentBean
.
getNumber
());
TextView
groupText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_group
);
groupText
.
setText
(
studentBean
.
getClass
es
());
groupText
.
setText
(
studentBean
.
getClass
name
());
TextView
nameText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_name
);
nameText
.
setText
(
studentBean
.
getRealname
());
TextView
birthdayText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_birthday
);
...
...
app/src/main/java/com/oo/eye/adapter/TestListAdapter.java
View file @
2f41b15a
...
...
@@ -36,7 +36,7 @@ public class TestListAdapter extends BaseRecyclerViewAdapter<StudentBean, ItemVi
TextView
orderText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_order
);
orderText
.
setText
(
studentBean
.
getNumber
());
TextView
groupText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_group
);
groupText
.
setText
(
studentBean
.
getClass
es
());
groupText
.
setText
(
studentBean
.
getClass
name
());
TextView
nameText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_name
);
nameText
.
setText
(
studentBean
.
getRealname
());
TextView
birthdayText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_birthday
);
...
...
app/src/main/java/com/oo/eye/adapter/TestResultListAdapter.java
View file @
2f41b15a
...
...
@@ -40,7 +40,7 @@ public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean,
TextView
orderText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_number
);
orderText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getNumber
())
?
"--"
:
studentBean
.
getNumber
());
TextView
groupText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_group
);
groupText
.
setText
(
studentBean
.
getClass
es
());
groupText
.
setText
(
studentBean
.
getClass
name
());
TextView
nameText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_name
);
nameText
.
setText
(
studentBean
.
getRealname
());
TextView
birthdayText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_birthday
);
...
...
app/src/main/java/com/oo/eye/bean/StudentBean.java
View file @
2f41b15a
...
...
@@ -27,11 +27,21 @@ public class StudentBean extends BaseBean {
private
boolean
isChick
;
private
String
birthday
;
@Generated
(
hash
=
1107237120
)
public
String
getClassname
()
{
return
classname
;
}
public
void
setClassname
(
String
classname
)
{
this
.
classname
=
classname
;
}
private
String
classname
;
@Generated
(
hash
=
157731520
)
public
StudentBean
(
String
sid
,
String
uid
,
String
school
,
String
grade
,
String
classes
,
String
status
,
String
realname
,
String
number
,
double
left_eye
,
double
right_eye
,
String
url
,
String
pid
,
int
distance
,
boolean
isChick
,
String
birthday
)
{
boolean
isChick
,
String
birthday
,
String
classname
)
{
this
.
sid
=
sid
;
this
.
uid
=
uid
;
this
.
school
=
school
;
...
...
@@ -47,6 +57,7 @@ public class StudentBean extends BaseBean {
this
.
distance
=
distance
;
this
.
isChick
=
isChick
;
this
.
birthday
=
birthday
;
this
.
classname
=
classname
;
}
@Generated
(
hash
=
2097171990
)
...
...
app/src/main/java/com/oo/eye/gen/DaoMaster.java
View file @
2f41b15a
...
...
@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version
2
): knows all DAOs.
* Master of DAO (schema version
3
): knows all DAOs.
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
2
;
public
static
final
int
SCHEMA_VERSION
=
3
;
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
...
...
app/src/main/java/com/oo/eye/gen/StudentBeanDao.java
View file @
2f41b15a
...
...
@@ -39,6 +39,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
public
final
static
Property
Distance
=
new
Property
(
12
,
int
.
class
,
"distance"
,
false
,
"DISTANCE"
);
public
final
static
Property
IsChick
=
new
Property
(
13
,
boolean
.
class
,
"isChick"
,
false
,
"IS_CHICK"
);
public
final
static
Property
Birthday
=
new
Property
(
14
,
String
.
class
,
"birthday"
,
false
,
"BIRTHDAY"
);
public
final
static
Property
Classname
=
new
Property
(
15
,
String
.
class
,
"classname"
,
false
,
"CLASSNAME"
);
}
...
...
@@ -68,7 +69,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
"\"PID\" TEXT,"
+
// 11: pid
"\"DISTANCE\" INTEGER NOT NULL ,"
+
// 12: distance
"\"IS_CHICK\" INTEGER NOT NULL ,"
+
// 13: isChick
"\"BIRTHDAY\" TEXT);"
);
// 14: birthday
"\"BIRTHDAY\" TEXT,"
+
// 14: birthday
"\"CLASSNAME\" TEXT);"
);
// 15: classname
}
/** Drops the underlying database table. */
...
...
@@ -139,6 +141,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
if
(
birthday
!=
null
)
{
stmt
.
bindString
(
15
,
birthday
);
}
String
classname
=
entity
.
getClassname
();
if
(
classname
!=
null
)
{
stmt
.
bindString
(
16
,
classname
);
}
}
@Override
...
...
@@ -203,6 +210,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
if
(
birthday
!=
null
)
{
stmt
.
bindString
(
15
,
birthday
);
}
String
classname
=
entity
.
getClassname
();
if
(
classname
!=
null
)
{
stmt
.
bindString
(
16
,
classname
);
}
}
@Override
...
...
@@ -227,7 +239,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// pid
cursor
.
getInt
(
offset
+
12
),
// distance
cursor
.
getShort
(
offset
+
13
)
!=
0
,
// isChick
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
)
// birthday
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
),
// birthday
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
)
// classname
);
return
entity
;
}
...
...
@@ -249,6 +262,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
entity
.
setDistance
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setIsChick
(
cursor
.
getShort
(
offset
+
13
)
!=
0
);
entity
.
setBirthday
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getString
(
offset
+
14
));
entity
.
setClassname
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
}
@Override
...
...
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