Commit a4c9fc46 by 徐丛奇

Merge branch 'master' of git.iouou.cn:xucongqi/haihang

parents 95b3ad0b a4f1a9d2
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
......@@ -43,7 +40,7 @@
</profile-state>
</entry>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8 (6)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -4,8 +4,7 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/library/baselibrary/baselibrary.iml" filepath="$PROJECT_DIR$/library/baselibrary/baselibrary.iml" />
<module fileurl="file://$PROJECT_DIR$/eye_haihang.iml" filepath="$PROJECT_DIR$/eye_haihang.iml" />
<module fileurl="file://G:/workspace_ooyby/haihang/eye_haihang.iml" filepath="G:/workspace_ooyby/haihang/eye_haihang.iml" />
<module fileurl="file://G:\workspace_ooyby\haihang\eye_haihang.iml" filepath="G:\workspace_ooyby\haihang\eye_haihang.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/haihang.iml" filepath="$PROJECT_DIR$/.idea/haihang.iml" />
<module fileurl="file://$PROJECT_DIR$/library/library.iml" filepath="$PROJECT_DIR$/library/library.iml" />
<module fileurl="file://$PROJECT_DIR$/library/netlibrary/netlibrary.iml" filepath="$PROJECT_DIR$/library/netlibrary/netlibrary.iml" />
......
......@@ -5,8 +5,8 @@ import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.Gravity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
......@@ -19,6 +19,7 @@ import com.oo.eye.R;
import com.oo.eye.adapter.MorePeopleAdapter;
import com.oo.eye.adapter.PopuAdapter;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.ArrayList;
import java.util.List;
......@@ -53,6 +54,14 @@ public class MorePeopleTestActivity extends BaseActivity {
TextView mBeginTest;
@BindView(R.id.recycle_view)
RecyclerView mRecycleView;
@BindView(R.id.selete_area_tv)
TextView mSeleteAreaTv;
@BindView(R.id.selete_area_iv)
ImageView mSeleteAreaIv;
@BindView(R.id.selete_area_lay)
LinearLayout mSeleteAreaLay;
@BindView(R.id.key_test)
EditText mKeyTest;
@Override
protected int getLayoutId() {
......@@ -62,9 +71,9 @@ public class MorePeopleTestActivity extends BaseActivity {
@Override
protected void init() {
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
List<ChartsBean> list = new ArrayList<>();
List<StudentBean> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
ChartsBean chartsBean = new ChartsBean();
StudentBean chartsBean = new StudentBean();
list.add(chartsBean);
}
mRecycleView.setAdapter(new MorePeopleAdapter(list, this));
......@@ -77,13 +86,17 @@ public class MorePeopleTestActivity extends BaseActivity {
ButterKnife.bind(this);
}
@OnClick({R.id.selete_lay, R.id.selete1_lay, R.id.do_search, R.id.begin_test})
@OnClick({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) {
switch (view.getId()) {
case R.id.selete_area_lay:
showPopWindow(1);
break;
case R.id.selete_lay:
showPopWindow();
showPopWindow(2);
break;
case R.id.selete1_lay:
showPopWindow(3);
break;
case R.id.do_search:
break;
......@@ -94,7 +107,19 @@ public class MorePeopleTestActivity extends BaseActivity {
}
}
private void showPopWindow() {
private void showPopWindow(int position) {
LinearLayout view = mSeleteLay;
switch (position) {
case 1:
view = mSeleteAreaLay;
break;
case 2:
view = mSeleteLay;
break;
case 3:
view = mSelete1Lay;
break;
}
try {
View conview = View.inflate(this, R.layout.popu_list, null);
PopupWindow popupWindow = new PopupWindow(conview, RelativeLayout.LayoutParams.WRAP_CONTENT,
......@@ -106,15 +131,16 @@ public class MorePeopleTestActivity extends BaseActivity {
ListView listView = (ListView) conview.findViewById(R.id.list_view);
listView.setAdapter(new PopuAdapter(this));
int[] location = new int[2];
mSeleteLay.getLocationOnScreen(location);
view.getLocationOnScreen(location);
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
conview.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int xoff=-(conview.getMeasuredWidth()/2-mSeleteLay.getWidth()/2);
popupWindow.showAsDropDown(mSeleteLay,xoff,0);
int xoff = -(conview.getMeasuredWidth() / 2 - view.getWidth() / 2);
popupWindow.showAsDropDown(view, xoff, 0);
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -12,6 +12,7 @@ import com.oo.eye.R;
import com.oo.eye.adapter.MorePeopleAdapter;
import com.oo.eye.adapter.TestListAdapter;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.ArrayList;
import java.util.List;
......@@ -41,9 +42,9 @@ public class TestListActivity extends BaseActivity {
@Override
protected void init() {
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
List<ChartsBean> list = new ArrayList<>();
List<StudentBean> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
ChartsBean chartsBean = new ChartsBean();
StudentBean chartsBean = new StudentBean();
list.add(chartsBean);
}
mRecycleView.setAdapter(new TestListAdapter(list, this));
......
package com.oo.eye.activity;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.app.baselibrary.base.common.BaseActivity;
import com.oo.eye.R;
import com.oo.eye.adapter.TestListAdapter;
import com.oo.eye.adapter.PopuAdapter;
import com.oo.eye.adapter.TestResultListAdapter;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.ArrayList;
import java.util.List;
......@@ -31,6 +39,34 @@ public class TestResurtListActivity extends BaseActivity {
TextView mBeginTest;
@BindView(R.id.recycle_view)
RecyclerView mRecycleView;
@BindView(R.id.selete_area_tv)
TextView mSeleteAreaTv;
@BindView(R.id.selete_area_iv)
ImageView mSeleteAreaIv;
@BindView(R.id.selete_area_lay)
LinearLayout mSeleteAreaLay;
@BindView(R.id.selete_tv)
TextView mSeleteTv;
@BindView(R.id.selete_iv)
ImageView mSeleteIv;
@BindView(R.id.selete_lay)
LinearLayout mSeleteLay;
@BindView(R.id.selete1_tv)
TextView mSelete1Tv;
@BindView(R.id.selete1_iv)
ImageView mSelete1Iv;
@BindView(R.id.selete1_lay)
LinearLayout mSelete1Lay;
@BindView(R.id.selete2_iv)
ImageView mSelete2Iv;
@BindView(R.id.selete2_tv)
TextView mSelete2Tv;
@BindView(R.id.selete2_lay)
LinearLayout mSelete2Lay;
@BindView(R.id.key_test)
EditText mKeyTest;
@BindView(R.id.do_search)
TextView mDoSearch;
@Override
protected int getLayoutId() {
......@@ -40,9 +76,9 @@ public class TestResurtListActivity extends BaseActivity {
@Override
protected void init() {
mRecycleView.setLayoutManager(new LinearLayoutManager(this));
List<ChartsBean> list = new ArrayList<>();
List<StudentBean> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
ChartsBean chartsBean = new ChartsBean();
StudentBean chartsBean = new StudentBean();
list.add(chartsBean);
}
mRecycleView.setAdapter(new TestResultListAdapter(list, this));
......@@ -55,7 +91,68 @@ public class TestResurtListActivity extends BaseActivity {
ButterKnife.bind(this);
}
@OnClick(R.id.begin_test)
public void onClick() {
private boolean isA;
@OnClick({R.id.selete_area_lay, R.id.selete_lay, R.id.selete1_lay, R.id.selete2_lay, R.id.do_search, R.id.begin_test})
public void onClick(View view) {
switch (view.getId()) {
case R.id.selete_area_lay:
showPopWindow(1);
break;
case R.id.selete_lay:
showPopWindow(2);
break;
case R.id.selete1_lay:
showPopWindow(3);
break;
case R.id.selete2_lay://仅看A类
isA = !isA;
if (isA) {
mSelete2Iv.setImageResource(R.drawable.select3_sel);
} else {
mSelete2Iv.setImageResource(R.drawable.select3_nor);
}
break;
case R.id.do_search:
break;
case R.id.begin_test:
break;
}
}
private void showPopWindow(int position) {
LinearLayout view = mSeleteLay;
switch (position) {
case 1:
view = mSeleteAreaLay;
break;
case 2:
view = mSeleteLay;
break;
case 3:
view = mSelete1Lay;
break;
}
try {
View conview = View.inflate(this, R.layout.popu_list, null);
PopupWindow popupWindow = new PopupWindow(conview, RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
popupWindow.setFocusable(true);
popupWindow.setOutsideTouchable(true);
ColorDrawable cd = new ColorDrawable(0x00ffffff);// 背景颜色全透明
popupWindow.setBackgroundDrawable(cd);
ListView listView = (ListView) conview.findViewById(R.id.list_view);
listView.setAdapter(new PopuAdapter(this));
int[] location = new int[2];
view.getLocationOnScreen(location);
// popupWindow.setAnimationStyle(R.style.style_pop_animation);// 动画效果必须放在showAsDropDown()方法上边,否则无效
conview.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int xoff = -(conview.getMeasuredWidth() / 2 - view.getWidth() / 2);
popupWindow.showAsDropDown(view, xoff, 0);
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -10,6 +10,7 @@ import com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter;
import com.app.baselibrary.recycler.itemholder.ItemViewHolder;
import com.oo.eye.R;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.List;
......@@ -18,10 +19,10 @@ import java.util.List;
* Author: cxh
*/
public class MorePeopleAdapter extends BaseRecyclerViewAdapter<ChartsBean, ItemViewHolder> {
public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, ItemViewHolder> {
private final LayoutInflater mInflater;
public MorePeopleAdapter(List<ChartsBean> list, Context context) {
public MorePeopleAdapter(List<StudentBean> list, Context context) {
super(list, context);
mInflater = LayoutInflater.from(mContext);
}
......
......@@ -8,6 +8,7 @@ import com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter;
import com.app.baselibrary.recycler.itemholder.ItemViewHolder;
import com.oo.eye.R;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.List;
......@@ -16,9 +17,9 @@ import java.util.List;
* Author: cxh
*/
public class TestListAdapter extends BaseRecyclerViewAdapter<ChartsBean,ItemViewHolder>{
public class TestListAdapter extends BaseRecyclerViewAdapter<StudentBean,ItemViewHolder>{
private final LayoutInflater mInflater;
public TestListAdapter(List<ChartsBean> list, Context context) {
public TestListAdapter(List<StudentBean> list, Context context) {
super(list, context);
mInflater = LayoutInflater.from(mContext);
}
......
......@@ -8,6 +8,7 @@ import com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter;
import com.app.baselibrary.recycler.itemholder.ItemViewHolder;
import com.oo.eye.R;
import com.oo.eye.bean.ChartsBean;
import com.oo.eye.bean.StudentBean;
import java.util.List;
......@@ -16,9 +17,9 @@ import java.util.List;
* Author: cxh
*/
public class TestResultListAdapter extends BaseRecyclerViewAdapter<ChartsBean,ItemViewHolder>{
public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean,ItemViewHolder>{
private final LayoutInflater mInflater;
public TestResultListAdapter(List<ChartsBean> list, Context context) {
public TestResultListAdapter(List<StudentBean> list, Context context) {
super(list, context);
mInflater = LayoutInflater.from(mContext);
}
......
app/src/main/res/drawable-xhdpi/p2c10.png

697 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c10.png

785 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c10.png
app/src/main/res/drawable-xhdpi/p2c10.png
app/src/main/res/drawable-xhdpi/p2c10.png
app/src/main/res/drawable-xhdpi/p2c10.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p2c11.png

498 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c11.png

594 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c11.png
app/src/main/res/drawable-xhdpi/p2c11.png
app/src/main/res/drawable-xhdpi/p2c11.png
app/src/main/res/drawable-xhdpi/p2c11.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p2c12.png

444 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c12.png

522 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c12.png
app/src/main/res/drawable-xhdpi/p2c12.png
app/src/main/res/drawable-xhdpi/p2c12.png
app/src/main/res/drawable-xhdpi/p2c12.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p2c13.png

339 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c13.png

439 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c13.png
app/src/main/res/drawable-xhdpi/p2c13.png
app/src/main/res/drawable-xhdpi/p2c13.png
app/src/main/res/drawable-xhdpi/p2c13.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p2c14.png

266 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c14.png

334 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c14.png
app/src/main/res/drawable-xhdpi/p2c14.png
app/src/main/res/drawable-xhdpi/p2c14.png
app/src/main/res/drawable-xhdpi/p2c14.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p2c9.png

1.02 KB | W: | H:

app/src/main/res/drawable-xhdpi/p2c9.png

1008 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p2c9.png
app/src/main/res/drawable-xhdpi/p2c9.png
app/src/main/res/drawable-xhdpi/p2c9.png
app/src/main/res/drawable-xhdpi/p2c9.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p5c12.png

878 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c12.png

977 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c12.png
app/src/main/res/drawable-xhdpi/p5c12.png
app/src/main/res/drawable-xhdpi/p5c12.png
app/src/main/res/drawable-xhdpi/p5c12.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p5c13.png

697 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c13.png

785 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c13.png
app/src/main/res/drawable-xhdpi/p5c13.png
app/src/main/res/drawable-xhdpi/p5c13.png
app/src/main/res/drawable-xhdpi/p5c13.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/drawable-xhdpi/p5c14.png

498 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c14.png

594 Bytes | W: | H:

app/src/main/res/drawable-xhdpi/p5c14.png
app/src/main/res/drawable-xhdpi/p5c14.png
app/src/main/res/drawable-xhdpi/p5c14.png
app/src/main/res/drawable-xhdpi/p5c14.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -112,7 +112,7 @@
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/select3_sel" />
android:src="@drawable/select3_nor" />
<TextView
android:id="@+id/selete2_tv"
......
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