作者 zhangtao

zhangtao—测试问题修复

正在显示 34 个修改的文件 包含 862 行增加332 行删除
... ... @@ -42,11 +42,11 @@
<activity
android:name=".MainActivity"
android:launchMode="singleTask">
<intent-filter>
<!-- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</intent-filter>-->
</activity>
<activity
android:name=".activity.personal.InfromationActivity"
... ... @@ -93,11 +93,11 @@
<activity
android:name=".activity.login.LoginActivity"
android:screenOrientation="portrait">
<!-- <intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>-->
</intent-filter>
</activity>
<activity
android:name=".activity.personal.MoneyHistoryActivity"
... ...
... ... @@ -455,7 +455,7 @@ public interface MyServer {
* @return
*/
@GET("GetJobPropList")
Observable<AddressBean> GetJobPropList(@Query("PropType") int PropType, @Query("IsAll") boolean IsAll);
Observable<AddressBean> GetJobPropList(@Query("PropType") int PropType, @Query("IsAll") boolean IsAll);
/**
* 获取模拟题基本信息接口
... ... @@ -493,10 +493,11 @@ public interface MyServer {
* @param accountOid
* @param questionOid 题目ID
* @param wrongQuestionType 错题类型.0:练习,1:模拟题
* @param catalogOid 目录ID
* @return
*/
@POST("InsertWrongQuestion")
Observable<UserBean> InsertWrongQuestion(@Query("accountOid") String accountOid, @Query("questionOid") String questionOid, @Query("wrongQuestionType") int wrongQuestionType);
Observable<UserBean> InsertWrongQuestion(@Query("accountOid") String accountOid, @Query("questionOid") String questionOid, @Query("wrongQuestionType") int wrongQuestionType, @Query("catalogOid") String catalogOid);
/**
* 获取错题目录列表接口
... ...
... ... @@ -5,6 +5,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.Gravity;
... ... @@ -72,14 +73,22 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
LinearLayout linTab;
@BindView(R.id.rl_card)
RelativeLayout rlCard;
@BindView(R.id.tv_show_card)
TextView tvShowCard;
@BindView(R.id.tv_hour)
TextView tvHour;
@BindView(R.id.tv_minute)
TextView tvMinute;
@BindView(R.id.tv_second)
TextView tvSecond;
private ListAnswerAdapter optionsAdapter;
private List<AnswerBean.QuestionLstBean> questionList = new ArrayList<>();
private List<Integer> sheetCard = new ArrayList<>();
private String catalogOid;
private PopupWindow popupWindow;
private int maxTopic=0; //题目总数量
private int unDone; //未完成题目数量
private int maxTopic = 0; //题目总数量
private int unDone = 0; //未完成题目数量
private double danxuan; //单选题分数 单个
private double duoxuan; //多选题分数 单个
private double panduan; //判断题分数 单个
... ... @@ -99,6 +108,12 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
private int panduanWrong;//判断做错的数量
private AnswerSheetGridAdapter sheetGridAdapter;
private String resumeOid;
private List<String> answer = new ArrayList<>();//存放多选题选择答案
private boolean isRight = false; //判断多选题是否选对
private int longTime;
private int thisTime;
private CountDownTimer timer;
private List<Integer> integerList = new ArrayList<>();
// R.layout.pop_answer
... ... @@ -113,6 +128,7 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
commit.setOnClickListener(this);
linTab.setOnClickListener(this);
rlCard.setOnClickListener(this);
tvShowCard.setOnClickListener(this);
listAnswer.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
... ... @@ -120,7 +136,7 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
ImageView wrong = (ImageView) view.findViewById(R.id.img_wrong);
ImageView right = (ImageView) view.findViewById(R.id.img_right);
TextView option = (TextView) view.findViewById(R.id.option);
TextView text = (TextView) view.findViewById(R.id.text);
if (markType.contains("单选") || markType.contains("判断")) {
if (isClickOnce) {
isClickOnce = false;
... ... @@ -144,79 +160,131 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
} else {
return;
}
if (rightAnswer.contains(selectAnswer)) {
/* right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);*/
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
//答题成功 加分
if (markType.contains("单选")) {
totalScore += danxuan;
} else if (markType.contains("多选")) {
totalScore += duoxuan;
} else if (markType.contains("判断")) {
totalScore += panduan;
}
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
} else {
if (markType.contains("单选")) {
danxuanWrong++;
} else if (markType.contains("判断")) {
panduanWrong++;
}
//答题失败
/*right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);*/
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
}
} else if (markType.contains("多选")) {
try {
//选择答案
if (position == 0)
selectAnswer += "A";
answer.add("A");
if (position == 1)
selectAnswer += "B";
answer.add("B");
if (position == 2)
selectAnswer += "C";
answer.add("C");
if (position == 3)
selectAnswer += "D";
answer.add("D");
if (position == 4)
selectAnswer += "E";
answer.add("E");
if (position == 5)
selectAnswer += "F";
answer.add("F");
} catch (Exception e) {
Log.e("Exception:", e.toString());
}
}
Log.e("zhangtao:rightAnswer", rightAnswer + "");
Log.e("zhangtao:selectAnswer", selectAnswer + "");
if (rightAnswer.contains(selectAnswer)) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
for (int i = 0; i < answer.size(); i++) {
if (rightAnswer.contains(answer.get(i))) {
integerList.add(1);
/*right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);*/
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
} else {
integerList.add(2);
/* right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);*/
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
}
//答题成功 加分
if (markType.contains("单选")) {
totalScore += danxuan;
} else if (markType.contains("多选")) {
totalScore += duoxuan;
} else if (markType.contains("判断")) {
totalScore += panduan;
}
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
for (int i = 0; i < integerList.size(); i++) {
if (integerList.get(i) == 2) {
isRight = false;
} else {
isRight = true;
}
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
}
if (!isRight) {
//答题失败
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
} else {
if (markType.contains("单选")) {
danxuanWrong++;
} else if (markType.contains("多选")) {
duoxuanWrong++;
} else if (markType.contains("判断")) {
panduanWrong++;
}
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
//答题失败
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
} else if (isRight && rightAnswer.length() == answer.size()) {
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
totalScore += duoxuan;
}
}
}
});
}
private void doRefresh() {
isRight = false;
answer.clear();
rightAnswer = questionList.get(currentIndex).getAnswer();
tvCurrent.setText(String.valueOf(currentIndex + 1));
tvRadio.setText(questionList.get(currentIndex).getQuestionTypeName());
... ... @@ -231,6 +299,8 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
optionsAdapter = new ListAnswerAdapter(questionList.get(currentIndex).getOptionsLst(), this);
listAnswer.setAdapter(optionsAdapter);
optionsAdapter.notifyDataSetChanged();
}
@Override
... ... @@ -241,7 +311,7 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
@Override
public void initData() {
// mPresenter.getPresenter(4, 1, catalogOid, "3E0E2A6B-6616-4CEE-B498-1F06A6F8D482");
mPresenter.getPresenter(4, 1, catalogOid,resumeOid);
mPresenter.getPresenter(4, 1, catalogOid, resumeOid);
}
@Override
... ... @@ -258,44 +328,95 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
public void getData(Object o, int api, int intent) {
if (api == 4 && intent == 1) {
AnswerBean bean = (AnswerBean) o;
if (bean.isIsSuccess()) {
maxTopic = bean.getRadioCount() + bean.getMultipleCount() + bean.getJudgeCount();
danxuanCount = bean.getRadioCount();
duoxuanCount = bean.getMultipleCount();
panduanCount = bean.getJudgeCount();
all.setText(String.valueOf(maxTopic));
for (int i = 0; i < maxTopic; i++) {
sheetCard.add(0);
}
sheetGridAdapter = new AnswerSheetGridAdapter(sheetCard, this);
maxTopic = bean.getRadioCount() + bean.getMultipleCount() + bean.getJudgeCount();
danxuanCount = bean.getRadioCount();
duoxuanCount = bean.getMultipleCount();
panduanCount = bean.getJudgeCount();
questionList.addAll(bean.getQuestionLst());
all.setText(String.valueOf(maxTopic));
for (int i = 0; i < maxTopic; i++) {
sheetCard.add(0);
danxuan = bean.getRadioScore();
duoxuan = bean.getMultipleScore();
panduan = bean.getJudgeScore();
rightAnswer = bean.getQuestionLst().get(0).getAnswer();
optionsAdapter = new ListAnswerAdapter(questionList.get(0).getOptionsLst(), this);
listAnswer.setAdapter(optionsAdapter);
tvCurrent.setText(String.valueOf(currentIndex + 1));
tvMax.setText(String.valueOf(maxTopic));
if (questionList.get(currentIndex).getQuestionTypeName() != null)
tvRadio.setText(questionList.get(currentIndex).getQuestionTypeName());
markType = questionList.get(currentIndex).getQuestionTypeName();
if (markType.contains("单选") || markType.contains("判断")) {
isClickOnce = true;
} else {
isClickOnce = false;
}
if (questionList.get(currentIndex).getQuestionTitle() != null)
tvTopic.setText(questionList.get(currentIndex).getQuestionTitle());
}
sheetGridAdapter = new AnswerSheetGridAdapter(sheetCard, this);
questionList.addAll(bean.getQuestionLst());
longTime = bean.getExamMinute() * 60;
danxuan = bean.getRadioScore();
duoxuan = bean.getMultipleScore();
panduan = bean.getJudgeScore();
rightAnswer = bean.getQuestionLst().get(0).getAnswer();
thisTime = longTime;
timer = new CountDownTimer(thisTime * 1000, 1000) {
if (bean.getExamType() != null) {
tvTitle.setText(bean.getExamType());
}
private Intent intent;
optionsAdapter = new ListAnswerAdapter(questionList.get(0).getOptionsLst(), this);
listAnswer.setAdapter(optionsAdapter);
tvCurrent.setText(String.valueOf(currentIndex + 1));
tvMax.setText(String.valueOf(maxTopic));
if (questionList.get(currentIndex).getQuestionTypeName() != null)
tvRadio.setText(questionList.get(currentIndex).getQuestionTypeName());
markType = questionList.get(currentIndex).getQuestionTypeName();
if (markType.contains("单选") || markType.contains("判断")) {
isClickOnce = true;
} else {
isClickOnce = false;
}
if (questionList.get(currentIndex).getQuestionTitle() != null)
tvTopic.setText(questionList.get(currentIndex).getQuestionTitle());
@Override
public void onTick(long millisUntilFinished) {
thisTime--;
tvSecond.setText(String.valueOf(thisTime));
}
@Override
public void onFinish() {
if (currentIndex == 0) {
intent = new Intent(AnswerActivity.this, TestScoreActivity.class);
intent.putExtra("catalogOid", catalogOid);
intent.putExtra("danxuanCount", danxuanCount);
intent.putExtra("duoxuanCount", duoxuanCount);
intent.putExtra("panduanCount", panduanCount);
intent.putExtra("danxuanWrong", danxuanCount);
intent.putExtra("panduanWrong", panduanCount);
intent.putExtra("duoxuanWrong", duoxuanCount);
intent.putExtra("totalScore", totalScore);
startActivity(intent);
AnswerActivity.this.finish();
} else {
for (int i = currentIndex + 1; i < questionList.size(); i++) {
if (questionList.get(i).getQuestionTypeName().contains("单选")) {
danxuanWrong++;
} else if (questionList.get(i).getQuestionTypeName().contains("多选")) {
duoxuanWrong++;
} else if (questionList.get(i).getQuestionTypeName().contains("判断")) {
panduanWrong++;
}
}
intent = new Intent(AnswerActivity.this, TestScoreActivity.class);
intent.putExtra("catalogOid", catalogOid);
intent.putExtra("danxuanCount", danxuanCount);
intent.putExtra("duoxuanCount", duoxuanCount);
intent.putExtra("panduanCount", panduanCount);
intent.putExtra("danxuanWrong", danxuanWrong);
intent.putExtra("panduanWrong", panduanWrong);
intent.putExtra("duoxuanWrong", duoxuanWrong);
intent.putExtra("totalScore", totalScore);
startActivity(intent);
AnswerActivity.this.finish();
}
}
}.start();
}
}
... ... @@ -310,6 +431,12 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
}
@Override
protected void onDestroy() {
super.onDestroy();
timer.cancel();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
... ... @@ -333,6 +460,7 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
case R.id.rl_next:
if (currentIndex < maxTopic - 1) {
if (selectAnswer == "" || selectAnswer == null) {
sheetCard.set(currentIndex, 0);
sheetGridAdapter.notifyDataSetChanged();
unDone++;
... ... @@ -346,23 +474,44 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
}
String questionOid = questionList.get(currentIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1));
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
}
currentIndex++;
index.setText(String.valueOf(currentIndex + 1));
doRefresh();
selectAnswer = "";
if (currentIndex == maxTopic - 1) {
tvShowCard.setVisibility(View.GONE);
commit.setVisibility(View.VISIBLE);
if (markType.contains("单选")) {
danxuanWrong++;
} else if (markType.contains("多选")) {
duoxuanWrong++;
} else if (markType.contains("判断")) {
panduanWrong++;
}
}
} else {
/* Intent intent = new Intent(this, AnswerMarkActivity.class);
intent.putExtra("catalogOid", catalogOid);
startActivity(intent);
Log.e("zhangtao:totalScore", totalScore + "");*/
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
}
break;
case R.id.commit:
showCommitCard(this, maxTopic - currentIndex - 1);
if (selectAnswer == "" || selectAnswer == null) {
unDone++;
if (questionList.get(questionList.size() - 1).getQuestionTypeName().equals("多选")) {
duoxuanWrong++;
} else if (questionList.get(questionList.size() - 1).getQuestionTypeName().equals("单选")) {
danxuanWrong++;
} else if (questionList.get(questionList.size() - 1).getQuestionTypeName().equals("判断")) {
panduanWrong++;
}
}
showCommitCard(this, unDone);
chageAlpha(0.5f);
break;
case R.id.lin_tab:
... ... @@ -371,6 +520,9 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
case R.id.rl_card:
showAnswerCard(sheetCard, rightCount, wrongCount, currentIndex, maxTopic);
break;
case R.id.tv_show_card:
showAnswerCard(sheetCard, rightCount, wrongCount, currentIndex, maxTopic);
break;
}
}
... ... @@ -410,8 +562,9 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
intent.putExtra("panduanWrong", panduanWrong);
intent.putExtra("duoxuanWrong", duoxuanWrong);
intent.putExtra("totalScore", totalScore);
Log.e("zhangtao",totalScore+"分");
Log.e("zhangtao", totalScore + "分");
startActivity(intent);
AnswerActivity.this.finish();
}
});
... ... @@ -423,7 +576,8 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
});
}
private void showAnswerCard(List<Integer> sheetCard, int rightCount, int wrongCount, int currentIndex, int maxTopic) {
private void showAnswerCard(List<Integer> sheetCard, int rightCount, int wrongCount,
int currentIndex, int maxTopic) {
View contentView = LayoutInflater.from(this).inflate(R.layout.pop_answer_sheet, null);
View view = LayoutInflater.from(this).inflate(R.layout.activity_answer, null);
... ... @@ -436,7 +590,7 @@ public class AnswerActivity extends BaseMvpActivity<CommonPresenter, ExerciseMod
right.setText(String.valueOf(rightCount));
wrong.setText(String.valueOf(wrongCount));
index.setText(String.valueOf(currentIndex+1));
index.setText(String.valueOf(currentIndex + 1));
total.setText(String.valueOf(maxTopic));
// sheetGridAdapter = new AnswerSheetGridAdapter(sheetCard, this);
... ...
... ... @@ -2,6 +2,7 @@ package com.hh.xuetubao.activity.pratice;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
... ... @@ -34,7 +35,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 随机联系
* 随机练习页面
*/
public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, ExerciseModel> implements ICommonView, View.OnClickListener {
... ... @@ -67,8 +68,6 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
LinearLayout linTab;
@BindView(R.id.rl_card)
RelativeLayout rlCard;
@BindView(R.id.tv_look)
TextView tvLook;
@BindView(R.id.right_select)
TextView rightSelect;
@BindView(R.id.right_answer)
... ... @@ -77,11 +76,16 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
RelativeLayout rlAnswer;
@BindView(R.id.commit)
LinearLayout commit;
@BindView(R.id.tv2)
TextView tv2;
@BindView(R.id.tv_show_card)
TextView tvShowCard;
private String catalogOid;
private ListAnswerAdapter optionsAdapter;
private List<AnswerBean.QuestionLstBean> questionList = new ArrayList<>();
private List<Integer> sheetCard = new ArrayList<>();
private List<Integer> sheetCard = new ArrayList<>(); //保存底部答题卡状态
private List<String> answerSelect = new ArrayList<>();//保存答题结果集合
private PopupWindow popupWindow;
private int maxTopic = 0; //题目总数量
private int currentIndex = 0; //当前题目下标
... ... @@ -89,10 +93,14 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
private String rightAnswer; //正确答案
private String markType; //当前题目类型
private boolean isClickOnce = false;//是否是单选题 只能点击一次
private int rightCount;//答对题的数量
private int wrongCount;//答错题的数量
private int rightCount = 0;//答对题的数量
private int wrongCount = 0;//答错题的数量
private AnswerSheetGridAdapter sheetGridAdapter;
private String resumeOid;
private List<String> answer = new ArrayList<>();//存放多选题选择答案
private boolean isRight = false; //判断多选题是否选对
private List<Integer> integerNone = new ArrayList<>();
private List<Integer> integerList = new ArrayList<>();
@Override
public void initView() {
... ... @@ -102,8 +110,8 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
rlNext.setOnClickListener(this);
linTab.setOnClickListener(this);
rlCard.setOnClickListener(this);
tvLook.setOnClickListener(this);
commit.setOnClickListener(this);
tvShowCard.setOnClickListener(this);
listAnswer.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
... ... @@ -135,61 +143,117 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
} else {
return;
}
if (rightAnswer.contains(selectAnswer)) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
answerSelect.set(currentIndex, selectAnswer);
rlAnswer.setVisibility(View.INVISIBLE);
nextTest();
} else {
rlAnswer.setVisibility(View.VISIBLE);
//答题失败
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
answerSelect.set(currentIndex, selectAnswer);
}
} else if (markType.contains("多选")) {
try {
//选择答案
if (position == 0)
selectAnswer += "A";
answer.add("A");
if (position == 1)
selectAnswer += "B";
answer.add("B");
if (position == 2)
selectAnswer += "C";
answer.add("C");
if (position == 3)
selectAnswer += "D";
answer.add("D");
if (position == 4)
selectAnswer += "E";
answer.add("E");
if (position == 5)
selectAnswer += "F";
answer.add("F");
} catch (Exception e) {
Log.e("Exception:", e.toString());
}
}
Log.e("zhangtao:rightAnswer", rightAnswer + "");
Log.e("zhangtao:selectAnswer", selectAnswer + "");
if (rightAnswer.contains(selectAnswer)) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
for (int i = 0; i < answer.size(); i++) {
if (rightAnswer.contains(answer.get(i))) {
integerList.add(1);
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
} else {
integerList.add(2);
rlAnswer.setVisibility(View.VISIBLE);
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
}
}
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
for (int i = 0; i < integerList.size(); i++) {
if (integerList.get(i) == 2) {
isRight = false;
} else {
isRight = true;
}
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
}
rlAnswer.setVisibility(View.INVISIBLE);
} else {
if (!isRight) {
//答题失败
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
rlAnswer.setVisibility(View.VISIBLE);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
//答题失败
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
answerSelect.set(currentIndex, selectAnswer);
} else if (isRight && answer.size() == rightAnswer.length()) {
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
answerSelect.set(currentIndex, selectAnswer);
rlAnswer.setVisibility(View.INVISIBLE);
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
nextTest();
}
}
}
});
... ... @@ -228,6 +292,7 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
all.setText(String.valueOf(maxTopic));
for (int i = 0; i < maxTopic; i++) {
sheetCard.add(0);
answerSelect.add("0");
}
sheetGridAdapter = new AnswerSheetGridAdapter(sheetCard, this);
... ... @@ -247,8 +312,9 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
if (questionLstBeans.get(currentIndex).getAnswer() != null)
rightSelect.setText(questionLstBeans.get(currentIndex).getAnswer());
if (questionLstBeans.get(currentIndex).getWrongAnaly() != null)
if (!TextUtils.isEmpty(questionLstBeans.get(currentIndex).getWrongAnaly())) {
rightAnswerText.setText(questionLstBeans.get(currentIndex).getWrongAnaly());
}
}
}
... ... @@ -284,23 +350,7 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
}
break;
case R.id.rl_next:
if (currentIndex < maxTopic - 1) {
if (selectAnswer == "" || selectAnswer == null) {
sheetCard.set(currentIndex, 0);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionList.get(currentIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1));
}
currentIndex++;
wrongCount++;
index.setText(String.valueOf(currentIndex + 1));
doRefresh();
selectAnswer = "";
} else {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
}
nextTest();
break;
case R.id.lin_tab:
this.finish();
... ... @@ -312,11 +362,45 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
rlAnswer.setVisibility(View.VISIBLE);
break;
case R.id.commit:
if (selectAnswer == "" || selectAnswer == null) {
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
}
Intent intent = new Intent(this, AnswerResultActivity.class);
intent.putExtra("rightCount", rightCount);
intent.putExtra("wrongCount", wrongCount);
startActivity(intent);
break;
case R.id.tv_show_card:
showAnswerCard(sheetCard, rightCount, wrongCount, currentIndex, maxTopic);
break;
}
}
private void nextTest() {
if (currentIndex < maxTopic - 1) {
if (selectAnswer == "" || selectAnswer == null) {
sheetCard.set(currentIndex, 0);
sheetGridAdapter.notifyDataSetChanged();
answerSelect.set(currentIndex, "");
if (!integerNone.contains(currentIndex)) {
integerNone.add(currentIndex);
wrongCount++;
}
String questionOid = questionList.get(currentIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, resumeOid, questionOid, String.valueOf(1), catalogOid);
}
currentIndex++;
index.setText(String.valueOf(currentIndex + 1));
doRefresh();
selectAnswer = "";
} else if (currentIndex == maxTopic - 1) {
Toast.makeText(this,"当前已是最后一题",Toast.LENGTH_SHORT).show();
tvShowCard.setVisibility(View.GONE);
commit.setVisibility(View.VISIBLE);
}
}
... ... @@ -355,7 +439,10 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
private void doRefresh() {
isRight = false;
answer.clear();
rightAnswer = questionList.get(currentIndex).getAnswer();
Log.e("zhangtao:right", rightAnswer);
tvCurrent.setText(String.valueOf(currentIndex + 1));
tvRadio.setText(questionList.get(currentIndex).getQuestionTypeName());
markType = questionList.get(currentIndex).getQuestionTypeName();
... ... @@ -375,6 +462,13 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
if (questionList.get(currentIndex).getWrongAnaly() != null)
rightAnswerText.setText(questionList.get(currentIndex).getWrongAnaly());
rlAnswer.setVisibility(View.INVISIBLE);
if(!answerSelect.get(currentIndex).equals("0")){
optionsAdapter.setSelect(answerSelect.get(currentIndex));
optionsAdapter.notifyDataSetChanged();
listAnswer.setItemsCanFocus(false);
}
}
}
... ...
package com.hh.xuetubao.activity.pratice;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
... ... @@ -90,6 +91,8 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
private int wrongCount;//答错题的数量
private AnswerSheetGridAdapter sheetGridAdapter;
private String accountOid;
private List<String> answer = new ArrayList<>();//存放多选题选择答案
private boolean isRight = false; //判断多选题是否选对
@Override
public void initView() {
... ... @@ -132,61 +135,102 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
} else {
return;
}
if (rightAnswer.contains(selectAnswer)) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
rlAnswer.setVisibility(View.INVISIBLE);
String questionOid = questionList.get(currentIndex).getQuestionOid();
mPresenter.getPresenter(7, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
} else {
rlAnswer.setVisibility(View.VISIBLE);
//答题失败
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
}
} else if (markType.contains("多选")) {
try {
//选择答案
if (position == 0)
selectAnswer += "A";
answer.add("A");
if (position == 1)
selectAnswer += "B";
answer.add("B");
if (position == 2)
selectAnswer += "C";
answer.add("C");
if (position == 3)
selectAnswer += "D";
answer.add("D");
if (position == 4)
selectAnswer += "E";
answer.add("E");
if (position == 5)
selectAnswer += "F";
answer.add("F");
} catch (Exception e) {
Log.e("Exception:", e.toString());
}
}
Log.e("zhangtao:rightAnswer", rightAnswer + "");
Log.e("zhangtao:selectAnswer", selectAnswer + "");
if (rightAnswer.contains(selectAnswer)) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
for (int i = 0; i < answer.size(); i++) {
if (rightAnswer.contains(answer.get(i))) {
isRight = true;
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
} else {
isRight = false;
rlAnswer.setVisibility(View.VISIBLE);
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
}
}
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
if (isRight && rightAnswer.length() == answer.size()) {
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
rlAnswer.setVisibility(View.INVISIBLE);
} else {
rlAnswer.setVisibility(View.VISIBLE);
sheetCard.set(currentIndex, 1);
sheetGridAdapter.notifyDataSetChanged();
//答题失败
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
rlAnswer.setVisibility(View.INVISIBLE);
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1));
} else {
//答题失败
String questionOid = questionList.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
sheetCard.set(currentIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
}
}
}
});
... ... @@ -219,7 +263,8 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
AnswerBean bean = (AnswerBean) o;
List<AnswerBean.QuestionLstBean> questionLstBeans = bean.getQuestionLst();
questionList.addAll(questionLstBeans);
if (questionLstBeans.size() > 0 && !"".equals(questionLstBeans))
questionList.addAll(questionLstBeans);
maxTopic = questionLstBeans.size();
all.setText(String.valueOf(maxTopic));
... ... @@ -244,8 +289,9 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
if (questionLstBeans.get(currentIndex).getAnswer() != null)
rightSelect.setText(questionLstBeans.get(currentIndex).getAnswer());
if (questionLstBeans.get(currentIndex).getWrongAnaly() != null)
if (!TextUtils.isEmpty(questionLstBeans.get(currentIndex).getWrongAnaly())) {
rightAnswerText.setText(questionLstBeans.get(currentIndex).getWrongAnaly());
}
}
}
... ... @@ -262,6 +308,8 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
private void doRefresh() {
isRight = false;
answer.clear();
rightAnswer = questionList.get(currentIndex).getAnswer();
tvCurrent.setText(String.valueOf(currentIndex + 1));
tvRadio.setText(questionList.get(currentIndex).getQuestionTypeName());
... ... @@ -306,7 +354,7 @@ public class AnswerWrongActivity extends BaseMvpActivity<CommonPresenter, Exerci
String questionOid = questionList.get(currentIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1));
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
}
currentIndex++;
index.setText(String.valueOf(currentIndex + 1));
... ...
... ... @@ -2,6 +2,7 @@ package com.hh.xuetubao.activity.pratice;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
... ... @@ -9,8 +10,6 @@ import android.widget.TextView;
import com.hh.xuetubao.R;
import com.hh.xuetubao.Utils.SharedPrefrenceUtils;
import com.hh.xuetubao.activity.pratice.AnswerActivity;
import com.hh.xuetubao.activity.pratice.AnswerMarkActivity;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.ExerciseModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
... ... @@ -64,7 +63,7 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
@Override
public void initData() {
mPresenter.getPresenter(3, 1, catalogOid,resumeOid);
mPresenter.getPresenter(3, 1, catalogOid, resumeOid);
}
@Override
... ... @@ -120,6 +119,7 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
case R.id.mock_exam_btn: // this - > 答题界面
Intent intent = new Intent(this, AnswerActivity.class);
intent.putExtra("catalogOid", catalogOid);
SharedPrefrenceUtils.saveString(this, "thisCatalogOid", catalogOid);
startActivity(intent);
break;
}
... ... @@ -135,4 +135,5 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
break;
}
}
}
... ...
... ... @@ -55,7 +55,7 @@ public class PriacticeDistActivity extends BaseMvpActivity<CommonPresenter, Pers
praticeWrongFragment = new PraticeWrongFragment();
transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.frame, priacticeDistFragment);
transaction.add(R.id.frame, priacticeDistFragment,catalogOid);
transaction.show(priacticeDistFragment);
transaction.commit();
rlPratice.setChecked(true);
... ...
... ... @@ -5,6 +5,8 @@ import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
... ... @@ -62,6 +64,7 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
RelativeLayout rlReStart;
private String catalogOid;
private Intent intent;
private String thisCatalogOid;
@TargetApi(Build.VERSION_CODES.N)
@RequiresApi(api = Build.VERSION_CODES.N)
... ... @@ -76,6 +79,8 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
Integer duoxuanWrongt = getIntent().getIntExtra("duoxuanWrong", 0);
Integer panduanWrong = getIntent().getIntExtra("panduanWrong", 0);
Log.e("zhangtao", String.valueOf(duoxuanWrongt) + "-------------");
int totalScore = (int) getIntent().getDoubleExtra("totalScore", 0);
catalogOid = getIntent().getStringExtra("catalogOid");
... ... @@ -84,7 +89,7 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
tv15.setText(String.valueOf(panduanCount));
tv5.setText(String.valueOf(danxuanWrong));
tv11.setTag(String.valueOf(duoxuanWrongt));
tv11.setText(String.valueOf(duoxuanWrongt));
tv17.setText(String.valueOf(panduanWrong));
... ... @@ -104,6 +109,8 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
rlAllWrong.setOnClickListener(this);
rlReStart.setOnClickListener(this);
thisCatalogOid = SharedPrefrenceUtils.getString(this, "thisCatalogOid");
}
@Override
... ... @@ -150,14 +157,19 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
public String getFormat(int total, int wrongCount) {
int i1 = total - wrongCount;
if (i1 != 0) {
if (i1 > 0) {
double i2 = (double) i1 / total;
double v = i2 * 100;
double value = new BigDecimal(v).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
return String.valueOf(value);
} else if (total == wrongCount) {
return String.valueOf(0);
} else if (wrongCount == 0) {
return String.valueOf(100);
} else {
return String.valueOf(0);
}
}
@Override
... ... @@ -179,4 +191,5 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
}
}
}
... ...
... ... @@ -4,7 +4,6 @@ import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
... ... @@ -73,13 +72,29 @@ public class CourseDetailActivity extends BaseMvpActivity<CommonPresenter, Learn
}
public void onResumeJC() {
public void onResumeJC(final Event event) {
new Thread(new Runnable() {
private int duration;
@Override
public void run() {
try {
playing = jiecaoPlayer.getCurrentPositionWhenPlaying();
Log.e("zhangtao:current:", playing + "");
duration = jiecaoPlayer.getDuration();
mPresenter.getPresenter(6,
1,
accountOid,
event.getLessonOid(),
event.getChapterOid(),
event.getSectionOid(),
event.getResourceOid(),
String.valueOf(playing/1000),
String.valueOf(playing/1000),
String.valueOf(duration/1000)
);
Thread.sleep(500);
} catch (Exception e) {
... ... @@ -94,22 +109,26 @@ public class CourseDetailActivity extends BaseMvpActivity<CommonPresenter, Learn
@Override
protected void onResume() {
super.onResume();
onResumeJC();
// onResumeJC();
}
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
public void handleEvent(Event event) {
// 接收来自ListRecSecondChildAdapter的URL视频路径
if (event.getCode() == 1) {
Bitmap bitmap = getNetVideoBitmap(event.getEvent());
Bitmap bitmap = getNetVideoBitmap(event.getPlayUrl());
jiecaoPlayer.setUp(event.getEvent(), JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL);
jiecaoPlayer.setUp(event.getPlayUrl(), JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL);
Glide.with(this).load(bitmap).into(jiecaoPlayer.thumbImageView);
jiecaoPlayer.startVideo();
onResumeJC(event);
}
if (event.getCode() == 2) {
Glide.with(this).load(event.getEvent()).into(jiecaoPlayer.thumbImageView);
Glide.with(this).load(event.getPlayUrl()).into(jiecaoPlayer.thumbImageView);
}
}
... ...
... ... @@ -74,6 +74,7 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
private List<String> day = new ArrayList<>();
private List<String> time = new ArrayList<>();
private String resumeOid;
private int totalPage;
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
... ... @@ -85,7 +86,6 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
xrecyclerview.setLoadingListener(this);
adapter.setTurnTo(this);
// scroll.setNestedScrollingEnabled(false);
xrecyclerview.setNestedScrollingEnabled(false);
scroll.setNestedScrollingEnabled(true);
... ... @@ -100,12 +100,29 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, 25);//右间距
rvReadTime.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap));
scroll.setFocusable(false);
scroll.setFocusableInTouchMode(false);
rlUser.setFocusable(true);
rlUser.setFocusableInTouchMode(true);
rlUser.requestFocus();
scroll.setOnScrollChangeListener(this);
linBack.setOnClickListener(this);
rlUser.setOnClickListener(this);
rlUser.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(StudyNoteActivity.this, InfromationActivity.class));
}
});
imgUser.setOnClickListener(this);
rlBody.setOnClickListener(this);
}
@Override
... ... @@ -153,6 +170,7 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
if (api == 4 && intent == 2) {
LearningRecordDataBean bean = (LearningRecordDataBean) o;
List<LearningRecordDataBean.learnBean> recordLst = bean.getRecordLst();
totalPage = bean.getTotalPage();
if (isRefresh) {
mlist.clear();
isRefresh = false;
... ... @@ -197,9 +215,6 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
pageIndex = 1;
isRefresh = true;
mPresenter.getPresenter(4, 2, resumeOid, String.valueOf(pageIndex), String.valueOf(pageSize));
// scroll.setNestedScrollingEnabled(false);
xrecyclerview.setNestedScrollingEnabled(false);
scroll.setNestedScrollingEnabled(true);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
... ... @@ -213,19 +228,19 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onScrollToStart() {
// scroll.setNestedScrollingEnabled(false);
scroll.setNestedScrollingEnabled(false);
xrecyclerview.setNestedScrollingEnabled(true);
Log.e("zhangtao", "到顶部了");
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onScrollToEnd() {
// scroll.setNestedScrollingEnabled(false);
pageIndex++;
mPresenter.getPresenter(4, 2, resumeOid, String.valueOf(pageIndex), String.valueOf(pageSize));
Log.e("zhangtao", "到底部了");
if (pageIndex < totalPage) {
pageIndex++;
mPresenter.getPresenter(4, 2, resumeOid, String.valueOf(pageIndex), String.valueOf(pageSize));
Log.e("zhangtao", "到底部了");
} else {
return;
}
}
@Override
... ...
... ... @@ -124,7 +124,7 @@ public class CertificationCourseDetailAdapter extends BaseAdapter {
transaction.replace(R.id.frame, curriculumScheduleFragment, oid);
transaction.commit();
} else {
Toast.makeText(context, "您当前还没有权限哦~", Toast.LENGTH_SHORT).show();
Toast.makeText(context, "当前账号无权限,请拨打电话xxxxxxxxxx", Toast.LENGTH_SHORT).show();
}
}
... ... @@ -156,7 +156,7 @@ public class CertificationCourseDetailAdapter extends BaseAdapter {
SharedPrefrenceUtils.saveString(context, "PraticeTitle", title);
context.startActivity(intent);
} else {
Toast.makeText(context, "您当前还没有权限哦~", Toast.LENGTH_SHORT).show();
Toast.makeText(context, "当前账号无权限,请拨打电话xxxxxxxxxx", Toast.LENGTH_SHORT).show();
}
}
... ...
package com.hh.xuetubao.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
... ... @@ -47,6 +48,28 @@ public class ListAnswerAdapter extends BaseAdapter {
ImageView right = (ImageView) view.findViewById(R.id.img_right);
option.setText(list.get(position).getOptionName());
text.setText(list.get(position).getOptionDesc());
if (!TextUtils.isEmpty(selectString)) {
if (selectString.contains(list.get(position).getOptionName())) {
option.setTextColor(context.getResources().getColor(R.color.color_ff5400));
text.setTextColor(context.getResources().getColor(R.color.color_ff5400));
}
}
return view;
}
private String selectString;
public void setSelect(String answer) {
this.selectString = answer;
}
@Override
public boolean isEnabled(int position) {
if (!TextUtils.isEmpty(selectString)) {
return false;
} else {
return true;
}
}
}
... ...
... ... @@ -17,6 +17,8 @@ import java.util.List;
public class ListRecChildAdapter extends RecyclerView.Adapter<ListRecChildAdapter.ViewHolder> {
private Context context;
private List<ChapterLstBean.SectionLstObject> list;
private String lessonOid;
private String chapterOid;
public ListRecChildAdapter(Context context, List<ChapterLstBean.SectionLstObject> list) {
this.context = context;
... ... @@ -42,6 +44,11 @@ public class ListRecChildAdapter extends RecyclerView.Adapter<ListRecChildAdapte
ListRecSecondChildAdapter childAdapter = new ListRecSecondChildAdapter(resourceLst, context);
holder.recChild.setLayoutManager(new LinearLayoutManager(context));
holder.recChild.setAdapter(childAdapter);
childAdapter.setChapterOid(chapterOid);
childAdapter.setLessonOid(lessonOid);
childAdapter.setSectionOid(list.get(position).getSectionOid());
childAdapter.notifyDataSetChanged();
}
@Override
... ... @@ -60,4 +67,12 @@ public class ListRecChildAdapter extends RecyclerView.Adapter<ListRecChildAdapte
recChild = (RecyclerView) itemView.findViewById(R.id.rec_child);
}
}
public void setLessonOid(String lessonOid) {
this.lessonOid = lessonOid;
}
public void setChapterOid(String chapterOid) {
this.chapterOid = chapterOid;
}
}
... ...
... ... @@ -7,6 +7,7 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.hh.xuetubao.R;
... ... @@ -17,6 +18,8 @@ import java.util.List;
public class ListRecGroupAdapter extends RecyclerView.Adapter<ListRecGroupAdapter.ViewHolder> {
private List<ChapterLstBean.ChapterLstObject> list;
private Context context;
private String lessonOid;
private boolean clickDowm = true;
public ListRecGroupAdapter(List<ChapterLstBean.ChapterLstObject> list, Context context) {
this.list = list;
... ... @@ -32,7 +35,7 @@ public class ListRecGroupAdapter extends RecyclerView.Adapter<ListRecGroupAdapte
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
public void onBindViewHolder(@NonNull final ViewHolder holder, int position) {
if (list.get(position).getChapterName() != null)
holder.textView.setText(list.get(position).getChapterName());
... ... @@ -43,6 +46,23 @@ public class ListRecGroupAdapter extends RecyclerView.Adapter<ListRecGroupAdapte
ListRecChildAdapter childAdapter = new ListRecChildAdapter(context, sectionLst);
holder.recChild.setAdapter(childAdapter);
holder.recChild.setLayoutManager(new LinearLayoutManager(context));
childAdapter.setLessonOid(lessonOid);
childAdapter.setChapterOid(list.get(position).getChapterOid());
childAdapter.notifyDataSetChanged();
holder.imgDowm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (clickDowm) {
holder.recChild.setVisibility(View.GONE);
} else {
holder.recChild.setVisibility(View.VISIBLE);
}
clickDowm = !clickDowm;
}
});
}
@Override
... ... @@ -54,41 +74,19 @@ public class ListRecGroupAdapter extends RecyclerView.Adapter<ListRecGroupAdapte
private final TextView textView;
private final RecyclerView recChild;
private final ImageView imgDowm;
public ViewHolder(View itemView) {
super(itemView);
textView = (TextView) itemView.findViewById(R.id.title);
recChild = (RecyclerView) itemView.findViewById(R.id.rec_child);
imgDowm = (ImageView) itemView.findViewById(R.id.img_down);
}
}
}
/*
public class ListRecGroupAdapter extends BaseAdapter{
private List<ChapterLstBean.ChapterLstObject> list;
private Context context;
public ListRecGroupAdapter(List<ChapterLstBean.ChapterLstObject> list, Context context) {
this.list = list;
this.context = context;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
public void setLessonOid(String lessonOid) {
this.lessonOid = lessonOid;
}
@Override
public long getItemId(int position) {
return position;
}
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return null;
}
}*/
... ...
... ... @@ -19,6 +19,11 @@ import java.util.List;
public class ListRecSecondChildAdapter extends RecyclerView.Adapter<ListRecSecondChildAdapter.ViewHolder> {
private List<ChapterLstBean.ResourceLstObject> list;
private Context context;
private String lessonOid;
private String chapterOid;
private String resourceOid;
private String sectionOid;
public ListRecSecondChildAdapter(List<ChapterLstBean.ResourceLstObject> list, Context context) {
this.list = list;
... ... @@ -43,8 +48,9 @@ public class ListRecSecondChildAdapter extends RecyclerView.Adapter<ListRecSecon
@Override
public void onClick(View v) {
//将视频URL发送至CourseDetailActivity
Event event = new Event(1, list.get(position).getPlayUrl());
Event event = new Event(1, lessonOid,chapterOid,sectionOid,list.get(position).getResourceOid(),list.get(position).getPlayUrl());
EventBus.getDefault().postSticky(event);
}
});
... ... @@ -65,4 +71,18 @@ public class ListRecSecondChildAdapter extends RecyclerView.Adapter<ListRecSecon
content = (TextView) itemView.findViewById(R.id.content);
}
}
public void setLessonOid(String lessonOid) {
this.lessonOid = lessonOid;
}
public void setChapterOid(String chapterOid) {
this.chapterOid = chapterOid;
}
public void setSectionOid(String sectionOid) {
this.sectionOid = sectionOid;
}
}
... ...
... ... @@ -29,12 +29,14 @@ public class StudyTimeXrcAdapter extends RecyclerView.Adapter<StudyTimeXrcAdapte
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.rc_read_time, null);
/* View viewById = view.findViewById(R.id.view_long);
View viewById = view.findViewById(R.id.view_long);
ViewGroup.LayoutParams params = viewById.getLayoutParams();
int height = params.height;
Log.e("zhangtao", "柱状图高为" + height);
*//* params.height=600;
viewById.setLayoutParams(params);*/
params.height = 1200;
viewById.setLayoutParams(params);
ViewHolder holder = new ViewHolder(view);
return holder;
}
... ... @@ -46,7 +48,7 @@ public class StudyTimeXrcAdapter extends RecyclerView.Adapter<StudyTimeXrcAdapte
if (time.get(position) != null)
holder.tvTime.setText(day.get(position));
ViewGroup.LayoutParams params = holder.longView.getLayoutParams();
params.height=100;
params.height = 100;
holder.longView.setLayoutParams(params);
}
... ...
package com.hh.xuetubao.bean;
public class Event {
import java.io.Serializable;
public class Event implements Serializable {
private int code;
private String event;
private String lessonOid;
private String chapterOid;
private String sectionOid;
private String resourceOid;
private String playUrl;
public Event(int code, String lessonOid, String chapterOid, String sectionOid, String resourceOid, String playUrl) {
this.code = code;
this.lessonOid = lessonOid;
this.chapterOid = chapterOid;
this.sectionOid = sectionOid;
this.resourceOid = resourceOid;
this.playUrl = playUrl;
}
public int getCode() {
return code;
}
... ... @@ -12,16 +28,43 @@ public class Event {
this.code = code;
}
public String getEvent() {
return event;
public String getLessonOid() {
return lessonOid;
}
public void setEvent(String event) {
this.event = event;
public void setLessonOid(String lessonOid) {
this.lessonOid = lessonOid;
}
public Event(int code, String event) {
this.code = code;
this.event = event;
public String getChapterOid() {
return chapterOid;
}
public void setChapterOid(String chapterOid) {
this.chapterOid = chapterOid;
}
public String getSectionOid() {
return sectionOid;
}
public void setSectionOid(String sectionOid) {
this.sectionOid = sectionOid;
}
public String getResourceOid() {
return resourceOid;
}
public void setResourceOid(String resourceOid) {
this.resourceOid = resourceOid;
}
public String getPlayUrl() {
return playUrl;
}
public void setPlayUrl(String playUrl) {
this.playUrl = playUrl;
}
}
... ...
... ... @@ -11,7 +11,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hh.xuetubao.R;
import com.hh.xuetubao.Utils.SharedPrefrenceUtils;
... ... @@ -41,8 +40,7 @@ public class CurriculumScheduleFragment extends BaseMvpFragment<CommonPresenter,
Unbinder unbinder;
@BindView(R.id.rl_top)
RelativeLayout rlTop;
@BindView(R.id.tv_none)
TextView tvNone;
private CurriculumScheduleRecAdapter curriculumScheduleRecAdapter;
private String tag;
private List<FreeCourseBean.bean> list = new ArrayList<>();
... ... @@ -95,9 +93,6 @@ public class CurriculumScheduleFragment extends BaseMvpFragment<CommonPresenter,
list.addAll(lessonLst);
curriculumScheduleRecAdapter.notifyDataSetChanged();
tvNone.setVisibility(View.GONE);
} else {
tvNone.setVisibility(View.VISIBLE);
}
}
}
... ...
... ... @@ -7,10 +7,8 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.hh.xuetubao.R;
import com.hh.xuetubao.adapter.IntroduceGridAdapter;
import com.hh.xuetubao.bean.CourseDetailInfoBean;
... ... @@ -89,7 +87,7 @@ public class IntroduceFragment extends BaseMvpFragment<CommonPresenter, LearnMod
public void getData(Object o, int api, int intent) {
if (api == 2 && intent == 1) {
CourseDetailInfoBean bean = (CourseDetailInfoBean) o;
Log.e("zhangtao",bean.toString());
Log.e("zhangtao", bean.toString());
tvCount.setText(bean.getLearningPeopleCount());
if (bean.getLessonName() != null)
tvTitle.setText(bean.getLessonName());
... ... @@ -101,7 +99,7 @@ public class IntroduceFragment extends BaseMvpFragment<CommonPresenter, LearnMod
list.addAll(bean.getSkillLst());
gridAdapter.notifyDataSetChanged();
if (bean.getLessonCoverUrl() != null) {
Event event = new Event(2, bean.getLessonCoverUrl());
Event event = new Event(2, null, null, null, null, bean.getLessonCoverUrl());
EventBus.getDefault().postSticky(event);
}
... ...
... ... @@ -49,6 +49,7 @@ public class ListFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
recGroup.setLayoutManager(new LinearLayoutManager(getActivity()));
groupAdapter = new ListRecGroupAdapter(title, getActivity());
groupAdapter.setLessonOid(lessonOid);
recGroup.setAdapter(groupAdapter);
}
... ...
... ... @@ -67,6 +67,12 @@ public class PraticeWrongFragment extends BaseMvpFragment<CommonPresenter, Exerc
}
@Override
public void onResume() {
super.onResume();
mPresenter.getPresenter(6, 1, accountOid);
}
@Override
public void initData() {
mPresenter.getPresenter(6, 1, accountOid);
}
... ... @@ -84,6 +90,7 @@ public class PraticeWrongFragment extends BaseMvpFragment<CommonPresenter, Exerc
@Override
public void getData(Object o, int api, int intent) {
catalogLst.clear();
AnswerBean bean = (AnswerBean) o;
List<AnswerBean.CatalogLstBean> catalogLstBeans = bean.getCatalogLst();
... ...
... ... @@ -23,7 +23,7 @@ import butterknife.OnClick;
import butterknife.Unbinder;
/**
* 联系区分
* 练习区分
*/
public class PriacticeDistFragment extends BaseMvpFragment<CommonPresenter, MainModel> implements ICommonView {
@BindView(R.id.lin_back)
... ... @@ -103,12 +103,12 @@ public class PriacticeDistFragment extends BaseMvpFragment<CommonPresenter, Main
break;
case R.id.frag_pricatice_dist_sjlx: // - > 随机练习
intent = new Intent(getActivity(), AnswerSheetActivity.class);
intent.putExtra("catalogOid",catalogOid);
intent.putExtra("catalogOid", catalogOid);
startActivity(intent);
break;
case R.id.frag_pricatice_dist_mnks: // - > 模拟考试
intent = new Intent(getActivity(), MockExamActivity.class);
intent.putExtra("catalogOid",catalogOid);
intent.putExtra("catalogOid", catalogOid);
startActivity(intent);
break;
}
... ...
... ... @@ -42,8 +42,27 @@ public class ExerciseModel implements ICommonModel {
if (api == 7 && intent == 1)
GetWrongQuestionsByCatalogOid(commonView, api, intent, params);
if (api == 7 && intent == 2)
RemoveWrongQuestion(commonView, api, intent, params);
if (api == 8 && intent == 1)
GetRandomQuestions(commonView, api, intent, params);
}
private void RemoveWrongQuestion(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 7 && intent == 2)
mServers.RemoveWrongQuestion(params[0], params[1], Integer.valueOf(params[2]), params[3])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
@Override
public void onNext(Object value) {
super.onNext(value);
commonView.getData(value, api, intent);
}
});
}
private void GetRandomQuestions(final ICommonView commonView, final int api, final int intent, String... params) {
... ... @@ -93,7 +112,7 @@ public class ExerciseModel implements ICommonModel {
private void InsertWrongQuestion(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 4 && intent == 2)
mServers.InsertWrongQuestion(params[0], params[1], Integer.valueOf(params[2]))
mServers.InsertWrongQuestion(params[0], params[1], Integer.valueOf(params[2]), params[3])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
... ...
... ... @@ -48,8 +48,8 @@ public class LearnModel implements ICommonModel {
}
private void InsertLearningProgress(final ICommonView commonView, final int api, final int intent, String... params) {
// if (api == 6 && intent == 1)
/* mServers.InsertLearningProgress(params[0], params[1], params[2], params[3], params[4], Integer.valueOf(params[5]), Integer.valueOf(params[6]), Integer.valueOf(params[7]))
if (api == 6 && intent == 1)
mServers.InsertLearningProgress(params[0], params[1], params[2], params[3], params[4], Integer.valueOf(params[5]), Integer.valueOf(params[6]), Integer.valueOf(params[7]))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
... ... @@ -70,7 +70,7 @@ public class LearnModel implements ICommonModel {
super.onComplete();
commonView.onComplete(api);
}
});*/
});
}
private void GetHotLessonLst(final ICommonView commonView, final int api, final int intent, String... params) {
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_5" />
<solid android:color="#FEF5EE" />
<stroke android:color="@color/color_ff5400" android:width="@dimen/dp_1"/>
</shape>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_5" />
<solid android:color="@color/color_ff5400" />
</shape>
\ No newline at end of file
... ...
... ... @@ -26,9 +26,53 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_10"
android:text="ABB初级认证讲师"
android:text="倒计时 "
android:textColor="#232323"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_hour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="00"
android:textColor="#232323"
android:textSize="17sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text=":"
android:textColor="#232323"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_minute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="00"
android:textColor="#232323"
android:textSize="17sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text=":"
android:textColor="#232323"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="00"
android:textColor="#232323"
android:textSize="17sp" />
</LinearLayout>
<FrameLayout
... ... @@ -121,11 +165,13 @@
<RelativeLayout
android:id="@+id/rl_last"
android:layout_width="@dimen/dp_165"
android:layout_width="0dp"
android:layout_height="@dimen/dp_35"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="#FEF5EE">
android:layout_marginRight="@dimen/dp_5"
android:layout_weight="1"
android:background="@drawable/background_last">
<TextView
android:layout_width="wrap_content"
... ... @@ -138,12 +184,14 @@
<RelativeLayout
android:id="@+id/rl_next"
android:layout_width="@dimen/dp_165"
android:layout_width="0dp"
android:layout_height="@dimen/dp_35"
android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:background="#FF5400">
android:layout_weight="1"
android:background="@drawable/background_next">
<TextView
android:layout_width="wrap_content"
... ... @@ -210,9 +258,9 @@
<RelativeLayout
android:id="@+id/rl_card"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_20"
android:layout_toRightOf="@id/tv_wrong_num"
android:orientation="horizontal">
... ... @@ -244,6 +292,7 @@
android:text="/"
android:textColor="#999999"
android:textSize="12sp" />
<TextView
android:id="@+id/all"
android:layout_width="wrap_content"
... ... @@ -256,8 +305,6 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/commit"
android:layout_width="@dimen/dp_80"
... ... @@ -266,7 +313,8 @@
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_solid_14_ff5400"
android:gravity="center">
android:gravity="center"
android:visibility="gone">
<ImageView
android:layout_width="@dimen/dp_11"
... ... @@ -283,14 +331,15 @@
</LinearLayout>
<!--<TextView-->
<!--android:id="@+id/tv_card"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_alignParentRight="true"-->
<!--android:layout_centerVertical="true"-->
<!--android:layout_marginRight="@dimen/dp_20"-->
<!--android:text="展开答题卡" />-->
<TextView
android:id="@+id/tv_show_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:text="展开答题卡" />
</RelativeLayout>
... ...
... ... @@ -121,11 +121,13 @@
<RelativeLayout
android:id="@+id/rl_last"
android:layout_width="@dimen/dp_165"
android:layout_marginRight="@dimen/dp_5"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/dp_35"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="#FEF5EE">
android:background="@drawable/background_last">
<TextView
android:layout_width="wrap_content"
... ... @@ -138,12 +140,14 @@
<RelativeLayout
android:id="@+id/rl_next"
android:layout_width="@dimen/dp_165"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/dp_35"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_20"
android:background="#FF5400">
android:background="@drawable/background_next">
<TextView
android:layout_width="wrap_content"
... ... @@ -257,39 +261,43 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/commit"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_28"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_solid_14_ff5400"
android:gravity="center">
<LinearLayout
android:visibility="gone"
android:id="@+id/commit"
android:layout_width="@dimen/dp_80"
android:layout_height="@dimen/dp_28"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_solid_14_ff5400"
android:gravity="center">
<ImageView
android:layout_width="@dimen/dp_11"
android:layout_height="@dimen/dp_13"
android:src="@mipmap/itemimg" />
<ImageView
android:layout_width="@dimen/dp_11"
android:layout_height="@dimen/dp_13"
android:src="@mipmap/itemimg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_4"
android:text="交卷"
android:textColor="@color/color_ffffff"
android:textSize="@dimen/sp_12" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_4"
android:text="交卷"
android:textColor="@color/color_ffffff"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_look"
android:id="@+id/tv_show_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/commit"
android:gravity="center_vertical"
android:layout_marginRight="@dimen/dp_20"
android:text="看答案" />
android:text="展开答题卡"
android:textColor="#999999"
android:textSize="12sp" />
</RelativeLayout>
... ... @@ -348,8 +356,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/tv1"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_15"
android:layout_toRightOf="@id/tv2"
android:text="你猜猜到底为啥这道题是对的!我也不知道。" />
android:text="当前无解析!" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
... ...
... ... @@ -121,11 +121,13 @@
<RelativeLayout
android:id="@+id/rl_last"
android:layout_width="@dimen/dp_165"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginRight="@dimen/dp_5"
android:layout_height="@dimen/dp_35"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="#FEF5EE">
android:background="@drawable/background_last">
<TextView
android:layout_width="wrap_content"
... ... @@ -138,12 +140,14 @@
<RelativeLayout
android:id="@+id/rl_next"
android:layout_width="@dimen/dp_165"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginLeft="@dimen/dp_5"
android:layout_height="@dimen/dp_35"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:background="#FF5400">
android:background="@drawable/background_next">
<TextView
android:layout_width="wrap_content"
... ...
... ... @@ -39,7 +39,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/rl_top"
android:focusable="false"
android:scrollbars="none">
<RelativeLayout
... ...
... ... @@ -41,13 +41,4 @@
android:layout_below="@id/rl_top"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20" />
<TextView
android:id="@+id/tv_none"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="您的账号当前没有权限哦~"
android:textColor="#AAAAAA"
android:textSize="14sp" />
</RelativeLayout>
\ No newline at end of file
... ...
... ... @@ -69,13 +69,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="@drawable/coners_5_stoke"
android:background="@drawable/coners_5_orange"
android:paddingLeft="@dimen/dp_25"
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/dp_25"
android:paddingBottom="@dimen/dp_10"
android:text="现在交卷"
android:textColor="#999999"
android:textColor="#FFFFFF"
android:textSize="13sp" />
</LinearLayout>
... ...
... ... @@ -21,6 +21,7 @@
android:textSize="15sp" />
<ImageView
android:id="@+id/img_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
... ...