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
ea32ec66
Commit
ea32ec66
authored
Sep 07, 2018
by
徐丛奇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.iouou.cn:xucongqi/haihang
parents
5480d6e2
32109e6a
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
615 additions
and
95 deletions
+615
-95
EyeConfig.java
app/src/main/java/com/oo/eye/EyeConfig.java
+1
-1
MorePeopleTestActivity.java
app/src/main/java/com/oo/eye/activity/MorePeopleTestActivity.java
+218
-19
SinglePeopleTestActivity.java
app/src/main/java/com/oo/eye/activity/SinglePeopleTestActivity.java
+45
-14
TestResurtListActivity.java
app/src/main/java/com/oo/eye/activity/TestResurtListActivity.java
+195
-20
PopuAdapter.java
app/src/main/java/com/oo/eye/adapter/PopuAdapter.java
+3
-0
SinglePeopleAdapter.java
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
+18
-18
PopuBean.java
app/src/main/java/com/oo/eye/bean/PopuBean.java
+22
-0
EyeApiService.java
app/src/main/java/com/oo/eye/net/EyeApiService.java
+1
-1
activity_morepeople.xml
app/src/main/res/layout/activity_morepeople.xml
+32
-7
activity_singletest.xml
app/src/main/res/layout/activity_singletest.xml
+39
-6
activity_testresult.xml
app/src/main/res/layout/activity_testresult.xml
+40
-9
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/com/oo/eye/EyeConfig.java
View file @
ea32ec66
...
@@ -27,7 +27,7 @@ public class EyeConfig {
...
@@ -27,7 +27,7 @@ public class EyeConfig {
private
List
<
StudentBean
>
mStudents
;
private
List
<
StudentBean
>
mStudents
;
public
static
String
TEST_SCHOOL_ID
=
"8
4
"
;
public
static
String
TEST_SCHOOL_ID
=
"8
1
"
;
private
static
EyeConfig
instance
=
new
EyeConfig
();
private
static
EyeConfig
instance
=
new
EyeConfig
();
...
...
app/src/main/java/com/oo/eye/activity/MorePeopleTestActivity.java
View file @
ea32ec66
...
@@ -17,13 +17,21 @@ import android.widget.TextView;
...
@@ -17,13 +17,21 @@ import android.widget.TextView;
import
com.app.baselibrary.base.common.BaseActivity
;
import
com.app.baselibrary.base.common.BaseActivity
;
import
com.app.baselibrary.commonUtil.CheckUtil
;
import
com.app.baselibrary.commonUtil.CheckUtil
;
import
com.app.baselibrary.commonUtil.LogUtil
;
import
com.app.baselibrary.commonUtil.ToastUtil
;
import
com.app.baselibrary.commonUtil.ToastUtil
;
import
com.oo.eye.EyeConfig
;
import
com.oo.eye.EyeConfig
;
import
com.oo.eye.R
;
import
com.oo.eye.R
;
import
com.oo.eye.adapter.MorePeopleAdapter
;
import
com.oo.eye.adapter.MorePeopleAdapter
;
import
com.oo.eye.adapter.PopuAdapter
;
import
com.oo.eye.adapter.PopuAdapter
;
import
com.oo.eye.bean.ClassBean
;
import
com.oo.eye.bean.GradeBean
;
import
com.oo.eye.bean.PopuBean
;
import
com.oo.eye.bean.PopuBean
;
import
com.oo.eye.bean.SchoolBean
;
import
com.oo.eye.bean.SearchParamBean
;
import
com.oo.eye.bean.StudentBean
;
import
com.oo.eye.bean.StudentBean
;
import
com.oo.eye.net.EyeDataManager
;
import
com.oo.seex.netlibrary.net.response.OldResponseImpl
;
import
com.oo.seex.netlibrary.net.response.RxCallback
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -31,6 +39,7 @@ import java.util.List;
...
@@ -31,6 +39,7 @@ import java.util.List;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
rx.android.schedulers.AndroidSchedulers
;
/**
/**
* Date : 2018/8/28.
* Date : 2018/8/28.
...
@@ -66,8 +75,19 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -66,8 +75,19 @@ public class MorePeopleTestActivity extends BaseActivity {
LinearLayout
mSeleteAreaLay
;
LinearLayout
mSeleteAreaLay
;
@BindView
(
R
.
id
.
key_test
)
@BindView
(
R
.
id
.
key_test
)
EditText
mKeyTest
;
EditText
mKeyTest
;
@BindView
(
R
.
id
.
progress
)
RelativeLayout
mProgress
;
private
List
<
StudentBean
>
mStudentBeans
;
private
List
<
StudentBean
>
mStudentBeans
;
private
MorePeopleAdapter
mPeopleAdapter
;
private
MorePeopleAdapter
mPeopleAdapter
;
private
SearchParamBean
mSearchParamBean
=
new
SearchParamBean
();
private
SchoolBean
mSchoolBean
;
private
List
<
PopuBean
>
mBeanArrayList
=
new
ArrayList
<>();
//未测试 已测试
private
int
popuPosition
;
//1学校,2未测试,3小组
private
PopuAdapter
mPopuAdapter
;
private
List
<
ClassBean
>
mClassBeans
;
//选择学校的所有小组
private
boolean
isAll
=
true
;
//是否是全部学校
private
List
<
PopuBean
>
mAreaList
=
new
ArrayList
<>();
private
List
<
PopuBean
>
mClassList
=
new
ArrayList
<>();
@Override
@Override
protected
int
getLayoutId
()
{
protected
int
getLayoutId
()
{
...
@@ -78,16 +98,20 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -78,16 +98,20 @@ public class MorePeopleTestActivity extends BaseActivity {
protected
void
init
()
{
protected
void
init
()
{
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mStudentBeans
=
new
ArrayList
<>();
mStudentBeans
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
StudentBean
studentBean
=
new
StudentBean
();
studentBean
.
setRealname
(
"测试"
+
i
);
studentBean
.
setNumber
(
"2016010"
+
i
);
studentBean
.
setClasses
(
"动车组"
+
i
);
studentBean
.
setBirthday
(
"2011010"
+
i
);
mStudentBeans
.
add
(
studentBean
);
}
mPeopleAdapter
=
new
MorePeopleAdapter
(
mStudentBeans
,
this
);
mPeopleAdapter
=
new
MorePeopleAdapter
(
mStudentBeans
,
this
);
mRecycleView
.
setAdapter
(
mPeopleAdapter
);
mRecycleView
.
setAdapter
(
mPeopleAdapter
);
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
"全部"
);
popuBean
.
setChick
(
true
);
mBeanArrayList
.
add
(
popuBean
);
PopuBean
popuBean1
=
new
PopuBean
();
popuBean1
.
setName
(
"已测试"
);
mBeanArrayList
.
add
(
popuBean1
);
PopuBean
popuBean2
=
new
PopuBean
();
popuBean2
.
setName
(
"未测试"
);
mBeanArrayList
.
add
(
popuBean2
);
mSearchParamBean
.
setSchoolId
(
EyeConfig
.
TEST_SCHOOL_ID
);
search
();
}
}
@Override
@Override
...
@@ -96,22 +120,77 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -96,22 +120,77 @@ public class MorePeopleTestActivity extends BaseActivity {
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
}
}
@OnClick
({
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
selete_lay
,
R
.
id
.
selete1_lay
,
R
.
id
.
do_search
,
R
.
id
.
begin_test
})
@OnClick
({
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
selete_lay
,
R
.
id
.
selete1_lay
,
R
.
id
.
do_search
,
R
.
id
.
begin_test
})
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
back_iv
:
case
R
.
id
.
back_iv
:
finish
();
finish
();
break
;
break
;
case
R
.
id
.
selete_area_lay
:
case
R
.
id
.
selete_area_lay
:
showPopWindow
(
1
);
popuPosition
=
1
;
if
(!
CheckUtil
.
isEmpty
(
mAreaList
))
{
showPopWindow
(
mAreaList
);
}
else
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
}
else
{
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
SchoolBean
>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
SchoolBean
>
schoolBeanOldResponse
)
{
if
(
schoolBeanOldResponse
.
getResultData
()
!=
null
)
{
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
ToastUtil
.
showLongMessage
(
errorMessage
);
}
});
}
break
;
break
;
case
R
.
id
.
selete_lay
:
case
R
.
id
.
selete_lay
:
//未测试 已测试
showPopWindow
(
2
);
popuPosition
=
2
;
showPopWindow
(
mBeanArrayList
);
break
;
break
;
case
R
.
id
.
selete1_lay
:
case
R
.
id
.
selete1_lay
:
showPopWindow
(
3
);
popuPosition
=
3
;
if
(!
CheckUtil
.
isEmpty
(
mClassList
))
{
showPopWindow
(
mClassList
);
}
else
if
(!
CheckUtil
.
isNull
(
mClassBeans
))
{
setClassData
();
}
else
{
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
SchoolBean
>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
SchoolBean
>
schoolBeanOldResponse
)
{
if
(
schoolBeanOldResponse
.
getResultData
()
!=
null
)
{
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setClassData
();
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
ToastUtil
.
showLongMessage
(
errorMessage
);
}
});
}
break
;
break
;
case
R
.
id
.
do_search
:
case
R
.
id
.
do_search
:
mSearchParamBean
.
setStudentId
(
mKeyTest
.
getText
().
toString
());
search
();
break
;
break
;
case
R
.
id
.
begin_test
:
case
R
.
id
.
begin_test
:
List
<
StudentBean
>
beanList
=
new
ArrayList
<>();
List
<
StudentBean
>
beanList
=
new
ArrayList
<>();
...
@@ -121,20 +200,64 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -121,20 +200,64 @@ public class MorePeopleTestActivity extends BaseActivity {
beanList
.
add
(
bean
);
beanList
.
add
(
bean
);
}
}
}
}
if
(!
CheckUtil
.
isEmpty
(
beanList
))
{
if
(!
CheckUtil
.
isEmpty
(
beanList
))
{
EyeConfig
.
getInstance
().
setStudents
(
beanList
);
EyeConfig
.
getInstance
().
setStudents
(
beanList
);
Intent
intent
=
new
Intent
(
this
,
TestListActivity
.
class
);
Intent
intent
=
new
Intent
(
this
,
TestListActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
}
else
{
}
else
{
ToastUtil
.
showLongMessage
(
"请选择测试人员"
);
ToastUtil
.
showLongMessage
(
"请选择测试人员"
);
}
}
break
;
break
;
}
}
}
}
private
void
showPopWindow
(
int
position
)
{
private
void
setAreaData
()
{
List
<
GradeBean
>
gradeBeans
=
mSchoolBean
.
getGradeList
();
if
(!
CheckUtil
.
isEmpty
(
gradeBeans
))
{
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
PopuBean
all
=
new
PopuBean
();
all
.
setName
(
"全部学校"
);
all
.
setChick
(
true
);
popuBeans
.
add
(
all
);
for
(
GradeBean
gradeBean
:
gradeBeans
)
{
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
gradeBean
.
getName
());
popuBean
.
setClassBeans
(
gradeBean
.
getClassList
());
popuBeans
.
add
(
popuBean
);
}
mAreaList
=
popuBeans
;
showPopWindow
(
popuBeans
);
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
private
void
setClassData
()
{
if
(!
CheckUtil
.
isEmpty
(
mClassBeans
))
{
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
PopuBean
all
=
new
PopuBean
();
all
.
setName
(
"全部小组"
);
all
.
setClassId
(
""
);
all
.
setChick
(
true
);
popuBeans
.
add
(
all
);
for
(
ClassBean
gradeBean
:
mClassBeans
)
{
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
gradeBean
.
getClasses
());
popuBean
.
setClassId
(
gradeBean
.
getId
());
popuBeans
.
add
(
popuBean
);
}
mClassList
=
popuBeans
;
showPopWindow
(
popuBeans
);
}
else
{
if
(!
isAll
)
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
private
void
showPopWindow
(
List
<
PopuBean
>
popuBeans
)
{
LinearLayout
view
=
mSeleteLay
;
LinearLayout
view
=
mSeleteLay
;
switch
(
position
)
{
switch
(
po
puPo
sition
)
{
case
1
:
case
1
:
view
=
mSeleteAreaLay
;
view
=
mSeleteAreaLay
;
break
;
break
;
...
@@ -154,7 +277,8 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -154,7 +277,8 @@ public class MorePeopleTestActivity extends BaseActivity {
ColorDrawable
cd
=
new
ColorDrawable
(
0x00ffffff
);
// 背景颜色全透明
ColorDrawable
cd
=
new
ColorDrawable
(
0x00ffffff
);
// 背景颜色全透明
popupWindow
.
setBackgroundDrawable
(
cd
);
popupWindow
.
setBackgroundDrawable
(
cd
);
ListView
listView
=
(
ListView
)
conview
.
findViewById
(
R
.
id
.
list_view
);
ListView
listView
=
(
ListView
)
conview
.
findViewById
(
R
.
id
.
list_view
);
listView
.
setAdapter
(
new
PopuAdapter
(
this
,
null
));
mPopuAdapter
=
new
PopuAdapter
(
this
,
popuBeans
);
listView
.
setAdapter
(
mPopuAdapter
);
int
[]
location
=
new
int
[
2
];
int
[]
location
=
new
int
[
2
];
view
.
getLocationOnScreen
(
location
);
view
.
getLocationOnScreen
(
location
);
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
...
@@ -164,7 +288,7 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -164,7 +288,7 @@ public class MorePeopleTestActivity extends BaseActivity {
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
itemClick
(
position
);
}
}
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -173,4 +297,79 @@ public class MorePeopleTestActivity extends BaseActivity {
...
@@ -173,4 +297,79 @@ public class MorePeopleTestActivity extends BaseActivity {
}
}
private
void
itemClick
(
int
position
)
{
List
<
PopuBean
>
popuBeans
=
mPopuAdapter
.
getBeanList
();
for
(
PopuBean
popuBean
:
popuBeans
)
{
popuBean
.
setChick
(
false
);
}
PopuBean
popuBean
=
popuBeans
.
get
(
position
);
popuBean
.
setChick
(
true
);
mPopuAdapter
.
notifyDataSetChanged
();
switch
(
popuPosition
)
{
case
1
:
//学校
isAll
=
position
==
0
?
true
:
false
;
mClassBeans
=
popuBean
.
getClassBeans
();
mSeleteAreaTv
.
setText
(
popuBean
.
getName
());
if
(
popuBean
.
getName
().
equals
(
"全部学校"
))
{
mSearchParamBean
.
setGrade
(
""
);
}
else
{
mSearchParamBean
.
setGrade
(
popuBean
.
getName
());
}
mSearchParamBean
.
setClassId
(
""
);
// mSearchParamBean.setTestStatus("all");
mSelete1Tv
.
setText
(
"全部小组"
);
// mSeleteTv.setText("全部");
break
;
case
2
:
//测试
mSeleteTv
.
setText
(
popuBean
.
getName
());
String
test
=
"all"
;
// 全部:all,已测试:tested,未测试:untested
switch
(
position
)
{
case
0
:
test
=
"all"
;
break
;
case
1
:
test
=
"tested"
;
break
;
case
2
:
test
=
"untested"
;
break
;
}
mSearchParamBean
.
setTestStatus
(
test
);
break
;
case
3
:
//小组
mSearchParamBean
.
setClassId
(
popuBean
.
getClassId
());
mSelete1Tv
.
setText
(
popuBean
.
getName
());
break
;
}
mSearchParamBean
.
setStudentId
(
""
);
search
();
}
/**
* 搜索
*/
private
void
search
()
{
mProgress
.
setVisibility
(
View
.
VISIBLE
);
EyeDataManager
.
getInstance
().
getStudents
(
mSearchParamBean
.
getParams
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
List
<
StudentBean
>>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
List
<
StudentBean
>>
listOldResponse
)
{
if
(
listOldResponse
!=
null
&&
listOldResponse
.
getData
()
!=
null
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
mPeopleAdapter
.
clear
();
mPeopleAdapter
.
appendToListAndNotify
(
listOldResponse
.
getData
());
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
ToastUtil
.
showMessage
(
errorMessage
);
}
});
}
}
}
app/src/main/java/com/oo/eye/activity/SinglePeopleTestActivity.java
View file @
ea32ec66
package
com
.
oo
.
eye
.
activity
;
package
com
.
oo
.
eye
.
activity
;
import
android.graphics.drawable.ColorDrawable
;
import
android.graphics.drawable.ColorDrawable
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
android.widget.PopupWindow
;
import
android.widget.PopupWindow
;
...
@@ -31,6 +33,7 @@ import java.util.ArrayList;
...
@@ -31,6 +33,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
rx.android.schedulers.AndroidSchedulers
;
import
rx.android.schedulers.AndroidSchedulers
;
...
@@ -49,12 +52,16 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -49,12 +52,16 @@ public class SinglePeopleTestActivity extends BaseActivity {
@BindView
(
R
.
id
.
recycle_view
)
@BindView
(
R
.
id
.
recycle_view
)
RecyclerView
mRecycleView
;
RecyclerView
mRecycleView
;
@BindView
(
R
.
id
.
progress
)
RelativeLayout
mProgress
;
@BindView
(
R
.
id
.
key_test
)
EditText
mKeyTest
;
private
List
<
StudentBean
>
mStudentBeans
;
private
List
<
StudentBean
>
mStudentBeans
;
private
SinglePeopleAdapter
mPeopleAdapter
;
private
SinglePeopleAdapter
mPeopleAdapter
;
private
SearchParamBean
mSearchParamBean
=
new
SearchParamBean
();
private
SearchParamBean
mSearchParamBean
=
new
SearchParamBean
();
private
SchoolBean
mSchoolBean
;
private
SchoolBean
mSchoolBean
;
private
PopuAdapter
mPopuAdapter
;
private
PopuAdapter
mPopuAdapter
;
private
List
<
PopuBean
>
mAreaList
=
new
ArrayList
<>();
@Override
@Override
protected
int
getLayoutId
()
{
protected
int
getLayoutId
()
{
return
R
.
layout
.
activity_singletest
;
return
R
.
layout
.
activity_singletest
;
...
@@ -66,16 +73,9 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -66,16 +73,9 @@ public class SinglePeopleTestActivity extends BaseActivity {
mSearchParamBean
.
setSchoolId
(
EyeConfig
.
TEST_SCHOOL_ID
);
mSearchParamBean
.
setSchoolId
(
EyeConfig
.
TEST_SCHOOL_ID
);
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mStudentBeans
=
new
ArrayList
<>();
mStudentBeans
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
StudentBean
mStudentBean
=
new
StudentBean
();
mStudentBean
.
setRealname
(
"范特西"
+
i
);
mStudentBean
.
setNumber
(
"20160101"
+
i
);
mStudentBean
.
setClasses
(
"动车组"
+
i
);
mStudentBean
.
setBirthday
(
"20110101"
+
i
);
mStudentBeans
.
add
(
mStudentBean
);
}
mPeopleAdapter
=
new
SinglePeopleAdapter
(
mStudentBeans
,
this
);
mPeopleAdapter
=
new
SinglePeopleAdapter
(
mStudentBeans
,
this
);
mRecycleView
.
setAdapter
(
mPeopleAdapter
);
mRecycleView
.
setAdapter
(
mPeopleAdapter
);
search
();
//
}
}
@OnClick
({
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
do_search
,
R
.
id
.
begin_test
})
@OnClick
({
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
do_search
,
R
.
id
.
begin_test
})
...
@@ -85,7 +85,9 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -85,7 +85,9 @@ public class SinglePeopleTestActivity extends BaseActivity {
finish
();
finish
();
break
;
break
;
case
R
.
id
.
selete_area_lay
:
case
R
.
id
.
selete_area_lay
:
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
if
(!
CheckUtil
.
isEmpty
(
mAreaList
))
{
showPopWindow
(
mAreaList
);
}
else
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
setAreaData
();
}
else
{
}
else
{
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
...
@@ -97,7 +99,7 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -97,7 +99,7 @@ public class SinglePeopleTestActivity extends BaseActivity {
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
setAreaData
();
}
else
{
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
}
...
@@ -111,6 +113,7 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -111,6 +113,7 @@ public class SinglePeopleTestActivity extends BaseActivity {
}
}
break
;
break
;
case
R
.
id
.
do_search
:
case
R
.
id
.
do_search
:
mSearchParamBean
.
setStudentId
(
mKeyTest
.
getText
().
toString
());
search
();
search
();
break
;
break
;
case
R
.
id
.
begin_test
:
case
R
.
id
.
begin_test
:
...
@@ -129,11 +132,16 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -129,11 +132,16 @@ public class SinglePeopleTestActivity extends BaseActivity {
List
<
GradeBean
>
gradeBeans
=
mSchoolBean
.
getGradeList
();
List
<
GradeBean
>
gradeBeans
=
mSchoolBean
.
getGradeList
();
if
(!
CheckUtil
.
isEmpty
(
gradeBeans
))
{
if
(!
CheckUtil
.
isEmpty
(
gradeBeans
))
{
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
PopuBean
all
=
new
PopuBean
();
all
.
setName
(
"全部学校"
);
all
.
setChick
(
true
);
popuBeans
.
add
(
all
);
for
(
GradeBean
gradeBean
:
gradeBeans
)
{
for
(
GradeBean
gradeBean
:
gradeBeans
)
{
PopuBean
popuBean
=
new
PopuBean
();
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
gradeBean
.
getName
());
popuBean
.
setName
(
gradeBean
.
getName
());
popuBeans
.
add
(
popuBean
);
popuBeans
.
add
(
popuBean
);
}
}
mAreaList
=
popuBeans
;
showPopWindow
(
popuBeans
);
showPopWindow
(
popuBeans
);
}
else
{
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
ToastUtil
.
showMessage
(
"暂无数据"
);
...
@@ -164,8 +172,17 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -164,8 +172,17 @@ public class SinglePeopleTestActivity extends BaseActivity {
for
(
PopuBean
popuBean
:
popuBeans
)
{
for
(
PopuBean
popuBean
:
popuBeans
)
{
popuBean
.
setChick
(
false
);
popuBean
.
setChick
(
false
);
}
}
popuBeans
.
get
(
position
).
setChick
(
true
);
PopuBean
popuBean
=
popuBeans
.
get
(
position
);
popuBean
.
setChick
(
true
);
mPopuAdapter
.
notifyDataSetChanged
();
mPopuAdapter
.
notifyDataSetChanged
();
if
(
popuBean
.
getName
().
equals
(
"全部学校"
))
{
mSearchParamBean
.
setGrade
(
""
);
}
else
{
mSearchParamBean
.
setGrade
(
popuBean
.
getName
());
}
mSearchParamBean
.
setStudentId
(
""
);
mSeleteAreaTv
.
setText
(
popuBean
.
getName
());
search
();
}
}
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -177,19 +194,33 @@ public class SinglePeopleTestActivity extends BaseActivity {
...
@@ -177,19 +194,33 @@ public class SinglePeopleTestActivity extends BaseActivity {
* 搜索
* 搜索
*/
*/
private
void
search
()
{
private
void
search
()
{
mProgress
.
setVisibility
(
View
.
VISIBLE
);
EyeDataManager
.
getInstance
().
getStudents
(
mSearchParamBean
.
getParams
())
EyeDataManager
.
getInstance
().
getStudents
(
mSearchParamBean
.
getParams
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
List
<
StudentBean
>>>()
{
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
List
<
StudentBean
>>>()
{
@Override
@Override
protected
void
onSuccess
(
OldResponseImpl
<
List
<
StudentBean
>>
listOldResponse
)
{
protected
void
onSuccess
(
OldResponseImpl
<
List
<
StudentBean
>>
listOldResponse
)
{
if
(
listOldResponse
!=
null
&&
listOldResponse
.
getData
()
!=
null
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
mPeopleAdapter
.
clear
();
mPeopleAdapter
.
appendToListAndNotify
(
listOldResponse
.
getData
());
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
@Override
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
ToastUtil
.
showMessage
(
errorMessage
);
}
}
});
});
}
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
}
app/src/main/java/com/oo/eye/activity/TestResurtListActivity.java
View file @
ea32ec66
...
@@ -15,10 +15,21 @@ import android.widget.RelativeLayout;
...
@@ -15,10 +15,21 @@ import android.widget.RelativeLayout;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.app.baselibrary.base.common.BaseActivity
;
import
com.app.baselibrary.base.common.BaseActivity
;
import
com.app.baselibrary.commonUtil.CheckUtil
;
import
com.app.baselibrary.commonUtil.ToastUtil
;
import
com.oo.eye.EyeConfig
;
import
com.oo.eye.R
;
import
com.oo.eye.R
;
import
com.oo.eye.adapter.PopuAdapter
;
import
com.oo.eye.adapter.PopuAdapter
;
import
com.oo.eye.adapter.TestResultListAdapter
;
import
com.oo.eye.adapter.TestResultListAdapter
;
import
com.oo.eye.bean.ClassBean
;
import
com.oo.eye.bean.GradeBean
;
import
com.oo.eye.bean.PopuBean
;
import
com.oo.eye.bean.SchoolBean
;
import
com.oo.eye.bean.SearchParamBean
;
import
com.oo.eye.bean.StudentBean
;
import
com.oo.eye.bean.StudentBean
;
import
com.oo.eye.net.EyeDataManager
;
import
com.oo.seex.netlibrary.net.response.OldResponseImpl
;
import
com.oo.seex.netlibrary.net.response.RxCallback
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,6 +37,7 @@ import java.util.List;
...
@@ -26,6 +37,7 @@ import java.util.List;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
rx.android.schedulers.AndroidSchedulers
;
/**
/**
* Date : 2018/8/28.
* Date : 2018/8/28.
...
@@ -49,8 +61,8 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -49,8 +61,8 @@ public class TestResurtListActivity extends BaseActivity {
ImageView
mSeleteIv
;
ImageView
mSeleteIv
;
@BindView
(
R
.
id
.
selete_lay
)
@BindView
(
R
.
id
.
selete_lay
)
LinearLayout
mSeleteLay
;
LinearLayout
mSeleteLay
;
@BindView
(
R
.
id
.
selete1_tv
)
//
@BindView(R.id.selete1_tv)
TextView
mSelete1Tv
;
//
TextView mSelete1Tv;
@BindView
(
R
.
id
.
selete1_iv
)
@BindView
(
R
.
id
.
selete1_iv
)
ImageView
mSelete1Iv
;
ImageView
mSelete1Iv
;
@BindView
(
R
.
id
.
selete1_lay
)
@BindView
(
R
.
id
.
selete1_lay
)
...
@@ -71,7 +83,17 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -71,7 +83,17 @@ public class TestResurtListActivity extends BaseActivity {
TextView
mTitle2
;
TextView
mTitle2
;
@BindView
(
R
.
id
.
textView
)
@BindView
(
R
.
id
.
textView
)
TextView
mTextView
;
TextView
mTextView
;
@BindView
(
R
.
id
.
progress
)
RelativeLayout
mProgress
;
private
List
<
ClassBean
>
mClassBeans
;
//选择学校的所有小组
private
boolean
isAll
=
true
;
//是否是全部学校
private
List
<
PopuBean
>
mAreaList
=
new
ArrayList
<>();
private
List
<
PopuBean
>
mClassList
=
new
ArrayList
<>();
private
SearchParamBean
mSearchParamBean
=
new
SearchParamBean
();
private
TestResultListAdapter
mResultListAdapter
;
private
PopuAdapter
mPopuAdapter
;
private
int
popuPosition
;
//1学校,2小组
private
SchoolBean
mSchoolBean
;
@Override
@Override
protected
int
getLayoutId
()
{
protected
int
getLayoutId
()
{
return
R
.
layout
.
activity_testresult
;
return
R
.
layout
.
activity_testresult
;
...
@@ -83,16 +105,15 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -83,16 +105,15 @@ public class TestResurtListActivity extends BaseActivity {
mTitle2
.
setSelected
(
false
);
mTitle2
.
setSelected
(
false
);
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
mRecycleView
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
List
<
StudentBean
>
list
=
new
ArrayList
<>();
List
<
StudentBean
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
mResultListAdapter
=
new
TestResultListAdapter
(
list
,
this
);
StudentBean
chartsBean
=
new
StudentBean
();
mRecycleView
.
setAdapter
(
mResultListAdapter
);
list
.
add
(
chartsBean
);
mSearchParamBean
.
setSchoolId
(
EyeConfig
.
TEST_SCHOOL_ID
);
}
search
();
mRecycleView
.
setAdapter
(
new
TestResultListAdapter
(
list
,
this
));
}
}
private
boolean
isA
;
private
boolean
isA
;
@OnClick
({
R
.
id
.
title_1
,
R
.
id
.
title_2
,
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
selete_lay
,
R
.
id
.
selete1_lay
,
R
.
id
.
selete2_lay
,
R
.
id
.
do_search
})
@OnClick
({
R
.
id
.
title_1
,
R
.
id
.
title_2
,
R
.
id
.
back_iv
,
R
.
id
.
selete_area_lay
,
R
.
id
.
selete_lay
,
R
.
id
.
selete1_lay
,
R
.
id
.
selete2_lay
,
R
.
id
.
do_search
})
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
title_1
:
case
R
.
id
.
title_1
:
...
@@ -107,39 +128,136 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -107,39 +128,136 @@ public class TestResurtListActivity extends BaseActivity {
finish
();
finish
();
break
;
break
;
case
R
.
id
.
selete_area_lay
:
case
R
.
id
.
selete_area_lay
:
showPopWindow
(
1
);
popuPosition
=
1
;
if
(!
CheckUtil
.
isEmpty
(
mAreaList
))
{
showPopWindow
(
mAreaList
);
}
else
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
}
else
{
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
SchoolBean
>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
SchoolBean
>
schoolBeanOldResponse
)
{
if
(
schoolBeanOldResponse
.
getResultData
()
!=
null
)
{
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setAreaData
();
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
ToastUtil
.
showLongMessage
(
errorMessage
);
}
});
}
break
;
break
;
case
R
.
id
.
selete_lay
:
case
R
.
id
.
selete_lay
:
showPopWindow
(
2
);
popuPosition
=
2
;
if
(!
CheckUtil
.
isEmpty
(
mClassList
))
{
showPopWindow
(
mClassList
);
}
else
if
(!
CheckUtil
.
isNull
(
mClassBeans
))
{
setClassData
();
}
else
{
EyeDataManager
.
getInstance
().
getSchoolInfo
(
EyeConfig
.
TEST_SCHOOL_ID
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
SchoolBean
>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
SchoolBean
>
schoolBeanOldResponse
)
{
if
(
schoolBeanOldResponse
.
getResultData
()
!=
null
)
{
mSchoolBean
=
schoolBeanOldResponse
.
getResultData
();
if
(!
CheckUtil
.
isNull
(
mSchoolBean
))
{
setClassData
();
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
ToastUtil
.
showLongMessage
(
errorMessage
);
}
});
}
break
;
break
;
case
R
.
id
.
selete1_lay
:
case
R
.
id
.
selete1_lay
:
//双眼1.0以上
showPopWindow
(
3
);
//
showPopWindow(3);
break
;
break
;
case
R
.
id
.
selete2_lay
:
//仅看A类
case
R
.
id
.
selete2_lay
:
//仅看A类
isA
=
!
isA
;
isA
=
!
isA
;
if
(
isA
)
{
if
(
isA
)
{
mSelete2Iv
.
setImageResource
(
R
.
drawable
.
select3_sel
);
mSelete2Iv
.
setImageResource
(
R
.
drawable
.
select3_sel
);
mSearchParamBean
.
setVisionStatus
(
"typeA"
);
}
else
{
}
else
{
mSelete2Iv
.
setImageResource
(
R
.
drawable
.
select3_nor
);
mSelete2Iv
.
setImageResource
(
R
.
drawable
.
select3_nor
);
mSearchParamBean
.
setVisionStatus
(
""
);
}
}
search
();
break
;
break
;
case
R
.
id
.
do_search
:
case
R
.
id
.
do_search
:
mSearchParamBean
.
setStudentId
(
mKeyTest
.
getText
().
toString
());
search
();
break
;
break
;
}
}
}
}
private
void
setAreaData
()
{
List
<
GradeBean
>
gradeBeans
=
mSchoolBean
.
getGradeList
();
if
(!
CheckUtil
.
isEmpty
(
gradeBeans
))
{
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
PopuBean
all
=
new
PopuBean
();
all
.
setName
(
"全部学校"
);
all
.
setChick
(
true
);
popuBeans
.
add
(
all
);
for
(
GradeBean
gradeBean
:
gradeBeans
)
{
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
gradeBean
.
getName
());
popuBean
.
setClassBeans
(
gradeBean
.
getClassList
());
popuBeans
.
add
(
popuBean
);
}
mAreaList
=
popuBeans
;
showPopWindow
(
popuBeans
);
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
private
void
showPopWindow
(
int
position
)
{
private
void
setClassData
()
{
if
(!
CheckUtil
.
isEmpty
(
mClassBeans
))
{
List
<
PopuBean
>
popuBeans
=
new
ArrayList
<>();
PopuBean
all
=
new
PopuBean
();
all
.
setName
(
"全部小组"
);
all
.
setClassId
(
""
);
all
.
setChick
(
true
);
popuBeans
.
add
(
all
);
for
(
ClassBean
gradeBean
:
mClassBeans
)
{
PopuBean
popuBean
=
new
PopuBean
();
popuBean
.
setName
(
gradeBean
.
getClasses
());
popuBean
.
setClassId
(
gradeBean
.
getId
());
popuBeans
.
add
(
popuBean
);
}
mClassList
=
popuBeans
;
showPopWindow
(
popuBeans
);
}
else
{
if
(!
isAll
)
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
}
private
void
showPopWindow
(
List
<
PopuBean
>
popuBeans
)
{
LinearLayout
view
=
mSeleteLay
;
LinearLayout
view
=
mSeleteLay
;
switch
(
position
)
{
switch
(
po
puPo
sition
)
{
case
1
:
case
1
:
view
=
mSeleteAreaLay
;
view
=
mSeleteAreaLay
;
break
;
break
;
case
2
:
case
2
:
view
=
mSeleteLay
;
view
=
mSeleteLay
;
break
;
break
;
case
3
:
view
=
mSelete1Lay
;
break
;
}
}
try
{
try
{
View
conview
=
View
.
inflate
(
this
,
R
.
layout
.
popu_list
,
null
);
View
conview
=
View
.
inflate
(
this
,
R
.
layout
.
popu_list
,
null
);
...
@@ -150,7 +268,8 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -150,7 +268,8 @@ public class TestResurtListActivity extends BaseActivity {
ColorDrawable
cd
=
new
ColorDrawable
(
0x00ffffff
);
// 背景颜色全透明
ColorDrawable
cd
=
new
ColorDrawable
(
0x00ffffff
);
// 背景颜色全透明
popupWindow
.
setBackgroundDrawable
(
cd
);
popupWindow
.
setBackgroundDrawable
(
cd
);
ListView
listView
=
(
ListView
)
conview
.
findViewById
(
R
.
id
.
list_view
);
ListView
listView
=
(
ListView
)
conview
.
findViewById
(
R
.
id
.
list_view
);
listView
.
setAdapter
(
new
PopuAdapter
(
this
,
null
));
mPopuAdapter
=
new
PopuAdapter
(
this
,
popuBeans
);
listView
.
setAdapter
(
mPopuAdapter
);
int
[]
location
=
new
int
[
2
];
int
[]
location
=
new
int
[
2
];
view
.
getLocationOnScreen
(
location
);
view
.
getLocationOnScreen
(
location
);
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
...
@@ -160,7 +279,7 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -160,7 +279,7 @@ public class TestResurtListActivity extends BaseActivity {
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
listView
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
itemClick
(
position
);
}
}
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -169,6 +288,36 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -169,6 +288,36 @@ public class TestResurtListActivity extends BaseActivity {
}
}
private
void
itemClick
(
int
position
)
{
List
<
PopuBean
>
popuBeans
=
mPopuAdapter
.
getBeanList
();
for
(
PopuBean
popuBean
:
popuBeans
)
{
popuBean
.
setChick
(
false
);
}
PopuBean
popuBean
=
popuBeans
.
get
(
position
);
popuBean
.
setChick
(
true
);
mPopuAdapter
.
notifyDataSetChanged
();
switch
(
popuPosition
)
{
case
1
:
//学校
isAll
=
position
==
0
?
true
:
false
;
mClassBeans
=
popuBean
.
getClassBeans
();
mSeleteAreaTv
.
setText
(
popuBean
.
getName
());
if
(
popuBean
.
getName
().
equals
(
"全部学校"
))
{
mSearchParamBean
.
setGrade
(
""
);
}
else
{
mSearchParamBean
.
setGrade
(
popuBean
.
getName
());
}
mSearchParamBean
.
setClassId
(
""
);
mSeleteTv
.
setText
(
"全部小组"
);
break
;
case
2
:
//小组
mSearchParamBean
.
setClassId
(
popuBean
.
getClassId
());
mSeleteTv
.
setText
(
popuBean
.
getName
());
break
;
}
mSearchParamBean
.
setStudentId
(
""
);
search
();
}
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -176,4 +325,30 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -176,4 +325,30 @@ public class TestResurtListActivity extends BaseActivity {
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
}
}
/**
* 搜索
*/
private
void
search
()
{
mProgress
.
setVisibility
(
View
.
VISIBLE
);
EyeDataManager
.
getInstance
().
getStudents
(
mSearchParamBean
.
getParams
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
RxCallback
<
OldResponseImpl
<
List
<
StudentBean
>>>()
{
@Override
protected
void
onSuccess
(
OldResponseImpl
<
List
<
StudentBean
>>
listOldResponse
)
{
if
(
listOldResponse
!=
null
&&
listOldResponse
.
getData
()
!=
null
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
mResultListAdapter
.
clear
();
mResultListAdapter
.
appendToListAndNotify
(
listOldResponse
.
getData
());
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
}
}
@Override
protected
void
onError
(
int
errorCode
,
String
errorMessage
)
{
mProgress
.
setVisibility
(
View
.
GONE
);
ToastUtil
.
showMessage
(
errorMessage
);
}
});
}
}
}
app/src/main/java/com/oo/eye/adapter/PopuAdapter.java
View file @
ea32ec66
...
@@ -62,4 +62,7 @@ public class PopuAdapter extends BaseAdapter {
...
@@ -62,4 +62,7 @@ public class PopuAdapter extends BaseAdapter {
textView
.
setText
(
bean
.
getName
());
textView
.
setText
(
bean
.
getName
());
return
view
;
return
view
;
}
}
public
List
<
PopuBean
>
getBeanList
(){
return
mBeanList
;
}
}
}
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
View file @
ea32ec66
...
@@ -27,7 +27,7 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
...
@@ -27,7 +27,7 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
public
SinglePeopleAdapter
(
List
<
StudentBean
>
list
,
Context
context
)
{
public
SinglePeopleAdapter
(
List
<
StudentBean
>
list
,
Context
context
)
{
super
(
list
,
context
);
super
(
list
,
context
);
if
(!
CheckUtil
.
isEmpty
(
mList
))
{
if
(!
CheckUtil
.
isEmpty
(
mList
))
{
lastSelectBean
=
mList
.
get
(
0
);
lastSelectBean
=
mList
.
get
(
0
);
lastSelectBean
.
setChick
(
true
);
lastSelectBean
.
setChick
(
true
);
}
}
...
@@ -59,25 +59,25 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
...
@@ -59,25 +59,25 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
StudentBean
bean
=
null
;
StudentBean
bean
=
null
;
for
(
int
i
=
0
;
i
<
mList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
mList
.
size
();
i
++)
{
if
(
position
==
i
)
{
if
(
position
==
i
)
{
bean
=
mList
.
get
(
i
);
bean
=
mList
.
get
(
i
);
bean
.
setChick
(
true
);
bean
.
setChick
(
true
);
}
}
}
if
(!
bean
.
getNumber
().
equals
(
lastSelectBean
.
getNumber
()))
{
lastSelectBean
.
setChick
(
false
);
lastSelectBean
=
bean
;
}
notifyDataSetChanged
();
}
}
});
if
(!
bean
.
getNumber
().
equals
(
lastSelectBean
.
getNumber
()))
{
}
lastSelectBean
.
setChick
(
false
);
lastSelectBean
=
bean
;
}
notifyDataSetChanged
();
}
});
}
@Override
@Override
public
int
getItemCount
()
{
public
int
getItemCount
()
{
return
10
;
return
mList
!=
null
?
mList
.
size
()
:
0
;
}
}
}
}
app/src/main/java/com/oo/eye/bean/PopuBean.java
View file @
ea32ec66
...
@@ -2,6 +2,8 @@ package com.oo.eye.bean;
...
@@ -2,6 +2,8 @@ package com.oo.eye.bean;
import
com.app.baselibrary.bean.BaseBean
;
import
com.app.baselibrary.bean.BaseBean
;
import
java.util.List
;
/**
/**
* Date : 2018/9/4.
* Date : 2018/9/4.
* Author: cxh
* Author: cxh
...
@@ -11,6 +13,26 @@ public class PopuBean extends BaseBean {
...
@@ -11,6 +13,26 @@ public class PopuBean extends BaseBean {
private
String
name
;
private
String
name
;
private
boolean
isChick
;
private
boolean
isChick
;
public
String
getClassId
()
{
return
classId
;
}
public
void
setClassId
(
String
classId
)
{
this
.
classId
=
classId
;
}
private
String
classId
;
public
List
<
ClassBean
>
getClassBeans
()
{
return
mClassBeans
;
}
public
void
setClassBeans
(
List
<
ClassBean
>
classBeans
)
{
mClassBeans
=
classBeans
;
}
private
List
<
ClassBean
>
mClassBeans
;
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
...
app/src/main/java/com/oo/eye/net/EyeApiService.java
View file @
ea32ec66
...
@@ -34,6 +34,6 @@ public interface EyeApiService {
...
@@ -34,6 +34,6 @@ public interface EyeApiService {
/**
/**
* 获取学生信息
* 获取学生信息
*/
*/
@GET
(
NetConfig
.
GET_SCHOOL
)
@GET
(
NetConfig
.
CLASS_STUDENT
)
Observable
<
OldResponseImpl
<
List
<
StudentBean
>>>
getStudents
(
@QueryMap
Map
<
String
,
String
>
params
);
Observable
<
OldResponseImpl
<
List
<
StudentBean
>>>
getStudents
(
@QueryMap
Map
<
String
,
String
>
params
);
}
}
app/src/main/res/layout/activity_morepeople.xml
View file @
ea32ec66
...
@@ -24,10 +24,12 @@
...
@@ -24,10 +24,12 @@
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_marginTop=
"@dimen/dp_
6
0"
android:layout_marginTop=
"@dimen/dp_
4
0"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:id=
"@+id/selete_area_lay"
android:id=
"@+id/selete_area_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -49,7 +51,9 @@
...
@@ -49,7 +51,9 @@
android:src=
"@drawable/more"
/>
android:src=
"@drawable/more"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_marginLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:id=
"@+id/selete_lay"
android:id=
"@+id/selete_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -59,7 +63,7 @@
...
@@ -59,7 +63,7 @@
android:id=
"@+id/selete_tv"
android:id=
"@+id/selete_tv"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
未测试
"
android:text=
"
全部
"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_18"
/>
android:textSize=
"@dimen/sp_18"
/>
<ImageView
<ImageView
...
@@ -72,7 +76,9 @@
...
@@ -72,7 +76,9 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/selete1_lay"
android:id=
"@+id/selete1_lay"
android:layout_marginLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -93,12 +99,16 @@
...
@@ -93,12 +99,16 @@
</LinearLayout>
</LinearLayout>
<ImageView
<ImageView
android:layout_marginLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/search"
/>
android:src=
"@drawable/search"
/>
<LinearLayout
<LinearLayout
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -121,10 +131,13 @@
...
@@ -121,10 +131,13 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:paddingBottom=
"@dimen/dp_6"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:paddingRight=
"@dimen/dp_20"
android:id=
"@+id/do_search"
android:id=
"@+id/do_search"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_20"
android:text=
"查询"
android:text=
"查询"
android:textColor=
"@color/indicator_color"
android:textColor=
"@color/indicator_color"
android:textSize=
"@dimen/sp_18"
/>
android:textSize=
"@dimen/sp_18"
/>
...
@@ -133,7 +146,7 @@
...
@@ -133,7 +146,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/dp_9
5
"
android:layout_marginTop=
"@dimen/dp_9
0
"
android:background=
"@color/white"
></LinearLayout>
android:background=
"@color/white"
></LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -278,5 +291,16 @@
...
@@ -278,5 +291,16 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@+id/begin_test"
android:layout_above=
"@+id/begin_test"
android:layout_below=
"@+id/ddd"
></android.support.v7.widget.RecyclerView>
android:layout_below=
"@+id/ddd"
></android.support.v7.widget.RecyclerView>
<RelativeLayout
android:id=
"@+id/progress"
android:layout_below=
"@+id/ddd"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#60000000"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_singletest.xml
View file @
ea32ec66
...
@@ -3,12 +3,14 @@
...
@@ -3,12 +3,14 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/e_test_color"
>
android:background=
"@color/e_test_color"
>
<ImageView
<ImageView
android:id=
"@+id/back_iv"
android:id=
"@+id/back_iv"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"@dimen/dp_12"
android:layout_margin=
"@dimen/dp_12"
android:src=
"@drawable/back"
/>
android:src=
"@drawable/back"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -24,11 +26,14 @@
...
@@ -24,11 +26,14 @@
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_marginTop=
"@dimen/dp_
6
0"
android:layout_marginTop=
"@dimen/dp_
4
0"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/selete_area_lay"
android:id=
"@+id/selete_area_lay"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -50,26 +55,33 @@
...
@@ -50,26 +55,33 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_marginLeft=
"@dimen/dp_20"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:layout_marginLeft=
"@dimen/dp_20"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<ImageView
<ImageView
android:paddingBottom=
"@dimen/dp_6"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/search"
/>
android:src=
"@drawable/search"
/>
<LinearLayout
<LinearLayout
android:paddingBottom=
"@dimen/dp_6"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<EditText
<EditText
android:inputType=
"number"
android:digits=
"@string/filter_vcode"
android:id=
"@+id/key_test"
android:id=
"@+id/key_test"
android:layout_width=
"140dip"
android:layout_width=
"140dip"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:layout_marginLeft=
"@dimen/dp_6"
android:layout_marginLeft=
"@dimen/dp_6"
android:background=
"@null"
android:background=
"@null"
android:hint=
"输入学员编号后4位"
android:hint=
"输入学员编号后4位"
...
@@ -87,7 +99,9 @@
...
@@ -87,7 +99,9 @@
android:id=
"@+id/do_search"
android:id=
"@+id/do_search"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:paddingRight=
"@dimen/dp_20"
android:text=
"查询"
android:text=
"查询"
android:textColor=
"@color/indicator_color"
android:textColor=
"@color/indicator_color"
android:textSize=
"@dimen/sp_18"
/>
android:textSize=
"@dimen/sp_18"
/>
...
@@ -97,7 +111,7 @@
...
@@ -97,7 +111,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/dp_9
5
"
android:layout_marginTop=
"@dimen/dp_9
0
"
android:background=
"@color/white"
></LinearLayout>
android:background=
"@color/white"
></LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -108,6 +122,7 @@
...
@@ -108,6 +122,7 @@
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingTop=
"@dimen/dp_12"
>
android:paddingTop=
"@dimen/dp_12"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"@dimen/item_dimen_2"
android:layout_width=
"@dimen/item_dimen_2"
android:layout_height=
"@dimen/dp_40"
android:layout_height=
"@dimen/dp_40"
...
@@ -118,21 +133,24 @@
...
@@ -118,21 +133,24 @@
android:layout_width=
"1px"
android:layout_width=
"1px"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/line_color"
></View>
android:background=
"@color/line_color"
></View>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"选择"
android:layout_centerInParent=
"true"
android:layout_centerInParent=
"true"
android:text=
"选择"
android:textColor=
"@color/text_color"
android:textColor=
"@color/text_color"
android:textSize=
"@dimen/sp_18"
android:textSize=
"@dimen/sp_18"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<View
<View
android:layout_alignParentRight=
"true"
android:layout_width=
"1px"
android:layout_width=
"1px"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:background=
"@color/line_color"
></View>
android:background=
"@color/line_color"
></View>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
android:layout_width=
"@dimen/item_dimen_5"
android:layout_width=
"@dimen/item_dimen_5"
android:layout_height=
"@dimen/dp_40"
android:layout_height=
"@dimen/dp_40"
...
@@ -221,6 +239,7 @@
...
@@ -221,6 +239,7 @@
android:background=
"@color/line_color"
></View>
android:background=
"@color/line_color"
></View>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/begin_test"
android:id=
"@+id/begin_test"
android:layout_width=
"110dip"
android:layout_width=
"110dip"
...
@@ -234,6 +253,7 @@
...
@@ -234,6 +253,7 @@
android:text=
"开始测试"
android:text=
"开始测试"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
android:textSize=
"@dimen/sp_16"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recycle_view"
android:id=
"@+id/recycle_view"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -241,4 +261,16 @@
...
@@ -241,4 +261,16 @@
android:layout_above=
"@+id/begin_test"
android:layout_above=
"@+id/begin_test"
android:layout_below=
"@+id/ddd"
></android.support.v7.widget.RecyclerView>
android:layout_below=
"@+id/ddd"
></android.support.v7.widget.RecyclerView>
<RelativeLayout
android:id=
"@+id/progress"
android:layout_below=
"@+id/ddd"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#60000000"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_testresult.xml
View file @
ea32ec66
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
android:id=
"@+id/title_1"
android:id=
"@+id/title_1"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/dp_20"
android:paddingRight=
"@dimen/dp_20"
android:text=
"结果报表"
android:text=
"结果报表"
android:textColor=
"@color/indicator_light_color"
android:textColor=
"@color/indicator_light_color"
android:textSize=
"24sp"
android:textSize=
"24sp"
...
@@ -31,12 +33,14 @@
...
@@ -31,12 +33,14 @@
android:layout_width=
"1px"
android:layout_width=
"1px"
android:layout_height=
"@dimen/dp_20"
android:layout_height=
"@dimen/dp_20"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"@dimen/dp_
3
0"
android:layout_marginLeft=
"@dimen/dp_
1
0"
android:layout_marginRight=
"@dimen/dp_
3
0"
android:layout_marginRight=
"@dimen/dp_
1
0"
android:background=
"@color/white"
/>
android:background=
"@color/white"
/>
<TextView
<TextView
android:id=
"@+id/title_2"
android:id=
"@+id/title_2"
android:paddingLeft=
"@dimen/dp_20"
android:paddingRight=
"@dimen/dp_20"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"临时报表"
android:text=
"临时报表"
...
@@ -63,13 +67,16 @@
...
@@ -63,13 +67,16 @@
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_marginTop=
"@dimen/dp_
6
0"
android:layout_marginTop=
"@dimen/dp_
4
0"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/selete_area_lay"
android:id=
"@+id/selete_area_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:paddingTop=
"@dimen/dp_20"
android:paddingLeft=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -90,10 +97,12 @@
...
@@ -90,10 +97,12 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:id=
"@+id/selete_lay"
android:id=
"@+id/selete_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_margin
Left=
"@dimen/dp_20"
android:
padding
Left=
"@dimen/dp_20"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
...
@@ -113,11 +122,13 @@
...
@@ -113,11 +122,13 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:visibility=
"gone"
android:visibility=
"gone"
android:id=
"@+id/selete1_lay"
android:id=
"@+id/selete1_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_margin
Left=
"@dimen/dp_20"
android:
padding
Left=
"@dimen/dp_20"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
...
@@ -137,10 +148,12 @@
...
@@ -137,10 +148,12 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:id=
"@+id/selete2_lay"
android:id=
"@+id/selete2_lay"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_margin
Left=
"@dimen/dp_20"
android:
padding
Left=
"@dimen/dp_20"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<ImageView
<ImageView
...
@@ -148,7 +161,7 @@
...
@@ -148,7 +161,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_gravity=
"center_vertical"
android:src=
"@drawable/select3_
sel
"
/>
android:src=
"@drawable/select3_
nor
"
/>
<TextView
<TextView
android:id=
"@+id/selete2_tv"
android:id=
"@+id/selete2_tv"
...
@@ -162,12 +175,16 @@
...
@@ -162,12 +175,16 @@
</LinearLayout>
</LinearLayout>
<ImageView
<ImageView
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_20"
android:layout_marginLeft=
"@dimen/dp_20"
android:src=
"@drawable/search"
/>
android:src=
"@drawable/search"
/>
<LinearLayout
<LinearLayout
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -190,10 +207,12 @@
...
@@ -190,10 +207,12 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:paddingTop=
"@dimen/dp_20"
android:paddingBottom=
"@dimen/dp_6"
android:id=
"@+id/do_search"
android:id=
"@+id/do_search"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:
layout_margin
Left=
"@dimen/dp_20"
android:
padding
Left=
"@dimen/dp_20"
android:text=
"查询"
android:text=
"查询"
android:textColor=
"@color/indicator_color"
android:textColor=
"@color/indicator_color"
android:textSize=
"@dimen/sp_18"
/>
android:textSize=
"@dimen/sp_18"
/>
...
@@ -202,7 +221,7 @@
...
@@ -202,7 +221,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"@dimen/dp_9
5
"
android:layout_marginTop=
"@dimen/dp_9
0
"
android:background=
"@color/white"
></LinearLayout>
android:background=
"@color/white"
></LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -358,5 +377,16 @@
...
@@ -358,5 +377,16 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/ddd"
android:layout_below=
"@+id/ddd"
android:layout_marginBottom=
"@dimen/dp_20"
></android.support.v7.widget.RecyclerView>
android:layout_marginBottom=
"@dimen/dp_20"
></android.support.v7.widget.RecyclerView>
<RelativeLayout
android:id=
"@+id/progress"
android:layout_below=
"@+id/ddd"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#60000000"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
ea32ec66
...
@@ -38,4 +38,5 @@
...
@@ -38,4 +38,5 @@
<string
name=
"histroy_soure_input"
>
用户录入
</string>
<string
name=
"histroy_soure_input"
>
用户录入
</string>
<string
name=
"histroy_soure_calculate"
>
自动计算
</string>
<string
name=
"histroy_soure_calculate"
>
自动计算
</string>
<string
name=
"start"
>
开始
</string>
<string
name=
"start"
>
开始
</string>
<string
name=
"filter_vcode"
>
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
</string>
</resources>
</resources>
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