作者 liming

Merge branch 'master' of http://114.215.101.231:8099/zhangtao/huahang_project

# Conflicts:
#	app/src/main/java/com/hh/xuetubao/activity/pratice/MockExamActivity.java
#	app/src/main/java/com/hh/xuetubao/model/ExerciseModel.java
正在显示 69 个修改的文件 包含 1355 行增加433 行删除
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
... ...
... ... @@ -73,6 +73,11 @@
<activity
android:name=".activity.personal.ResumeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.study.WebActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.personal.MessageActivity"
android:screenOrientation="portrait" />
... ...
... ... @@ -441,7 +441,7 @@ public interface MyServer {
* @return
*/
@GET("GetProvinceList")
Observable<AddressBean> GetProvinceList(@Query("IsAll") boolean IsAll);
Observable<AddressBean> GetProvinceList(@Query("IsAll") boolean IsAll, @Query("RegionType") String RegionType);
/**
* 获取城市列表接口
... ... @@ -451,7 +451,7 @@ public interface MyServer {
* @return
*/
@GET("GetCityListByProvince")
Observable<AddressBean> GetCityListByProvince(@Query("ProvinceId") String ProvinceId, @Query("IsAll") boolean IsAll);
Observable<AddressBean> GetCityListByProvince(@Query("ProvinceId") String ProvinceId, @Query("IsAll") boolean IsAll, @Query("RegionType") String RegionType);
/**
* 获取职位查询属性列表接口
... ... @@ -557,4 +557,23 @@ public interface MyServer {
@GET("DeleteExamRecordInfo")
Observable<UserBean> DeleteExamRecordInfo(@Query("oid") String oid);
/**
* 保存答题结果接口
*
* @param accountOid 用户ID
* @param catalogOid 题库分类ID
* @param examScore 考试最终得分
* @param answerNum 答题的最终数量
* @param useSecond 用时多少秒
* @return
*/
@GET("InsertSimExamRecord")
Observable<UserBean> InsertSimExamRecord(
@Query("accountOid") String accountOid,
@Query("catalogOid") String catalogOid,
@Query("examScore") Double examScore,
@Query("answerNum") int answerNum,
@Query("useSecond") int useSecond
);
}
\ No newline at end of file
... ...
... ... @@ -9,6 +9,7 @@ import android.graphics.Path;
import android.graphics.Point;
import android.graphics.Rect;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
... ... @@ -111,7 +112,12 @@ public class WaveView extends View {
int baseline = (targetRect.bottom + targetRect.top - fontMetrics.bottom - fontMetrics.top) / 2;
// 下面这行是实现水平居中,drawText对应改为传入targetRect.centerX()
textPaint.setTextAlign(Paint.Align.CENTER);
canvas.drawText(progress + "分", targetRect.centerX(), baseline, textPaint);
if(!TextUtils.isEmpty(text)){
canvas.drawText(progress + text, targetRect.centerX(), baseline, textPaint);
}else{
canvas.drawText(progress + "分", targetRect.centerX(), baseline, textPaint);
}
}
/**
... ... @@ -235,6 +241,15 @@ public class WaveView extends View {
invalidate();
}
private String text;
public void setText(String text) {
if (!TextUtils.isEmpty(text)) {
this.text = text;
}
invalidate();
}
/**
* 通过动画设置当前进度
*
... ...
... ... @@ -214,6 +214,9 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel
Toast.makeText(LoginActivity.this, "请检查是否安装该应用", Toast.LENGTH_SHORT).show();
return;
}
for (String s : map.keySet()) {
Log.e("mapkeySet", s.toString());
}
String openid = map.get("openid"); // openid
String name = map.get("name"); // name
... ... @@ -228,12 +231,13 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel
//头像
String iconurl = map.get("iconurl");
mPresenter.getPresenter(1, 6, openid, "2"); // android
Log.e("openid", openid + "");
// mPresenter.getPresenter(1, 6, openid, "2"); // android
}
@Override
public void onError(SHARE_MEDIA platform, int action, Throwable t) {
Log.e("Throwable", t.getMessage().toString());
}
@Override
... ...
... ... @@ -57,6 +57,12 @@ public class InfromationActivity extends BaseMvpActivity<CommonPresenter, Person
Log.e("resumeOid", resumeOid + "");
String name = SharedPrefrenceUtils.getString(InfromationActivity.this, "UserName");
if(name != null){
tvName.setText(name);
tvUser.setText(name);
}
String reallHeader = SharedPrefrenceUtils.getString(this, "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(this, "HeadPic");
if (!TextUtils.isEmpty(headPic)) {
... ... @@ -167,10 +173,16 @@ public class InfromationActivity extends BaseMvpActivity<CommonPresenter, Person
public void getData(Object o, int api, int intent) {
if (api == 3 && intent == 1) {
UserBean bean = (UserBean) o;
Log.e("UserBean",bean.toString());
String name = SharedPrefrenceUtils.getString(InfromationActivity.this, "UserName");
if (bean.getUserName() != null) {
level += 1;
tvName.setText(bean.getUserName());
tvUser.setText(bean.getUserName());
}else if(name != null){
tvName.setText(name);
tvUser.setText(name);
}
if (!TextUtils.isEmpty(bean.getCompany())) {
level += 1;
... ...
... ... @@ -81,6 +81,10 @@ public class AnswerMarkActivity extends BaseMvpActivity<CommonPresenter, Exercis
TranscriptBean bean = (TranscriptBean) o;
List<TranscriptBean.RecordLstBean> beanRecordLst = bean.getRecordLst();
countTest.setText(String.valueOf(bean.getExamTotalNum()));
countPass.setText(String.valueOf(bean.getExamPassNum()));
countAnswer.setText(String.valueOf(bean.getExamAnswerNum()));
if (beanRecordLst != null)
recordLst.addAll(beanRecordLst);
markAdapter.notifyDataSetChanged();
... ...
... ... @@ -51,7 +51,10 @@ public class AnswerResultActivity extends BaseMvpActivity<CommonPresenter, MainM
public void initView() {
int rightCount = getIntent().getIntExtra("rightCount", 0);
int wrongCount = getIntent().getIntExtra("wrongCount", 0);
int allCount = getIntent().getIntExtra("allCount", 0);
String cataloglst = getIntent().getStringExtra("cataloglst");
int trueWrong=allCount-rightCount;
cataLogLst = SharedPrefrenceUtils.getStringList(this, "CataLogLst");
accountOid = SharedPrefrenceUtils.getString(this, "AccountOid");
for (int i = 0; i < cataLogLst.size(); i++) {
... ... @@ -62,13 +65,14 @@ public class AnswerResultActivity extends BaseMvpActivity<CommonPresenter, MainM
tvRight.setText(String.valueOf(rightCount));
tvWrong.setText(String.valueOf(wrongCount));
tvWrong.setText(String.valueOf(trueWrong));
tvNext.setOnClickListener(this);
ZomCount = rightCount + wrongCount;
zql = (rightCount / ZomCount) * 100;
waveview.setProgress(zql);
double i = rightCount / (double) allCount;
double b = i * 100;
waveview.setProgress((int) b);
waveview.setText("%");
}
... ...
... ... @@ -398,7 +398,7 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
doRefresh();
selectAnswer = "";
} else if (currentIndex == maxTopic - 1) {
Toast.makeText(this,"当前已是最后一题",Toast.LENGTH_SHORT).show();
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
tvShowCard.setVisibility(View.GONE);
commit.setVisibility(View.VISIBLE);
}
... ... @@ -464,7 +464,7 @@ public class AnswerSheetActivity extends BaseMvpActivity<CommonPresenter, Exerci
rlAnswer.setVisibility(View.INVISIBLE);
if(!answerSelect.get(currentIndex).equals("0")){
if (!answerSelect.get(currentIndex).equals("0")) {
optionsAdapter.setSelect(answerSelect.get(currentIndex));
optionsAdapter.notifyDataSetChanged();
listAnswer.setItemsCanFocus(false);
... ...
... ... @@ -4,7 +4,6 @@ import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
... ... @@ -15,6 +14,7 @@ import com.hh.xuetubao.R;
import com.hh.xuetubao.Utils.SharedPrefrenceUtils;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.ExerciseModel;
import com.hh.xuetubao.model.PersonalModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
... ... @@ -54,10 +54,17 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
@Override
public void initView() {
resumeOid = SharedPrefrenceUtils.getString(this, "AccountOid");
catalogOid = getIntent().getStringExtra("catalogOid") + "";
catalogOid = getIntent().getStringExtra("catalogOid");
String reallHeader = SharedPrefrenceUtils.getString(this, "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(this, "HeadPic");
if (!TextUtils.isEmpty(headPic)) {
Glide.with(this).load(headPic).into(image);
} else if (!TextUtils.isEmpty(reallHeader)) {
Glide.with(this).load(reallHeader).into(image);
}
Log.e("resumeOid", resumeOid);
Log.e("catalogOid", catalogOid);
linTrain.setOnClickListener(this);
}
... ... @@ -70,7 +77,9 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
@Override
public void initData() {
mPresenter.getPresenter(3, 1, catalogOid, resumeOid);
mPresenter.getPresenter( 5, 4, resumeOid);
PersonalModel model = new PersonalModel();
model.getModel(this, 2, 1, resumeOid);
}
@Override
... ... @@ -96,30 +105,22 @@ public class MockExamActivity extends BaseMvpActivity<CommonPresenter, ExerciseM
if (bean.getExamType() != null)
content.setText(bean.getExamType());
}
if (api == 5 && intent == 4) {
}
if (api == 2 && intent == 1) {
UserBean bean = (UserBean) o;
String userName = SharedPrefrenceUtils.getString(MockExamActivity.this, "UserName");
if (bean.getUserName() != null) {
name.setText(bean.getUserName());
}else {
name.setText(userName);
SharedPrefrenceUtils.saveString(this, "UserName", bean.getUserName());
}
String reallHeader = SharedPrefrenceUtils.getString(MockExamActivity.this, "ReallHeader");
String headPic = SharedPrefrenceUtils.getString(MockExamActivity.this, "HeadPic");
if (!TextUtils.isEmpty(headPic)) {
Glide.with(this).load(headPic).into(image);
} else if (!TextUtils.isEmpty(reallHeader)) {
Glide.with(this).load(reallHeader).into(image);
} else if (bean.getHeadPic() != null && !bean.getHeadPic().equals("")) {
Glide.with(MockExamActivity.this).load(bean.getHeadPic()).into(image);
if (bean.getLoginName() != null) {
SharedPrefrenceUtils.saveString(this, "LoginName", bean.getLoginName());
}
if (!TextUtils.isEmpty(bean.getUserName())) {
name.setText(bean.getUserName());
} else if (!TextUtils.isEmpty(bean.getLoginName())) {
name.setText(bean.getLoginName());
}
}
}
@Override
... ...
... ... @@ -6,6 +6,7 @@ import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.RadioButton;
import com.hh.xuetubao.MainActivity;
import com.hh.xuetubao.R;
import com.hh.xuetubao.activity.work.JobHuntActivity;
import com.hh.xuetubao.fragment.HomeFragment;
... ... @@ -102,7 +103,6 @@ public class PracticeActivity extends BaseMvpActivity<CommonPresenter, MainModel
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
... ... @@ -115,7 +115,7 @@ public class PracticeActivity extends BaseMvpActivity<CommonPresenter, MainModel
homeFragment = new HomeFragment();
switch (v.getId()) {
case R.id.rl_home:
startActivity(new Intent(PracticeActivity.this, JobHuntActivity.class));
startActivity(new Intent(PracticeActivity.this, MainActivity.class));
this.finish();
break;
case R.id.rl_pratice:
... ...
... ... @@ -7,7 +7,6 @@ import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
... ... @@ -37,8 +36,6 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
TextView tvTitle;
@BindView(R.id.lin_tab)
RelativeLayout linTab;
@BindView(R.id.tv_time)
TextView tvTime;
@BindView(R.id.tv3)
TextView tv3;
@BindView(R.id.tv5)
... ... @@ -65,6 +62,8 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
RelativeLayout rlReStart;
@BindView(R.id.tv_delete)
TextView tvDelete;
@BindView(R.id.tv_time)
TextView tvTime;
private String catalogOid;
private Intent intent;
private String thisCatalogOid;
... ... @@ -81,6 +80,8 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
Integer danxuanWrong = getIntent().getIntExtra("danxuanWrong", 0);
Integer duoxuanWrongt = getIntent().getIntExtra("duoxuanWrong", 0);
Integer panduanWrong = getIntent().getIntExtra("panduanWrong", 0);
Integer time = getIntent().getIntExtra("time", 0);
Log.e("zhangtao", String.valueOf(duoxuanWrongt) + "-------------");
... ... @@ -99,6 +100,8 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
tv13.setText(getFormat(duoxuanCount, duoxuanWrongt) + "%");
tv19.setText(getFormat(panduanCount, panduanWrong) + "%");
tvTime.setText(String.valueOf(time));
int i = danxuanWrong + duoxuanWrongt + panduanWrong;
tv22.setText(String.valueOf(i));
... ... @@ -193,7 +196,7 @@ public class TestScoreActivity extends BaseMvpActivity<CommonPresenter, Exercise
startActivity(intent);
break;
case R.id.tv_delete:
Toast.makeText(this,"1",Toast.LENGTH_SHORT).show();
Toast.makeText(this, "1", Toast.LENGTH_SHORT).show();
mPresenter.getPresenter(9, 1, thisCatalogOid);
break;
... ...
... ... @@ -39,7 +39,6 @@ import butterknife.ButterKnife;
*/
public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implements ICommonView, View.OnClickListener {
@BindView(R.id.list_answer)
ListView listAnswer;
@BindView(R.id.tv_radio)
... ... @@ -99,7 +98,10 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
private List<String> stringList = new ArrayList<>();//用来存放多选题选择的答案
private List<String> historyAnswer = new ArrayList<>();//存放历史选择的答案
private boolean isRight;
private double totalScore;
private double danxuan;
private double duoxuan;
private double panduan;
@Override
public void initView() {
... ... @@ -142,6 +144,7 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
} catch (Exception e) {
Log.e("xuetubao:", e.toString());
}
historyAnswer.set(listIndex, selectAnswer);
//判断 单选题 是否答对
if (rightAnswer.contains(selectAnswer)) {
... ... @@ -171,10 +174,15 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
statusList.set(listIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try {
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
}catch (Exception e){
}
optionsAdapter.setRight(rightAnswer);
optionsAdapter.setRight(rightAnswer,selectAnswer);
optionsAdapter.notifyDataSetChanged();
}
... ... @@ -203,6 +211,8 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
Log.e("xuetubao:", e.toString());
}
historyAnswer.set(listIndex, selectAnswer);
for (int i = 0; i < stringList.size(); i++) {
if (rightAnswer.contains(stringList.get(i))) {
integerList.add(1);
... ... @@ -238,10 +248,14 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
statusList.set(listIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try{
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
}catch (Exception e){
}
optionsAdapter.setRight(rightAnswer);
optionsAdapter.setRight(rightAnswer,selectAnswer);
optionsAdapter.notifyDataSetChanged();
} else if (isRight && rightAnswer.length() == selectAnswer.length()) {
... ... @@ -264,6 +278,7 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
}
historyAnswer.set(listIndex, selectAnswer);
}
});
... ... @@ -317,15 +332,20 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
for (AnswerBean.QuestionLstBean a : questionLst) {
statusList.add(0);
historyAnswer.add("0");
}
sheetGridAdapter = new AnswerSheetGridAdapter(statusList, this);
danxuan = bean.getRadioScore();
duoxuan = bean.getMultipleScore();
panduan = bean.getJudgeScore();
}
}
private void doRefresh(boolean isNext) {
historyAnswer.add(selectAnswer);
// historyAnswer.add(selectAnswer);
integerList.clear();
selectAnswer = "";
... ... @@ -347,17 +367,19 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
listAnswer.setAdapter(optionsAdapter);
optionsAdapter.notifyDataSetChanged();
if (listIndex == questionLst.size() - 1) {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
tvShowCard.setVisibility(View.GONE);
commit.setVisibility(View.VISIBLE);
}
if (historyAnswer.size() > listIndex) {
if (!historyAnswer.get(listIndex).equals("0")) {
optionsAdapter.setSelect(historyAnswer.get(listIndex));
optionsAdapter.notifyDataSetInvalidated();
if (TextUtils.isEmpty(historyAnswer.get(listIndex))) {
rlAnswer.setVisibility(View.GONE);
} else {
rlAnswer.setVisibility(View.VISIBLE);
}
rlAnswer.setVisibility(View.VISIBLE);
} else {
rlAnswer.setVisibility(View.GONE);
}
}
... ... @@ -428,7 +450,7 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
if (listIndex < questionLst.size() - 1) {
if (type.contains("多选")) {
if (!TextUtils.isEmpty(selectAnswer)&&type.contains("多选")) {
if (selectAnswer.length() != rightAnswer.length()) {
statusList.set(listIndex, 2);
}
... ... @@ -442,7 +464,9 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
listIndex++;
doRefresh(true);
doRefresh(true);
// doRefresh(true);
} else if (listIndex == questionLst.size() - 1) {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
... ... @@ -470,6 +494,7 @@ public class a extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
intent.putExtra("rightCount", rightCount);
intent.putExtra("wrongCount", wrongCount);
intent.putExtra("cataloglst", catalogOid);
intent.putExtra("allCount",questionLst.size());
startActivity(intent);
break;
case R.id.tv_show_card:
... ...
... ... @@ -74,7 +74,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
LinearLayout linTab;
@BindView(R.id.rl_card)
RelativeLayout rlCard;
// @BindView(R.id.right_select)
// @BindView(R.id.right_select)
// TextView rightSelect;
// @BindView(R.id.right_answer)
// TextView rightAnswerText;
... ... @@ -82,7 +82,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
// RelativeLayout rlAnswer;
@BindView(R.id.commit)
LinearLayout commit;
// @BindView(R.id.tv2)
// @BindView(R.id.tv2)
// TextView tv2;
@BindView(R.id.tv_show_card)
TextView tvShowCard;
... ... @@ -108,7 +108,6 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
private List<String> historyAnswer = new ArrayList<>();//存放历史选择的答案
private List<String> listRightAnswer = new ArrayList<>();
private boolean isRight;
private int unDone;//未完成的题
private int danxuanCount;
private int duoxuanCount;
private int panduanCount;
... ... @@ -121,6 +120,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
private double panduan;
private int longTime;
private int thisTime;
private int unDone;
private CountDownTimer timer;
... ... @@ -185,23 +185,29 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
} else if (!rightAnswer.contains(selectAnswer)) {
if (type.equals("单选")) {
danxuanWrong++;
} else if (type.equals("判断")) {
panduanWrong++;
}
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
statusList.set(listIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try {
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
} catch (Exception e) {
}
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
if (type.contains("单选")) {
danxuanWrong++;
} else if (type.contains("判断")) {
panduanWrong++;
}
}
... ... @@ -262,8 +268,11 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
statusList.set(listIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try {
String questionOid = questionLst.get(listIndex).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
} catch (Exception e) {
}
/* optionsAdapter.setRight(rightAnswer);
optionsAdapter.notifyDataSetChanged();*/
... ... @@ -289,6 +298,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
}
historyAnswer.set(listIndex, selectAnswer);
}
});
... ... @@ -360,6 +370,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
for (AnswerBean.QuestionLstBean a : questionLst) {
statusList.add(0);
historyAnswer.add("0");
}
sheetGridAdapter = new AnswerSheetGridAdapter(statusList, this);
... ... @@ -388,6 +399,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
intent.putExtra("panduanWrong", panduanCount);
intent.putExtra("duoxuanWrong", duoxuanCount);
intent.putExtra("totalScore", totalScore);
intent.putExtra("time", thisTime);
startActivity(intent);
b.this.finish();
} else {
... ... @@ -411,6 +423,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
intent.putExtra("panduanWrong", panduanWrong);
intent.putExtra("duoxuanWrong", duoxuanWrong);
intent.putExtra("totalScore", totalScore);
intent.putExtra("time", thisTime);
startActivity(intent);
b.this.finish();
}
... ... @@ -422,7 +435,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
private void doRefresh(boolean isNext) {
historyAnswer.add(selectAnswer);
// historyAnswer.add(selectAnswer);
listRightAnswer.add(rightAnswer);
integerList.clear();
... ... @@ -441,12 +454,19 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
// rightAnswerText.setText(questionLst.get(listIndex).getWrongAnaly());
// rlAnswer.setVisibility(View.GONE);
optionsAdapter = new ListAnswerAdapter(questionLst.get(listIndex).getOptionsLst(), this);
optionsAdapter = new ListAnswerAdapter(questionLst.get(listIndex).getOptionsLst(), this);
listAnswer.setAdapter(optionsAdapter);
optionsAdapter.notifyDataSetChanged();
if (historyAnswer.size() > listIndex) {
if (listIndex == questionLst.size() - 1) {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
tvShowCard.setVisibility(View.GONE);
commit.setVisibility(View.VISIBLE);
}
if (!historyAnswer.get(listIndex).equals("0")) {
optionsAdapter.setSelect(historyAnswer.get(listIndex));
optionsAdapter.notifyDataSetInvalidated();
... ... @@ -502,7 +522,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
circular.setBackWidth(20);
circular.setProgWidth(20);
circular.setMaxProgress(questionLst.size());
circular.setProgress(questionLst.size()-laveCount);
circular.setProgress(questionLst.size() - laveCount);
count.setText(String.valueOf(laveCount));
... ... @@ -531,9 +551,21 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
intent.putExtra("panduanWrong", panduanWrong);
intent.putExtra("duoxuanWrong", duoxuanWrong);
intent.putExtra("totalScore", totalScore);
intent.putExtra("time", thisTime);
Log.e("zhangtao", totalScore + "分");
Log.e("zhangtao:catalogOid", catalogOid + "");
Log.e("zhangtao:danxuanCount", danxuanCount + "分");
Log.e("zhangtao:duoxuanCount", duoxuanCount + "分");
Log.e("zhangtao:panduanCount", panduanCount + "分");
Log.e("zhangtao;danxuanWrong", danxuanWrong + "分");
Log.e("zhangtao;danxuanWrong", duoxuanWrong + "分");
startActivity(intent);
startActivity(intent);
startActivity(intent);
b.this.finish();
mPresenter.getPresenter(10, 1, accountOid, catalogOid, String.valueOf(totalScore), String.valueOf(unDone), String.valueOf(thisTime));
}
});
... ... @@ -582,7 +614,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
case R.id.rl_next:
if (listIndex < questionLst.size() - 1) {
if (type.contains("多选")) {
if (!TextUtils.isEmpty(selectAnswer) && type.contains("多选")) {
if (selectAnswer.length() != rightAnswer.length()) {
statusList.set(listIndex, 2);
}
... ... @@ -593,10 +625,20 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
unDone++;
wrongCount++;
statusList.set(listIndex, 0);
} else if (listIndex <= questionLst.size() - 1) {
if (type.contains("单选")) {
danxuanWrong++;
} else if (type.contains("判断")) {
panduanWrong++;
} else if (type.contains("多选")) {
duoxuanWrong++;
}
}
}
listIndex++;
doRefresh(true);
} else if (listIndex == questionLst.size() - 1) {
... ... @@ -625,7 +667,6 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
} else if (listIndex == questionLst.size() - 1) {
if (TextUtils.isEmpty(selectAnswer)) {
unDone++;
if (type.contains("单选")) {
danxuanWrong++;
} else if (type.contains("判断")) {
... ... @@ -635,7 +676,7 @@ public class b extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
}
}
showCommitCard(this, unDone);
showCommitCard(this, questionLst.size() - rightCount - wrongCount);
chageAlpha(0.5f);
break;
case R.id.tv_show_card:
... ...
... ... @@ -135,6 +135,7 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
listAnswer.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
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);
... ... @@ -178,19 +179,32 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
totalScore += panduan;
}
String questionOid = questionLst.get(position).getQuestionOid();
mPresenter.getPresenter(7, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try {
String questionOid = questionLst.get(position).getQuestionOid();
mPresenter.getPresenter(7, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
} catch (Exception e) {
}
rlAnswer.setVisibility(View.GONE);
} else if (!rightAnswer.contains(selectAnswer)) {
rlAnswer.setVisibility(View.VISIBLE);
wrongCount++;
tvWrongNum.setText(String.valueOf(wrongCount));
statusList.set(listIndex, 2);
sheetGridAdapter.notifyDataSetChanged();
String questionOid = questionLst.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
try {
String questionOid = questionLst.get(position).getQuestionOid();
mPresenter.getPresenter(4, 2, accountOid, questionOid, String.valueOf(1), catalogOid);
} catch (Exception e) {
}
text.setTextColor(getResources().getColor(R.color.color_ff5400));
option.setTextColor(getResources().getColor(R.color.color_ff5400));
... ... @@ -271,7 +285,12 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
duoxuanWrong++;
rlAnswer.setVisibility(View.VISIBLE);
} else if (isRight && rightAnswer.length() == selectAnswer.length()) {
rlAnswer.setVisibility(View.GONE);
isClickAble = false;
rightCount++;
tvRightNum.setText(String.valueOf(rightCount));
... ... @@ -287,6 +306,7 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
}
historyAnswer.set(listIndex, selectAnswer);
}
});
... ... @@ -322,7 +342,9 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
AnswerBean bean = (AnswerBean) o;
List<AnswerBean.QuestionLstBean> questionLstBeans = bean.getQuestionLst();
questionLst.addAll(questionLstBeans);
if (questionLstBeans.size() != 0)
questionLst.addAll(questionLstBeans);
danxuanCount = bean.getRadioCount();
duoxuanCount = bean.getMultipleCount();
... ... @@ -350,6 +372,7 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
for (AnswerBean.QuestionLstBean a : questionLst) {
statusList.add(0);
historyAnswer.add("0");
}
sheetGridAdapter = new AnswerSheetGridAdapter(statusList, this);
... ... @@ -358,7 +381,7 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
private void doRefresh(boolean isNext) {
historyAnswer.add(selectAnswer);
// historyAnswer.add(selectAnswer);
integerList.clear();
selectAnswer = "";
... ... @@ -381,7 +404,11 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
optionsAdapter.notifyDataSetChanged();
if (historyAnswer.size() > listIndex) {
if (listIndex == questionLst.size() - 1) {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
}
if (!historyAnswer.get(listIndex).equals("0")) {
optionsAdapter.setSelect(historyAnswer.get(listIndex));
optionsAdapter.notifyDataSetInvalidated();
... ... @@ -505,6 +532,7 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
listIndex--;
doRefresh(false);
}
break;
case R.id.rl_next:
if (listIndex < questionLst.size() - 1) {
... ... @@ -524,8 +552,8 @@ public class c extends BaseMvpActivity<CommonPresenter, ExerciseModel> implement
}
listIndex++;
doRefresh(true);
doRefresh(true);
} else if (listIndex == questionLst.size() - 1) {
Toast.makeText(this, "当前已是最后一题", Toast.LENGTH_SHORT).show();
}
... ...
package com.hh.xuetubao.activity.study;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever;
... ... @@ -281,7 +282,11 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
public void onShowThumbnail(ImageView ivThumbnail) {
switch (urlA.substring(urlA.length() - 3, urlA.length()).trim()) {
case "tml":
Toast.makeText(CourseDetailActivity_Video.this, "链接需网页打开", Toast.LENGTH_SHORT).show();
// 跳转
// Intent intent = new Intent(CourseDetailActivity_Video.this, WebActivity.class);
// intent.putExtra("tml",urlA);
// startActivity(intent);
// Toast.makeText(CourseDetailActivity_Video.this, "链接需网页打开", Toast.LENGTH_SHORT).show();
break;
default: // mp4 , wav ..
ivThumbnail.setImageBitmap(getNetVideoBitmap(urlA));
... ... @@ -296,8 +301,13 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
time_video.setText(play.getDuration() + "");
course_A.setVisibility(View.VISIBLE);
course_B.setVisibility(View.GONE);
if ((urlA.substring(urlA.length() - 3, urlA.length())).trim().equals("tml")) {
course_A.setVisibility(View.GONE);
course_B.setVisibility(View.VISIBLE);
}else {
course_A.setVisibility(View.VISIBLE);
course_B.setVisibility(View.GONE);
}
}
... ... @@ -315,7 +325,12 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
public void onShowThumbnail(ImageView ivThumbnail) {
switch (url.substring(url.length() - 3, url.length()).trim()) {
case "tml":
Toast.makeText(CourseDetailActivity_Video.this, "链接需网页打开", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(CourseDetailActivity_Video.this, WebActivity.class);
intent.putExtra("tml",url);
startActivity(intent);
// Toast.makeText(CourseDetailActivity_Video.this, "链接需网页打开", Toast.LENGTH_SHORT).show();
break;
default: // mp4 , wav ..
ivThumbnail.setImageBitmap(getNetVideoBitmap(url));
... ... @@ -327,8 +342,14 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
.setPlaySource((url.substring(url.length() - 3, url.length())).trim().equals("tml") ? "" : url)
.startPlay();
course_A.setVisibility(View.VISIBLE);
course_B.setVisibility(View.GONE);
if ((url.substring(url.length() - 3, url.length())).trim().equals("tml")) {
course_A.setVisibility(View.GONE);
course_B.setVisibility(View.VISIBLE);
}else {
course_A.setVisibility(View.VISIBLE);
course_B.setVisibility(View.GONE);
}
}
private Handler handler = new Handler() {
... ...
... ... @@ -31,6 +31,7 @@ import com.hh.xuetubao.mvp.ICommonView;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
... ... @@ -76,6 +77,10 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
private String resumeOid;
private int totalPage;
List<Integer> arr = new ArrayList<>();
int max;
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void initView() {
... ... @@ -89,19 +94,16 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
xrecyclerview.setNestedScrollingEnabled(false);
scroll.setNestedScrollingEnabled(true);
LinearLayoutManager manager = new LinearLayoutManager(this);
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
rvReadTime.setLayoutManager(manager);
xrcAdapter = new StudyTimeXrcAdapter(this, day, time);
xrcAdapter = new StudyTimeXrcAdapter(this, day, time, max);
rvReadTime.setAdapter(xrcAdapter);
HashMap<String, Integer> stringIntegerHashMap = new HashMap<>();
stringIntegerHashMap.put(RecyclerViewSpacesItemDecoration.RIGHT_DECORATION, 25);//右间距
rvReadTime.addItemDecoration(new RecyclerViewSpacesItemDecoration(stringIntegerHashMap));
scroll.setFocusable(false);
scroll.setFocusableInTouchMode(false);
... ... @@ -186,6 +188,12 @@ public class StudyNoteActivity extends BaseMvpActivity<CommonPresenter, LearnMod
day.addAll(datas);
time.addAll(categories);
for (int i = 0; i < day.size(); i++) {
arr.add(Integer.valueOf(day.get(i).substring(0, day.get(i).length() - 2)));
}
max = Collections.max(arr);
xrcAdapter.notifyDataSetChanged();
}
... ...
package com.hh.xuetubao.activity.study;
import android.annotation.SuppressLint;
import android.net.http.SslError;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.webkit.SslErrorHandler;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.hh.xuetubao.R;
import butterknife.BindView;
import butterknife.ButterKnife;
public class WebActivity extends AppCompatActivity {
@BindView(R.id.webview)
WebView webview;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
ButterKnife.bind(this);
initWebView(webview,getIntent().getStringExtra("tml"));
}
@SuppressWarnings("deprecation")
@SuppressLint("SetJavaScriptEnabled")
public static void initWebView(WebView webView, String webUrl) {
webView.requestFocus();
webView.setHorizontalScrollBarEnabled(false);
webView.setVerticalScrollBarEnabled(false);
WebSettings web = webView.getSettings();
web.setJavaScriptEnabled(true);
web.setBuiltInZoomControls(true);
web.setSupportZoom(true);
web.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
web.setUseWideViewPort(true);
web.setLoadWithOverviewMode(true);
web.setSavePassword(true);
web.setSaveFormData(true);
//web.setBlockNetworkImage(true);// 把图片加载放在最后来加载渲染
webView.loadUrl(webUrl);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// 重写此方法表明点击网页里面的链接还是在当前的webview里跳转,不跳到浏览器那边
view.loadUrl(url);
return true;
}
@Override
public void onReceivedSslError(WebView view,
SslErrorHandler handler, SslError error) {
// 重写此方法可以让webview处理https请求
handler.proceed();
}
});
}
}
... ...
... ... @@ -5,12 +5,15 @@ import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.GridView;
... ... @@ -116,24 +119,21 @@ public class CompanyActivity extends BaseMvpActivity<CommonPresenter, ZhaopinMod
linCompany.setOnClickListener(this);
linRequire.setOnClickListener(this);
edSearch.addTextChangedListener(new TextWatcher() {
edSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
requsetBody = new CompanySearchBody();
requsetBody.setPage(1);
requsetBody.setPageSize(10);
requsetBody.setSearchName(edSearch.getText().toString());
doRequset(requsetBody);
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH){
String input=edSearch.getText().toString();
if(!TextUtils.isEmpty(input)){
requsetBody = new CompanySearchBody();
requsetBody.setPage(1);
requsetBody.setPageSize(10);
requsetBody.setSearchName(edSearch.getText().toString());
doRequset(requsetBody);
}
return true;
}
return false;
}
});
}
... ... @@ -150,7 +150,7 @@ public class CompanyActivity extends BaseMvpActivity<CommonPresenter, ZhaopinMod
requsetBody.setPageSize(10);
doRequset(requsetBody);
mPresenter.getPresenter(7, 1, String.valueOf(true));
mPresenter.getPresenter(7, 1, String.valueOf(true),"Company");
mPresenter.getPresenter(8, 1, String.valueOf(0), String.valueOf(true));
mPresenter.getPresenter(8, 2, String.valueOf(1), String.valueOf(true));
mPresenter.getPresenter(8, 3, String.valueOf(3), String.valueOf(true));
... ... @@ -178,7 +178,7 @@ public class CompanyActivity extends BaseMvpActivity<CommonPresenter, ZhaopinMod
List<AddressBean.ProvListBean> provList = bean.getProvList();
provinceList.addAll(provList);
proviceId = provinceList.get(1).getProvOid();
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true),"Company");
}
if (api == 7 && intent == 2) {
AddressBean bean = (AddressBean) o;
... ... @@ -326,7 +326,7 @@ public class CompanyActivity extends BaseMvpActivity<CommonPresenter, ZhaopinMod
requsetBody.setProvinceId(provinceList.get(position).getProvOid());
}
// model.getModel(activity, 7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true),"Company");
popListAdapter.change(position);
cityBean.setSelectA(position);
... ... @@ -368,7 +368,7 @@ public class CompanyActivity extends BaseMvpActivity<CommonPresenter, ZhaopinMod
requsetBody.setProvinceId(provinceList.get(0).getProvOid());
proviceId = provinceList.get(1).getProvOid();
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true),"Company");
popListAdapter.change(0);
popCityListAdapter.change(0);
... ...
... ... @@ -76,7 +76,6 @@ public class CertificationCourseDetailAdapter extends BaseAdapter {
TextView title = (TextView) view.findViewById(R.id.title);
ListView lv = (ListView) view.findViewById(R.id.lv_content);
List<DoExerciseBean.bean> catalogLst = list.get(position).getSubCatalogLst().get(position).getSubCatalogLst();
adapter = new CertificationCourseContentAdapter(catalogLst, context);
lv.setAdapter(adapter);
... ... @@ -87,7 +86,6 @@ public class CertificationCourseDetailAdapter extends BaseAdapter {
}
SharedPrefrenceUtils.putStringList(context, "CataLogLst", cataloglst);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
private Intent intent;
... ... @@ -96,16 +94,13 @@ public class CertificationCourseDetailAdapter extends BaseAdapter {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String oid = list.get(thisPosition).getSubCatalogLst().get(thisPosition).getSubCatalogLst().get(position).getCatalogOid();
String accountOid = SharedPrefrenceUtils.getString(context, "AccountOid");
if (type == 1) {
//认证课程
doRequestOne(accountOid, oid);
} else if (type == 2) {
//练习
String title = list.get(thisPosition).getSubCatalogLst().get(thisPosition).getSubCatalogLst().get(position).getCatalogName();
doRequestTwo(oid, accountOid, title);
}
}
});
... ...
... ... @@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
... ... @@ -45,7 +46,7 @@ public class HomeCompanyAdapter extends BaseAdapter {
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
public View getView(final int position, View convertView, ViewGroup parent) {
View view = LayoutInflater.from(context).inflate(R.layout.lv_home_company, null);
... ... @@ -56,7 +57,7 @@ public class HomeCompanyAdapter extends BaseAdapter {
TextView count = (TextView) view.findViewById(R.id.job_count);
RecyclerView rec = (RecyclerView) view.findViewById(R.id.list_label);
View line = (View) view.findViewById(R.id.line);
RelativeLayout rela = view.findViewById(R.id.rela);
LinearLayoutManager manager = new LinearLayoutManager(context);
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
... ... @@ -64,6 +65,8 @@ public class HomeCompanyAdapter extends BaseAdapter {
List<CompanyBean.CompanyListBean.IndustryListBean> industryList = list.get(position).getIndustryList();
ListLabelAdapter adapter = new ListLabelAdapter(industryList, context);
rec.setAdapter(adapter);
rec.setFocusable(false);
rec.setFocusableInTouchMode(false);
count.setText(String.valueOf(list.get(position).getJobCount()));
... ... @@ -76,6 +79,23 @@ public class HomeCompanyAdapter extends BaseAdapter {
if (list.get(position).getPopularJobName() != null)
job.setText(list.get(position).getPopularJobName());
rela.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (turn != null) {
turn.turnTo(list.get(position).getCompanyOid());
}
}
});
job.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (turn != null) {
turn.turnToZw(list.get(position).getPopularJobOid());
}
}
});
if (list.size() > 3) {
if (position == 2) {
... ... @@ -92,14 +112,17 @@ public class HomeCompanyAdapter extends BaseAdapter {
}
/*job.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
*/
return view;
}
private Turn turn;
public void setTurn(Turn turn) {
this.turn = turn;
}
public interface Turn {
void turnTo(String CompanyOid);
void turnToZw(String id);
}
}
... ...
... ... @@ -59,7 +59,11 @@ public class JobHuntWorkAdapter extends RecyclerView.Adapter<JobHuntWorkAdapter.
@Override
public int getItemCount() {
return list.size();
if (list.size() > 3) {
return 3;
} else {
return list.size();
}
}
public class ViewHolder extends RecyclerView.ViewHolder {
... ...
... ... @@ -49,15 +49,19 @@ public class ListAnswerAdapter extends BaseAdapter {
option.setText(list.get(position).getOptionName());
text.setText(list.get(position).getOptionDesc());
if (!TextUtils.isEmpty(rightAnswer)) {
if (!TextUtils.isEmpty(rightAnswer) && !TextUtils.isEmpty(selectAnswer)) {
if (rightAnswer.contains(list.get(position).getOptionName())) {
right.setVisibility(View.VISIBLE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.GONE);
} else {
} else if (!rightAnswer.contains(list.get(position).getOptionName()) && selectAnswer.contains(list.get(position).getOptionName())) {
right.setVisibility(View.GONE);
wrong.setVisibility(View.VISIBLE);
option.setVisibility(View.GONE);
} else {
right.setVisibility(View.GONE);
wrong.setVisibility(View.GONE);
option.setVisibility(View.VISIBLE);
}
}
... ... @@ -71,29 +75,30 @@ public class ListAnswerAdapter extends BaseAdapter {
}
private String selectString;
private String rightAnswer;
private String selectAnswer;
private Boolean isEnable = true;
public void setSelect(String answer) {
this.selectString = answer;
}
private String rightAnswer;
public void setRight(String answer) {
this.rightAnswer = answer;
public void setRight(String right, String select) {
this.rightAnswer = right;
this.selectAnswer = select;
}
private String listRight;
public void setEnable(Integer integer) {
public void setListRight(String answer) {
this.listRight = answer;
}
@Override
public boolean isEnabled(int position) {
if (!TextUtils.isEmpty(selectString)) {
return false;
} else {
if (isEnable) {
return true;
} else {
return false;
}
}
}
... ...
package com.hh.xuetubao.adapter;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.hh.xuetubao.R;
import com.hh.xuetubao.bean.HotJobBean;
import java.util.List;
public class OfficeJobAdapter extends RecyclerView.Adapter<OfficeJobAdapter.ViewHolder> {
private Context context;
private List<HotJobBean.JobListBean> list;
public OfficeJobAdapter(Context context, List<HotJobBean.JobListBean> list) {
this.context = context;
this.list = list;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.rv_office_job, null);
ViewHolder holder = new ViewHolder(view);
return holder;
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, final int position) {
if (list.get(position).getJobName() != null)
holder.job.setText(list.get(position).getJobName());
if (list.get(position).getCompanyName() != null)
holder.company.setText(list.get(position).getCompanyName());
if (list.get(position).getSalary() != null)
holder.money.setText(list.get(position).getSalary());
if (list.get(position).getExprience() != null)
holder.jingyan.setText(list.get(position).getExprience());
if (list.get(position).getEducation() != null)
holder.xueli.setText(list.get(position).getEducation());
if (list.get(position).getAddress() != null)
holder.address.setText(list.get(position).getAddress());
if (list.size() > 3) {
if (position == 2) {
holder.line.setVisibility(View.GONE);
} else {
holder.line.setVisibility(View.VISIBLE);
}
} else {
if (position == list.size() - 1) {
holder.line.setVisibility(View.GONE);
} else {
holder.line.setVisibility(View.VISIBLE);
}
}
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (jumpToDetail != null) {
jumpToDetail.turnToDetail(list.get(position).getJobOid());
}
}
});
}
@Override
public int getItemCount() {
if (list.size() > 3) {
return 3;
} else {
return list.size();
}
}
public class ViewHolder extends RecyclerView.ViewHolder {
private final TextView job;
private final TextView money;
private final TextView company;
private final TextView jingyan;
private final TextView xueli;
private final TextView address;
private final View line;
public ViewHolder(View itemView) {
super(itemView);
job = (TextView) itemView.findViewById(R.id.tv_job);
money = (TextView) itemView.findViewById(R.id.tv_money);
company = (TextView) itemView.findViewById(R.id.tv_company);
jingyan = (TextView) itemView.findViewById(R.id.jingyan);
xueli = (TextView) itemView.findViewById(R.id.xueli);
address = (TextView) itemView.findViewById(R.id.address);
line = itemView.findViewById(R.id.line2);
}
}
private JumpToDetail jumpToDetail;
public void setJumpToDetail(JumpToDetail jumpToDetail) {
this.jumpToDetail = jumpToDetail;
}
public interface JumpToDetail {
void turnToDetail(String JobOid);
}
}
... ...
... ... @@ -25,7 +25,7 @@ public class RecruitmentLabelAdapter extends RecyclerView.Adapter<RecruitmentLab
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.list_label, null);
View view = LayoutInflater.from(context).inflate(R.layout.list_recruit_label, null);
ViewHolder holder = new ViewHolder(view);
return holder;
}
... ...
... ... @@ -10,7 +10,9 @@ import android.view.ViewGroup;
import android.widget.TextView;
import com.hh.xuetubao.R;
import com.hh.xuetubao.pieview.PColumn;
import java.text.DecimalFormat;
import java.util.List;
public class StudyTimeXrcAdapter extends RecyclerView.Adapter<StudyTimeXrcAdapter.ViewHolder> {
... ... @@ -18,44 +20,38 @@ public class StudyTimeXrcAdapter extends RecyclerView.Adapter<StudyTimeXrcAdapte
private Context context;
private List<String> day;
private List<String> time;
int max;
public StudyTimeXrcAdapter(Context context, List<String> day, List<String> time) {
public StudyTimeXrcAdapter(Context context, List<String> day, List<String> time, int max) {
this.context = context;
this.day = day;
this.time = time;
this.max = max;
Log.e("maxValue1", "max" + max);
}
@NonNull
@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);
ViewGroup.LayoutParams params = viewById.getLayoutParams();
int height = params.height;
params.height = 1200;
viewById.setLayoutParams(params);
ViewHolder holder = new ViewHolder(view);
return holder;
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
if (day.get(position) != null)
int a = Integer.valueOf(day.get(position).substring(0, day.get(position).length() - 2));
if (day.get(position) != null) {
holder.tvDay.setText(time.get(position));
if (time.get(position) != null)
holder.tvTime.setText(day.get(position));
ViewGroup.LayoutParams params = holder.longView.getLayoutParams();
Log.e("SSsss",day.get(position)+"");
int a= Integer.valueOf(day.get(position).substring(day.get(position).length()-1,day.get(position).length()));
Log.e("a_Position",a+"");
params.height = a * 50;
if(a == 0){
holder.longView.setVisibility(View.GONE);
}else {
holder.longView.setLayoutParams(params);
}
// params.height = 100;
// if (time.get(position) != null) {
// holder.tvTime.setText(a + ""); //day.get(position)
// }
String format = new DecimalFormat("0").format(max * 1.2);
holder.pColumn.setData(a, Integer.valueOf(new DecimalFormat("0").format(max * 1.2)));
}
... ... @@ -67,14 +63,16 @@ public class StudyTimeXrcAdapter extends RecyclerView.Adapter<StudyTimeXrcAdapte
public class ViewHolder extends RecyclerView.ViewHolder {
private final TextView tvDay;
private final TextView tvTime;
private final View longView;
// private final TextView tvTime;
private final PColumn pColumn;
// private final View longView;
public ViewHolder(View itemView) {
super(itemView);
tvDay = (TextView) itemView.findViewById(R.id.tv_day);
tvTime = (TextView) itemView.findViewById(R.id.tv_time);
longView = itemView.findViewById(R.id.view_long);
// tvTime = (TextView) itemView.findViewById(R.id.tv_time);
pColumn = itemView.findViewById(R.id.pcolum);
// longView = itemView.findViewById(R.id.view_long);
}
}
}
... ...
... ... @@ -91,7 +91,7 @@ public class CompanyMainFragment extends Fragment {
myLocationStyle.showMyLocation(true);
myLocationStyle.anchor(a, b);//设置定位蓝点图标的锚点方法
aMap.setMyLocationStyle(myLocationStyle);//设置定位蓝点的Style
//aMap.getUiSettings().setMyLocationButtonEnabled(true);设置默认定位按钮是否显示,非必需设置。
// aMap.getUiSettings().setMyLocationButtonEnabled(true);//设置默认定位按钮是否显示,非必需设置。
aMap.setMyLocationEnabled(true);// 设置为true表示启动显示定位蓝点,false表示隐藏定位蓝点并不进行定位,默认是false。
}
... ...
... ... @@ -29,6 +29,7 @@ import com.hh.xuetubao.activity.study.CourseDetailActivity_Video;
import com.hh.xuetubao.activity.study.StudyActivity;
import com.hh.xuetubao.activity.work.CompanyActivity;
import com.hh.xuetubao.activity.work.CompanyDetailActivity;
import com.hh.xuetubao.activity.work.OfficeDetailActivity;
import com.hh.xuetubao.adapter.GridHomeHotAdapter;
import com.hh.xuetubao.adapter.HomeCompanyAdapter;
import com.hh.xuetubao.adapter.HomeQuestionAdapter;
... ... @@ -36,8 +37,10 @@ import com.hh.xuetubao.bean.AnswerBean;
import com.hh.xuetubao.bean.CompanyBean;
import com.hh.xuetubao.bean.FreeCourseBean;
import com.hh.xuetubao.bean.QuestionBankLstBean;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.ExerciseModel;
import com.hh.xuetubao.model.LearnModel;
import com.hh.xuetubao.model.PersonalModel;
import com.hh.xuetubao.model.ZhaopinModel;
import com.hh.xuetubao.mvp.BaseMvpFragment;
import com.hh.xuetubao.mvp.CommonPresenter;
... ... @@ -60,7 +63,7 @@ import io.reactivex.schedulers.Schedulers;
* 首页
*/
public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> implements ICommonView, View.OnClickListener {
public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> implements ICommonView, View.OnClickListener, HomeCompanyAdapter.Turn {
@BindView(R.id.grid_hotLesson)
... ... @@ -126,21 +129,21 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
/*intent = new Intent(getActivity(), PracticeActivity.class);
intent.putExtra("catalogOid", questionList.get(position).getCatalogOid());
startActivity(intent);*/
doRequestTwo(questionList.get(position).getCatalogOid(),accountOid,questionList.get(position).getCatalogName());
doRequestTwo(questionList.get(position).getCatalogOid(), accountOid, questionList.get(position).getCatalogName());
}
});
companyAdapter = new HomeCompanyAdapter(companyList, getActivity());
listCompany.setAdapter(companyAdapter);
listCompany.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
intent = new Intent(getActivity(), CompanyDetailActivity.class);
intent.putExtra("CompanyOid", companyList.get(position).getCompanyOid());
startActivity(intent);
}
});
companyAdapter.setTurn(this);
// listCompany.setOnItemClickListener(new AdapterView.OnItemClickListener() {
// @Override
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//
// }
// });
imageList.add(getResources().getDrawable(R.drawable.bannerone));
... ... @@ -217,6 +220,11 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
ZhaopinModel zhaopinModel = new ZhaopinModel();
zhaopinModel.getModel(this, 3, 1, "4");
PersonalModel personalModel = new PersonalModel();
personalModel.getModel(this, 1, 1, "HeadPic");
personalModel.getModel(this, 1, 2, "CoverPic");
}
@Override
... ... @@ -238,9 +246,9 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
hotList.addAll(beanLessonLst);
hotAdapter.notifyDataSetChanged();
if(beanLessonLst.size()>4){
if (beanLessonLst.size() > 4) {
tvMoreKe.setVisibility(View.VISIBLE);
}else{
} else {
tvMoreKe.setVisibility(View.GONE);
}
}
... ... @@ -269,6 +277,16 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
tvMoreQiye.setVisibility(View.GONE);
}
}
if (api == 1 && intent == 1) {
UserBean bean = (UserBean) o;
String imgUrl = bean.getImgUrl();
SharedPrefrenceUtils.saveString(getActivity(), "HeadPic", imgUrl);
}
if (api == 1 && intent == 2) {
UserBean bean = (UserBean) o;
String imgUrl = bean.getImgUrl();
SharedPrefrenceUtils.saveString(getActivity(), "CoverPic", imgUrl);
}
}
@Override
... ... @@ -327,4 +345,20 @@ public class HomeFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
break;
}
}
@Override
public void turnTo(String CompanyOid) {
intent = new Intent(getActivity(), CompanyDetailActivity.class);
intent.putExtra("CompanyOid",CompanyOid); // companyList.get(position).getCompanyOid()
startActivity(intent);
}
@Override
public void turnToZw(String id) {
intent = new Intent(getActivity(), OfficeDetailActivity.class);
intent.putExtra("JobOid", id);
startActivity(intent);
}
}
... ...
... ... @@ -138,6 +138,12 @@ public class JobHuntFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMod
jobList.addAll(beanJobList);
workAdapter.notifyDataSetChanged();
if (jobList.size() > 3) {
zhiweiMore.setVisibility(View.VISIBLE);
} else {
zhiweiMore.setVisibility(View.GONE);
}
}
}
... ...
... ... @@ -136,7 +136,11 @@ public class MineFragment extends BaseMvpFragment<CommonPresenter, PersonalModel
if (api == 1 && intent == 3) {
UserBean bean = (UserBean) o;
int count = bean.getUnReadCount();
messageNum.setText(String.valueOf(count));
if(count==0){
messageNum.setVisibility(View.GONE);
}else {
messageNum.setText(String.valueOf(count));
}
}
if (api == 2 && intent == 1) {
... ...
... ... @@ -7,21 +7,20 @@ import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
import com.hh.xuetubao.MyServer;
import com.hh.xuetubao.R;
... ... @@ -29,8 +28,8 @@ import com.hh.xuetubao.Utils.BaseObsever;
import com.hh.xuetubao.Utils.HttpUtils;
import com.hh.xuetubao.Utils.NetConfig;
import com.hh.xuetubao.activity.work.OfficeDetailActivity;
import com.hh.xuetubao.adapter.GridViewAdapter;
import com.hh.xuetubao.adapter.JobHuntWorkAdapter;
import com.hh.xuetubao.adapter.OfficeJobAdapter;
import com.hh.xuetubao.adapter.PopCityListAdapter;
import com.hh.xuetubao.adapter.PopProvinceListAdapter;
import com.hh.xuetubao.bean.AddressBean;
... ... @@ -56,7 +55,7 @@ import io.reactivex.schedulers.Schedulers;
/**
* 职位Fragment
*/
public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinModel> implements ICommonView, JobHuntWorkAdapter.JumpToDetail, View.OnClickListener {
public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinModel> implements ICommonView, OfficeJobAdapter.JumpToDetail, View.OnClickListener {
@BindView(R.id.recyclerview)
... ... @@ -78,7 +77,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
@BindView(R.id.rl_tab)
LinearLayout rlTab;
private JobHuntWorkAdapter jobHuntWorkAdapter;
private OfficeJobAdapter jobHuntWorkAdapter;
private List<HotJobBean.JobListBean> jobList = new ArrayList<>();
private List<AddressBean.ProvListBean> provinceList = new ArrayList<>();
private List<AddressBean.CityListBean> cityList = new ArrayList<>();
... ... @@ -132,7 +131,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
LinearLayoutManager manager = new LinearLayoutManager(getActivity());
recyclerview.setLayoutManager(manager);
jobHuntWorkAdapter = new JobHuntWorkAdapter(getActivity(), jobList);
jobHuntWorkAdapter = new OfficeJobAdapter(getActivity(), jobList);
recyclerview.setAdapter(jobHuntWorkAdapter);
jobHuntWorkAdapter.setJumpToDetail(this);
... ... @@ -141,27 +140,22 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
linCompany.setOnClickListener(this);
linRequire.setOnClickListener(this);
edSearch.addTextChangedListener(new TextWatcher() {
edSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
requestBody = new JobSearchBody();
requestBody.setPage(1);
requestBody.setPageSize(10);
requestBody.setSearchName(edSearch.getText().toString());
doRequset(requestBody);
Log.e("zhangtao:Jobreqeust",requestBody.toString());
Log.e("zhangtao:A","=========================");
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
String input = edSearch.getText().toString();
if (!TextUtils.isEmpty(input)) {
requestBody = new JobSearchBody();
requestBody.setPage(1);
requestBody.setPageSize(10);
requestBody.setSearchName(edSearch.getText().toString());
doRequset(requestBody);
}
return true;
}
return false;
}
});
}
... ... @@ -175,7 +169,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
model = new ZhaopinModel();
model.getModel(this, 7, 1, String.valueOf(true));
model.getModel(this, 7, 1, String.valueOf(true), "Job");
model.getModel(this, 8, 1, String.valueOf(0), String.valueOf(true));
model.getModel(this, 8, 2, String.valueOf(1), String.valueOf(true));
model.getModel(this, 8, 3, String.valueOf(3), String.valueOf(true));
... ... @@ -202,8 +196,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
List<AddressBean.ProvListBean> provList = bean.getProvList();
provinceList.addAll(provList);
proviceId = provinceList.get(1).getProvOid();
model.getModel(this, 7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true), "Job");
}
if (api == 7 && intent == 2) {
AddressBean bean = (AddressBean) o;
... ... @@ -485,13 +478,13 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
}
});
final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linCompany.getBottom());
final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linRequire.getBottom());
popupWindow.setOutsideTouchable(true);
popupWindow.setTouchable(true);
popupWindow.setFocusable(true);
popupWindow.setBackgroundDrawable(getResources().getDrawable(R.color.color_tm));
popupWindow.setAnimationStyle(R.style.AnimTopMiddle);
popupWindow.showAsDropDown(linCompany);
popupWindow.showAsDropDown(linRequire);
reset.setOnClickListener(new View.OnClickListener() {
@Override
... ... @@ -720,7 +713,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
}
// model.getModel(activity, 7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true),"Job");
popListAdapter.change(position);
cityBean.setSelectA(position);
... ... @@ -731,9 +724,9 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
listTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if(position == 0){
if (position == 0) {
requestBody.setCityIdId(null);
}else {
} else {
requestBody.setCityIdId(cityList.get(position).getCityId());
}
popCityListAdapter.change(position); // 改
... ... @@ -761,7 +754,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
requestBody.setProvinceId(provinceList.get(0).getProvOid());
proviceId = provinceList.get(1).getProvOid();
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true));
mPresenter.getPresenter(7, 2, proviceId, String.valueOf(true),"Job");
popListAdapter.change(0);
popCityListAdapter.change(0);
... ... @@ -773,7 +766,7 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
@Override
public void onClick(View v) {
popupWindow.dismiss();
Log.e("requestBody",requestBody.toString());
Log.e("requestBody", requestBody.toString());
doRequset(requestBody);
}
});
... ... @@ -1096,7 +1089,6 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode
// }
//职位->要求弹窗
// private void showRequirePop(final List<AddressBean.PropListBean> xueLiList, final List<AddressBean.PropListBean> jingYanList, final List<AddressBean.PropListBean> zhiYeList) {
//
... ...
... ... @@ -14,6 +14,7 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.hh.xuetubao.MainActivity;
import com.hh.xuetubao.R;
import com.hh.xuetubao.Utils.CustomScrollView;
import com.hh.xuetubao.Utils.RecyclerViewSpacesItemDecoration;
... ... @@ -31,6 +32,7 @@ import com.hh.xuetubao.mvp.ICommonView;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
... ... @@ -71,6 +73,9 @@ public class StudyFragment extends BaseMvpFragment<CommonPresenter, LearnModel>
private List<String> time = new ArrayList<>();
private String resumeOid;
List<Integer> arr = new ArrayList<>();
int max;
@Override
public int getLayoutId() {
... ... @@ -93,11 +98,12 @@ public class StudyFragment extends BaseMvpFragment<CommonPresenter, LearnModel>
xrecyclerview.setNestedScrollingEnabled(false);
scroll.setNestedScrollingEnabled(true);
// int max = Collections.max(arr);
LinearLayoutManager manager = new LinearLayoutManager(getActivity());
manager.setOrientation(LinearLayoutManager.HORIZONTAL);
rvReadTime.setLayoutManager(manager);
xrcAdapter = new StudyTimeXrcAdapter(getActivity(), day, time);
xrcAdapter = new StudyTimeXrcAdapter(getActivity(), day, time, max);
rvReadTime.setAdapter(xrcAdapter);
HashMap<String, Integer> stringIntegerHashMap = new HashMap<>();
... ... @@ -167,7 +173,15 @@ public class StudyFragment extends BaseMvpFragment<CommonPresenter, LearnModel>
day.addAll(datas);
time.addAll(categories);
xrcAdapter.notifyDataSetChanged();
for (int i = 0; i < day.size(); i++) {
arr.add(Integer.valueOf(day.get(i).substring(0, day.get(i).length() - 2)));
}
max = Collections.max(arr);
Log.e("maxValue", max + "");
xrcAdapter = new StudyTimeXrcAdapter(getActivity(), day, time, max);
rvReadTime.setAdapter(xrcAdapter);
// xrcAdapter.notifyDataSetChanged();
}
}
... ... @@ -192,10 +206,15 @@ public class StudyFragment extends BaseMvpFragment<CommonPresenter, LearnModel>
case R.id.rl_user:
case R.id.rl_body:
// startActivity(new Intent(getActivity(), InfromationActivity.class));
MineFragment mineFragment = new MineFragment();
FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.frame, mineFragment);
transaction.commit();
// MineFragment mineFragment = new MineFragment();
// FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
// transaction.replace(R.id.frame, mineFragment);
// transaction.commit();
// Intent intent = new Intent(getActivity(), MainActivity.class);
// intent.putExtra("Intenttag","4");
// startActivity(intent);
break;
}
}
... ...
... ... @@ -51,15 +51,14 @@ public class ExerciseModel implements ICommonModel {
if (api == 9 && intent == 1)
DeleteExamRecordInfo(commonView, api, intent, params);
if(api == 5 && intent == 4){
GetHeadInfo(commonView, api, intent, params);
}
if (api == 10 && intent == 1)
InsertSimExamRecord(commonView, api, intent, params);
}
private void GetHeadInfo(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 5 && intent == 4)
mServers.GetHeadInfo(params[0])
private void InsertSimExamRecord(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 10 && intent == 1)
mServers.InsertSimExamRecord(params[0], params[1], Double.valueOf(params[2]), Integer.valueOf(params[3]), Integer.valueOf(params[4]))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
... ... @@ -69,17 +68,6 @@ public class ExerciseModel implements ICommonModel {
commonView.getData(value, api, intent);
}
@Override
public void onError(Throwable e) {
super.onError(e);
commonView.onError(e, api);
}
@Override
public void onComplete() {
super.onComplete();
commonView.onComplete(api);
}
});
}
... ...
... ... @@ -77,7 +77,7 @@ public class ZhaopinModel implements ICommonModel {
private void GetCityListByProvince(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 7 && intent == 2)
mServers.GetCityListByProvince(params[0], Boolean.valueOf(params[1]))
mServers.GetCityListByProvince(params[0], Boolean.valueOf(params[1]),params[2])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
... ... @@ -103,7 +103,7 @@ public class ZhaopinModel implements ICommonModel {
private void GetProvinceList(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 7 && intent == 1)
mServers.GetProvinceList(Boolean.valueOf(params[0]))
mServers.GetProvinceList(Boolean.valueOf(params[0]),params[1])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
... ...
package com.hh.xuetubao.pieview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Point;
import android.os.Build;
import android.view.Display;
import android.view.WindowManager;
/**
* Created by lixiaodaoaaa on 2016/10/18.
*/
public class DensityUtils {
public DensityUtils() {
}
public static int dipTopx(Context context, float dpValue) {
float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5F * (float) (dpValue >= 0.0F ? 1 : -1));
}
public static int pxTodip(Context context, float pxValue) {
float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5F);
}
public static int pxTosp(Context context, float pxValue, float fontScale) {
return (int) (pxValue / fontScale + 0.5F);
}
public static int spTopx(float spValue, float fontScale) {
return (int) (spValue * fontScale + 0.5F);
}
@SuppressLint({"NewApi"})
public static int[] getScreenSize(Context context) {
int[] screenSize = new int[2];
boolean measuredWidth = false;
boolean measuredheight = false;
Point size = new Point();
@SuppressLint("WrongConstant") WindowManager w = (WindowManager) context.getSystemService("window");
int measuredWidth1;
int measuredheight1;
if (Build.VERSION.SDK_INT >= 13) {
w.getDefaultDisplay().getSize(size);
measuredWidth1 = size.x;
measuredheight1 = size.y;
} else {
Display d = w.getDefaultDisplay();
measuredWidth1 = d.getWidth();
measuredheight1 = d.getHeight();
}
screenSize[0] = measuredWidth1;
screenSize[1] = measuredheight1;
return screenSize;
}
}
... ...
package com.hh.xuetubao.pieview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.drawable.GradientDrawable;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import com.hh.xuetubao.R;
/**************************************
* *** http://weibo.com/lixiaodaoaaa **
* *** create at 2017/5/18 23:45 ****
* ******* by:lixiaodaoaaa **********
**************************************/
public class PColumn extends View {
int MAX = 100;//最大
int corner = 40;
int corner_a = 0;
int data = 0;//显示的数
int tempData = 0;
int textPadding = 15;
Paint mPaint;
int mColor;
Context mContext;
public PColumn(Context context) {
super(context);
mContext = context;
}
public PColumn(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
mContext = context;
initPaint();
}
public PColumn(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mContext = context;
initPaint();
}
private void initPaint() {
mPaint = new Paint();
mPaint.setAntiAlias(true);
// mColor = mContext.getResources().getColor(R.color.colorPrimary);
//两个坐标形成变量,规定了渐变的方向和间距大小,着色器为镜像
LinearGradient linearGradient =new LinearGradient(0,0,0,500, getResources().getColor(R.color.end_color),getResources().getColor(R.color.start_Color), Shader.TileMode.CLAMP); //CLAMP 头部 MIRROR 中间
mPaint.setShader(linearGradient);
// mPaint.setStrokeWidth(50);
// mPaint.setColor(mColor);
}
@Override
public void draw(Canvas canvas) {
super.draw(canvas);
if (data == 0) {
mPaint.setTextSize(30); //getWidth() / 2
RectF oval3 = new RectF(0, getHeight() - DensityUtils.pxTodip(mContext, 0), getWidth(), getHeight());// 设置个新的长方形
canvas.drawRoundRect(oval3, DensityUtils.pxTodip(mContext, corner), DensityUtils.pxTodip(mContext, corner), mPaint);
canvas.drawText("0",
getWidth() * 0.5f - mPaint.measureText("0") * 0.5f,
getHeight() - DensityUtils.pxTodip(mContext, 20) - 2 * DensityUtils.pxTodip(mContext, textPadding),
mPaint);
return;
}
//防止数值很大的的时候,动画时间过长
int step = data / 100 + 1;
if (tempData < data - step) {
tempData = tempData + step;
} else {
tempData = data;
}
//画圆角矩形
String S = tempData + "";
//一个字和两,三个字的字号相同
if (S.length() < 4) {
mPaint.setTextSize(30); //
} else {
mPaint.setTextSize(30); //getWidth() / (S.length() - 1)
}
float textH = mPaint.ascent() + mPaint.descent();
float MaxH = getHeight() - textH - 2 * DensityUtils.pxTodip(mContext, textPadding);
//圆角矩形的实际高度
float realH = MaxH / MAX * tempData;
// RectF ovl4 = new RectF(0, 10, getWidth(), getHeight()); //getHeight() - realH
RectF oval3 = new RectF(0, getHeight() - realH, getWidth(), getHeight());// 设置个新的长方形
canvas.drawRoundRect(oval3, DensityUtils.pxTodip(mContext, corner_a), DensityUtils.pxTodip(mContext, corner_a), mPaint);
// canvas.drawRoundRect(ovl4, DensityUtils.pxTodip(mContext, corner_a), DensityUtils.pxTodip(mContext, corner_a), mPaint);
//写数字
canvas.drawText(S,
getWidth() * 0.5f - mPaint.measureText(S) * 0.5f,
getHeight() - realH - 2 * DensityUtils.pxTodip(mContext, textPadding),
mPaint);
if (tempData != data) {
postInvalidate();
}
// Paint paint = new Paint();
// paint.setStyle(Paint.Style.FILL);
// paint.setColor(getResources().getColor(R.color.colorBarBack));
// paint.setAntiAlias(true);
//
// int colors[] = {getResources().getColor(R.color.colorBarColor), getResources().getColor(R.color.colorGradientGreen)};
}
public void setData(int data, int MAX) {
this.data = data;
tempData = 0;
this.MAX = MAX;
postInvalidate();
}
}
... ...
/*
* Copyright 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Last modified 2016-10-02 00:36:00
*
*/
package com.hh.xuetubao.pieview;
import android.support.annotation.NonNull;
public class PieData {
// 用户关心数据
private String name; // 名字
private float value; // 数值
private float percentage; // 百分比
// 非用户关心数据
private int color = 0; // 颜色
private float angle = 0; // 角度
public PieData(@NonNull String name, @NonNull float value) {
this.name = name;
this.value = value;
}
public int getColor() {
return color;
}
public void setColor(int color) {
this.color = color;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public float getAngle() {
return angle;
}
public void setAngle(float angle) {
this.angle = angle;
}
public float getValue() {
return value;
}
public void setValue(float value) {
this.value = value;
}
public float getPercentage() {
return percentage;
}
public void setPercentage(float percentage) {
this.percentage = percentage;
}
}
... ...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:centerColor="#80FFFFFF"
... ... @@ -12,4 +13,5 @@
android:bottomRightRadius="0dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>
\ No newline at end of file
... ...
... ... @@ -319,7 +319,7 @@
<ImageView
android:layout_width="@dimen/dp_11"
android:layout_height="@dimen/dp_13"
android:src="@mipmap/itemimg" />
android:src="@mipmap/jiaojuan" />
<TextView
android:layout_width="wrap_content"
... ... @@ -339,7 +339,9 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:text="展开答题卡" />
android:text="展开答题卡"
android:visibility="visible"
/>
</RelativeLayout>
... ...
... ... @@ -8,7 +8,7 @@
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"
android:layout_height="@dimen/dp_48"
android:background="#F2F2F2">
<LinearLayout
... ... @@ -82,7 +82,7 @@
android:layout_alignBottom="@id/tv_kaoshi"
android:layout_marginRight="@dimen/dp_5"
android:layout_toLeftOf="@+id/tv_time1"
android:text="6"
android:text="0"
android:textColor="@color/color_ff5400"
android:textSize="12sp" />
... ... @@ -123,7 +123,7 @@
android:layout_alignBottom="@id/tv_jige"
android:layout_marginRight="@dimen/dp_5"
android:layout_toLeftOf="@+id/tv_time1"
android:text="6"
android:text="0"
android:textColor="@color/color_ff5400"
android:textSize="12sp" />
... ... @@ -164,7 +164,7 @@
android:layout_alignBottom="@id/tv_dati"
android:layout_marginRight="@dimen/dp_5"
android:layout_toLeftOf="@+id/tv_time1"
android:text="6"
android:text="0"
android:textColor="@color/color_ff5400"
android:textSize="12sp" />
... ...
... ... @@ -36,6 +36,8 @@
android:layout_marginLeft="@dimen/dp_5"
android:background="@null"
android:hint="请输入职位名称"
android:imeOptions="actionSearch"
android:inputType="text"
android:maxEms="20"
android:textSize="12sp" />
</LinearLayout>
... ... @@ -68,12 +70,14 @@
android:layout_marginLeft="@dimen/dp_5"
android:src="@mipmap/down" />
</LinearLayout>
<View
android:layout_width="@dimen/dp_1"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:background="#D7D7D7" />
<LinearLayout
android:id="@+id/lin_city"
android:layout_width="0dp"
... ...
... ... @@ -8,7 +8,7 @@
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"
android:layout_height="@dimen/dp_48"
android:background="#F2F2F2">
<LinearLayout
... ...
... ... @@ -237,7 +237,7 @@
android:layout_toLeftOf="@+id/img_work"
android:background="@null"
android:gravity="end"
android:text="华航唯实"
android:text="未填写"
android:textColor="#333333"
android:textCursorDrawable="@color/color_e5e5e5"
android:textSize="12sp" />
... ...
... ... @@ -46,7 +46,9 @@
android:background="@null"
android:hint="请输入手机号"
android:textColorHint="#C7C7C7"
android:textSize="12sp" />
android:textSize="12sp"
android:inputType="number"
/>
<View
android:id="@+id/line2"
... ...
... ... @@ -343,6 +343,8 @@
android:id="@+id/rec_work"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:layout_below="@+id/zhiwei" />
... ...
... ... @@ -91,7 +91,8 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_readTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_60"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
... ...
... ... @@ -44,10 +44,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="删除"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:text="删除"
android:textColor="#666666"
android:textSize="12sp" />
</RelativeLayout>
... ... @@ -71,22 +71,37 @@
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_time"
<LinearLayout
android:id="@+id/line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_title"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_15"
android:text="用时37分12秒"
android:textColor="#FF5400"
android:textSize="12sp" />
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用时"
android:textColor="#FF5400"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="37分12秒"
android:textColor="#FF5400"
android:textSize="12sp" />
</LinearLayout>
<View
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_below="@+id/tv_time"
android:layout_below="@+id/line"
android:layout_marginTop="@dimen/dp_30"
android:background="#E5E5E5" />
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webview"
></WebView>
</LinearLayout>
\ No newline at end of file
... ...
... ... @@ -69,15 +69,14 @@
android:layout_height="@dimen/dp_30"
android:layout_below="@+id/grid_hotLesson"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/stroke_gray"
android:gravity="center"
android:text="查看更多"
android:layout_marginTop="@dimen/dp_30"
android:textColor="#AAAAAA"
android:textSize="12sp"
/>
android:textSize="12sp" />
<View
android:id="@+id/line1"
... ... @@ -124,9 +123,8 @@
android:layout_height="wrap_content"
android:layout_below="@id/lin_title1"
android:layout_marginTop="@dimen/dp_20"
android:scrollbars="none"
android:divider="@null"
/>
android:scrollbars="none" />
<TextView
android:id="@+id/tv_more_ti"
... ... @@ -181,16 +179,24 @@
android:background="#333333" />
</LinearLayout>
<!--<android.support.v7.widget.RecyclerView-->
<!--android:id="@+id/rv_company"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_below="@id/lin_title2"-->
<!--android:layout_marginTop="@dimen/dp_10"-->
<!--android:layout_marginLeft="@dimen/dp_20"-->
<!--/>-->
<com.hh.xuetubao.Utils.ListViewNesting
android:id="@+id/list_company"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/lin_title2"
android:layout_marginTop="@dimen/dp_10"
android:scrollbars="none"
android:dividerHeight="@dimen/dp_0"
android:divider="@null"
/>
android:dividerHeight="@dimen/dp_0"
android:scrollbars="none" />
<TextView
android:id="@+id/tv_more_qiye"
... ...
... ... @@ -28,7 +28,7 @@
android:layout_width="@dimen/dp_154"
android:layout_height="@dimen/dp_145"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_25"
android:scaleType="fitXY"
android:src="@mipmap/aaa" />
... ...
... ... @@ -363,12 +363,14 @@
<RelativeLayout
android:id="@+id/rl_end"
android:layout_width="@dimen/dp_335"
android:layout_height="@dimen/dp_50"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_below="@+id/rl_toudi"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_60"
android:layout_marginRight="@dimen/dp_20"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/circle_bigconners_orange">
<TextView
... ...
... ... @@ -10,7 +10,7 @@
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"
android:layout_height="@dimen/dp_48"
android:background="#F2F2F2">
<LinearLayout
... ...
... ... @@ -36,6 +36,8 @@
android:layout_marginLeft="@dimen/dp_5"
android:background="@null"
android:hint="请输入职位名称"
android:imeOptions="actionSearch"
android:inputType="text"
android:maxEms="20"
android:textSize="12sp" />
</LinearLayout>
... ... @@ -170,15 +172,14 @@
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
android:divider="@null" />
<LinearLayout
android:id="@+id/office_zwsj"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"
android:id="@+id/office_zwsj"
>
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
... ...
... ... @@ -9,7 +9,7 @@
<RelativeLayout
android:id="@+id/rl_top"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"
android:layout_height="@dimen/dp_48"
android:background="#F2F2F2">
<LinearLayout
... ...
... ... @@ -3,12 +3,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!--android:layout_below="@+id/lin_title"-->
<ImageView
android:id="@+id/img"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_90"
android:layout_below="@+id/lin_title"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_20"
android:src="@mipmap/home_class" />
... ...
... ... @@ -2,12 +2,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--android:layout_below="@id/tv_topic"-->
<LinearLayout
android:id="@+id/lin_A"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:layout_below="@id/tv_topic"
android:layout_marginTop="15dp"
android:orientation="horizontal">
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_marginRight="@dimen/dp_15"
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/circle_f8f8f8_3"
android:paddingTop="@dimen/dp_3"
android:paddingBottom="@dimen/dp_3"
android:text="民营"
android:textColor="#A9A9A9"
android:textSize="11sp"
android:paddingLeft="@dimen/dp_7"
android:paddingRight="@dimen/dp_7"
android:layout_marginTop="@dimen/dp_10"
/>
</LinearLayout>
\ No newline at end of file
... ...
... ... @@ -2,126 +2,133 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/img"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_50"
android:layout_below="@+id/lin_title2"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:src="@mipmap/ssa" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
<!--android:layout_below="@+id/lin_title2"-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/img"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@id/img"
android:text="上海鉴泉自动化科技有限公司"
android:textColor="#232323"
android:textSize="16sp" />
android:id="@+id/rela"
>
<TextView
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/img"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@id/img"
android:text="广东 深圳市"
android:textColor="#232323"
android:textSize="14sp" />
<!--
<LinearLayout
android:id="@+id/lin_biaoqian1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/img"
<ImageView
android:id="@+id/img"
android:layout_width="@dimen/dp_50"
android:layout_height="@dimen/dp_50"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:orientation="horizontal">
android:src="@mipmap/ssa" />
<TextView
android:id="@+id/tv_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_five"
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/img"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@id/img"
android:text="上海鉴泉自动化科技有限公司"
android:textColor="#232323"
android:textSize="16sp" />
<TextView
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/img"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@id/img"
android:text="广东 深圳市"
android:textColor="#232323"
android:textSize="14sp" />
<!--
<LinearLayout
android:id="@+id/lin_biaoqian1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
</LinearLayout>
-->
<android.support.v7.widget.RecyclerView
android:id="@+id/list_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/address"
android:layout_marginTop="@dimen/dp_20"
android:nestedScrollingEnabled="false" />
android:layout_below="@id/img"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
<TextView
android:id="@+id/tv_five"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:textColor="#A9A9A9"
android:textSize="11sp" />
</LinearLayout>
-->
<android.support.v7.widget.RecyclerView
android:id="@+id/list_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/address"
android:layout_marginTop="@dimen/dp_20"
android:nestedScrollingEnabled="false" />
</RelativeLayout>
<View
android:id="@+id/line3"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_below="@id/list_label"
android:layout_below="@id/rela"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_20"
... ... @@ -195,9 +202,8 @@
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:background="#d7d7d7"
android:layout_below="@+id/tv1"
android:layout_marginTop="@dimen/dp_15"
/>
android:background="#d7d7d7" />
</RelativeLayout>
... ...
... ... @@ -2,12 +2,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--android:layout_below="@id/tv_zhengshu"-->
<ImageView
android:id="@+id/img_zhengshu"
android:layout_width="@dimen/dp_105"
android:layout_height="@dimen/dp_75"
android:layout_below="@id/tv_zhengshu"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_30"
android:src="@mipmap/zhengshu" />
... ...
... ... @@ -2,12 +2,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--android:layout_below="@id/tv_shixi"-->
<TextView
android:id="@+id/tv_company"
android:layout_width="@dimen/dp_180"
android:layout_height="wrap_content"
android:layout_below="@id/tv_shixi"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_25"
android:text="北京华航唯实机器人科技..."
... ...
... ... @@ -3,12 +3,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--android:layout_below="@id/tv_peixun"-->
<TextView
android:id="@+id/tv_school"
android:layout_width="@dimen/dp_180"
android:layout_height="wrap_content"
android:layout_below="@id/tv_peixun"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_25"
android:text="华航筑梦"
... ...
... ... @@ -4,17 +4,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#ffffff"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_370">
android:layout_height="@dimen/dp_370"
android:background="@color/color_ffffff"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_ffffff"
android:orientation="vertical">
<TextView
... ...
... ... @@ -7,7 +7,9 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_370">
android:layout_height="@dimen/dp_370"
android:background="@color/color_ffffff"
>
<LinearLayout
android:layout_width="match_parent"
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="bottom|center_horizontal"
android:orientation="vertical"
>
android:orientation="vertical">
<TextView
android:id="@+id/tv_time"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/view_long"
android:text="4小时"
android:textColor="#FFFFFF" />
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/dp_35"
android:gravity="center_horizontal"
android:orientation="vertical"
android:layout_marginLeft="@dimen/dp_8"
>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0"
android:layout_weight="1" />
<!--<TextView-->
<!--android:id="@+id/tv_time"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginBottom="@dimen/dp_10"-->
<!--android:gravity="center"-->
<!--android:text="4小时"-->
<!--android:textColor="#FFFFFF" />-->
<com.hh.xuetubao.pieview.PColumn
android:id="@+id/pcolum"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_200"
android:layout_gravity="bottom|center_horizontal"
/>
</LinearLayout>
<View
android:id="@+id/view_long"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_100"
android:layout_above="@+id/tv_day"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/dp_5"
android:background="@drawable/tall" />
<!--<View-->
<!--android:id="@+id/view_long"-->
<!--android:layout_width="@dimen/dp_10"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_above="@+id/tv_day"-->
<!--android:layout_gravity="bottom|center_horizontal"-->
<!--android:layout_marginBottom="@dimen/dp_30"-->
<!--android:background="@drawable/tall" />-->
<!--android:layout_marginBottom="@dimen/dp_5"-->
<TextView
android:id="@+id/tv_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/dp_25"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_5"
android:layout_gravity="bottom"
android:text="12.10"
android:textColor="#FFFFFF" />
</LinearLayout>
</FrameLayout>
... ...
... ... @@ -120,8 +120,8 @@
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_7"
android:background="#f5f5f5"
android:layout_height="@dimen/dp_1"
android:background="#EEEEEE"
android:layout_below="@+id/linnn"
/>
... ...
... ... @@ -2,11 +2,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--android:layout_below="@+id/tv_title"-->
<ImageView
android:id="@+id/img_one"
android:layout_width="@dimen/dp_21"
android:layout_height="@dimen/dp_21"
android:layout_below="@+id/tv_title"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_10"
android:src="@mipmap/tv" />
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_job"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:text="销售工程师"
android:textColor="#232323"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:text="6K-8K"
android:textColor="#FF5400"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_company"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_job"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:text="上海鉴泉自动化科技有限公司"
android:textColor="#232323"
android:textSize="14sp" />
<LinearLayout
android:id="@+id/lin_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_company"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#F8F8F8">
<TextView
android:id="@+id/jingyan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/circle_f8f8f8_3"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:text="无经验"
android:textColor="#A9A9A9"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8">
<TextView
android:id="@+id/xueli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/circle_f8f8f8_3"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:text="不限学历"
android:textColor="#A9A9A9"
android:textSize="11sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:background="#F8F8F8">
<TextView
android:id="@+id/address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/circle_f8f8f8_3"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_5"
android:text="上海市金山区"
android:textColor="#A9A9A9"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:layout_below="@+id/lin_tab" />
<View
android:id="@+id/line2"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_7"
android:layout_below="@+id/line"
android:background="#f5f5f5" />
</RelativeLayout>
... ...
... ... @@ -37,7 +37,6 @@
android:id="@+id/year"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/dp_5"
android:paddingTop="@dimen/dp_3"
android:paddingRight="@dimen/dp_5"
android:paddingBottom="@dimen/dp_3"
... ...
... ... @@ -30,5 +30,8 @@
<color name="color_b0b0b0">#b0b0b0</color>
<color name="color_tm">#80000000</color>
<color name="color_fee3e0">#FEE3E0</color>
<color name="start_Color">#33FFFFFF</color>
<color name="end_color">#ffffff</color>
</resources>
... ...