...
|
...
|
@@ -21,6 +21,7 @@ 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;
|
...
|
...
|
@@ -40,6 +41,8 @@ import com.hh.xuetubao.model.ZhaopinModel; |
|
|
import com.hh.xuetubao.mvp.BaseMvpFragment;
|
|
|
import com.hh.xuetubao.mvp.CommonPresenter;
|
|
|
import com.hh.xuetubao.mvp.ICommonView;
|
|
|
import com.hh.xuetubao.stacklabel.OnLabelClickListener;
|
|
|
import com.hh.xuetubao.stacklabel.StackLabel;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
...
|
...
|
@@ -96,6 +99,26 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
SelectBean companyBean = new SelectBean();
|
|
|
SelectBean yqBean = new SelectBean();
|
|
|
|
|
|
// 类别
|
|
|
List<String> lebeiA = new ArrayList<>(); // 数据
|
|
|
List<String> lebeiB = new ArrayList<>(); // 数据
|
|
|
List<String> lb_one = new ArrayList<>(); // 选中
|
|
|
List<String> lb_two = new ArrayList<>(); // 选中
|
|
|
|
|
|
// 公司
|
|
|
List<String> gsA = new ArrayList<>(); // 数据
|
|
|
List<String> gsB = new ArrayList<>(); // 数据
|
|
|
List<String> gs_one = new ArrayList<>(); // 选中
|
|
|
List<String> gs_two = new ArrayList<>(); // 选中
|
|
|
|
|
|
// 公司
|
|
|
List<String> yqA = new ArrayList<>(); // 数据
|
|
|
List<String> yqB = new ArrayList<>(); // 数据
|
|
|
List<String> yqC = new ArrayList<>(); // 数据
|
|
|
List<String> yq_one = new ArrayList<>(); // 选中
|
|
|
List<String> yq_two = new ArrayList<>(); // 选中
|
|
|
List<String> yq_three = new ArrayList<>(); // 选中
|
|
|
|
|
|
@Override
|
|
|
public int getLayoutId() {
|
|
|
return R.layout.fragment_office;
|
...
|
...
|
@@ -193,36 +216,71 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
hangyeList.addAll(propListBeans);
|
|
|
for (int i = 0; i < hangyeList.size(); i++) {
|
|
|
String propName = hangyeList.get(i).getPropName();
|
|
|
lebeiA.add(propName);
|
|
|
}
|
|
|
lb_one.add(hangyeList.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 2) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
zhinengList.addAll(propListBeans);
|
|
|
for (int i = 0; i < zhinengList.size(); i++) {
|
|
|
String propName = zhinengList.get(i).getPropName();
|
|
|
lebeiB.add(propName);
|
|
|
}
|
|
|
lb_two.add(zhinengList.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 3) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
xingzhiList.addAll(propListBeans);
|
|
|
for (int i = 0; i < xingzhiList.size(); i++) {
|
|
|
String propName = xingzhiList.get(i).getPropName();
|
|
|
gsA.add(propName);
|
|
|
}
|
|
|
gs_one.add(xingzhiList.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 4) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
guiMoList.addAll(propListBeans);
|
|
|
for (int i = 0; i < propListBeans.size(); i++) {
|
|
|
String propName = propListBeans.get(i).getPropName();
|
|
|
gsB.add(propName);
|
|
|
}
|
|
|
gs_two.add(propListBeans.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 5) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
xueLiList.addAll(propListBeans);
|
|
|
for (int i = 0; i < propListBeans.size(); i++) {
|
|
|
String propName = propListBeans.get(i).getPropName();
|
|
|
yqA.add(propName);
|
|
|
}
|
|
|
yq_one.add(propListBeans.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 6) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
jingYanList.addAll(propListBeans);
|
|
|
for (int i = 0; i < propListBeans.size(); i++) {
|
|
|
String propName = propListBeans.get(i).getPropName();
|
|
|
yqB.add(propName);
|
|
|
}
|
|
|
yq_two.add(propListBeans.get(0).getPropName());
|
|
|
}
|
|
|
if (api == 8 && intent == 7) {
|
|
|
AddressBean bean = (AddressBean) o;
|
|
|
List<AddressBean.PropListBean> propListBeans = bean.getPropList();
|
|
|
zhiYeList.addAll(propListBeans);
|
|
|
for (int i = 0; i < propListBeans.size(); i++) {
|
|
|
String propName = propListBeans.get(i).getPropName();
|
|
|
yqC.add(propName);
|
|
|
}
|
|
|
yq_three.add(propListBeans.get(0).getPropName());
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -261,57 +319,61 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
public void onClick(View v) {
|
|
|
switch (v.getId()) {
|
|
|
case R.id.lin_category:
|
|
|
showCategoryPop(hangyeList, zhinengList);
|
|
|
showDrop1(lebeiA, lebeiB);
|
|
|
break;
|
|
|
case R.id.lin_city:
|
|
|
showCityPop(getActivity(), provinceList, cityList);
|
|
|
break;
|
|
|
case R.id.lin_company:
|
|
|
showCompanyPop(xingzhiList, guiMoList);
|
|
|
case R.id.lin_company: // 公司
|
|
|
showDrop2(gsA, gsB);
|
|
|
break;
|
|
|
case R.id.lin_require:
|
|
|
showRequirePop(xueLiList, jingYanList, zhiYeList);
|
|
|
case R.id.lin_require: // 要求
|
|
|
showDrop3(yqA, yqB, yqC);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//职位->类别弹窗
|
|
|
private void showCategoryPop(final List<AddressBean.PropListBean> propList, final List<AddressBean.PropListBean> zhinengList) {
|
|
|
/* 类别 */
|
|
|
private void showDrop1(final List<String> lebeiA, final List<String> lebeiB) {
|
|
|
|
|
|
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_category, null);
|
|
|
GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
final StackLabel stack1 = contentView.findViewById(R.id.stacklabel_a);
|
|
|
final StackLabel stack2 = contentView.findViewById(R.id.stacklabel_b);
|
|
|
|
|
|
final GridViewAdapter adapter = new GridViewAdapter(propList, getActivity());
|
|
|
gridOne.setAdapter(adapter);
|
|
|
adapter.setClickPosition(lbBean.getSelectA());
|
|
|
View reset = contentView.findViewById(R.id.tv_reset);
|
|
|
View sure = contentView.findViewById(R.id.tv_sure);
|
|
|
|
|
|
final GridViewAdapter adapter1 = new GridViewAdapter(zhinengList, getActivity());
|
|
|
gridTwo.setAdapter(adapter1);
|
|
|
adapter1.setClickPosition(lbBean.getSelectB());
|
|
|
stack1.setLabels(lebeiA);
|
|
|
stack2.setLabels(lebeiB);
|
|
|
|
|
|
gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter.setClickPosition(position);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
requestBody.setCompanyIndustry(propList.get(position).getPropId());
|
|
|
stack1.setSelectMode(true, lb_one);
|
|
|
stack2.setSelectMode(true, lb_two);
|
|
|
|
|
|
lbBean.setSelectA(position);
|
|
|
stack1.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (lb_one.size() > 1) {
|
|
|
lb_one.remove(1);
|
|
|
}
|
|
|
lb_one.remove(0);
|
|
|
lb_one.add(lebeiA.get(index));
|
|
|
stack1.setSelectMode(true, lb_one);
|
|
|
lb_one.add(index + "");
|
|
|
Log.e("lb_one", lb_one.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
stack2.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter1.setClickPosition(position);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
requestBody.setJobFunction(zhinengList.get(position).getPropId());
|
|
|
|
|
|
lbBean.setSelectB(position);
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (lb_two.size() > 1) {
|
|
|
lb_two.remove(1);
|
|
|
}
|
|
|
lb_two.remove(0);
|
|
|
lb_two.add(lebeiB.get(index));
|
|
|
stack2.setSelectMode(true, lb_two);
|
|
|
lb_two.add(index + "");
|
|
|
Log.e("lb_two", lb_two.toString());
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -326,277 +388,288 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
reset.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
|
|
|
lbBean.setSelectA(0);
|
|
|
lbBean.setSelectB(0);
|
|
|
if (lb_one.size() > 0) {
|
|
|
lb_one.remove(0);
|
|
|
}
|
|
|
|
|
|
adapter.setClickPosition(0);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
adapter1.setClickPosition(0);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
lb_one.add(lebeiA.get(0));
|
|
|
stack1.setSelectMode(true, lb_one);
|
|
|
|
|
|
requestBody.setCompanyIndustry(null);
|
|
|
requestBody.setJobFunction(null);
|
|
|
if (lb_two.size() > 0) {
|
|
|
lb_two.remove(0);
|
|
|
}
|
|
|
lb_two.add(lebeiB.get(0));
|
|
|
stack2.setSelectMode(true, lb_two);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
sure.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
popupWindow.dismiss();
|
|
|
chageAlpha(1f);
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
|
|
|
doRequset(requestBody);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
@Override
|
|
|
public void onDismiss() {
|
|
|
chageAlpha(1f);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
private void doRequset(JobSearchBody body) {
|
|
|
Log.e("zhangtao:request", body.toString());
|
|
|
Log.e("zhangtao", "=================================================");
|
|
|
MyServer myServer = HttpUtils.getInstance().getServer(NetConfig.zhaopinUrl);
|
|
|
myServer.JobSearch(body)
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(new BaseObsever() {
|
|
|
@Override
|
|
|
public void onNext(Object value) {
|
|
|
super.onNext(value);
|
|
|
HotJobBean hotJobBean = (HotJobBean) value;
|
|
|
List<HotJobBean.JobListBean> jobListBeans = hotJobBean.getJobList();
|
|
|
|
|
|
jobList.clear();
|
|
|
jobList.addAll(jobListBeans);
|
|
|
jobHuntWorkAdapter.notifyDataSetChanged();
|
|
|
|
|
|
if (lb_one.size() > 0) {
|
|
|
if (!lb_one.get(0).equals("不限")) {
|
|
|
requestBody.setCompanyIndustry(hangyeList.get(Integer.valueOf(lb_one.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setCompanyIndustry(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setCompanyIndustry(null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onError(Throwable e) {
|
|
|
super.onError(e);
|
|
|
if (lb_two.size() > 0) {
|
|
|
if (!lb_two.get(0).equals("不限")) {
|
|
|
requestBody.setJobFunction(zhinengList.get(Integer.valueOf(lb_two.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setJobFunction(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setJobFunction(null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onComplete() {
|
|
|
super.onComplete();
|
|
|
}
|
|
|
});
|
|
|
doRequset(requestBody);
|
|
|
popupWindow.dismiss();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
//职位->要求弹窗
|
|
|
private void showRequirePop(final List<AddressBean.PropListBean> xueLiList, final List<AddressBean.PropListBean> jingYanList, final List<AddressBean.PropListBean> zhiYeList) {
|
|
|
/* 公司 */
|
|
|
private void showDrop2(final List<String> gsA, final List<String> gsB) {
|
|
|
|
|
|
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_require, null);
|
|
|
GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
GridView gridThree = (GridView) contentView.findViewById(R.id.grid_three);
|
|
|
final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_category, null);
|
|
|
final StackLabel stack1 = contentView.findViewById(R.id.stacklabel_a);
|
|
|
final StackLabel stack2 = contentView.findViewById(R.id.stacklabel_b);
|
|
|
View reset = contentView.findViewById(R.id.tv_reset);
|
|
|
View sure = contentView.findViewById(R.id.tv_sure);
|
|
|
|
|
|
final GridViewAdapter adapter = new GridViewAdapter(xueLiList, getActivity());
|
|
|
gridOne.setAdapter(adapter);
|
|
|
final GridViewAdapter adapter1 = new GridViewAdapter(jingYanList, getActivity());
|
|
|
gridTwo.setAdapter(adapter1);
|
|
|
final GridViewAdapter adapter2 = new GridViewAdapter(zhiYeList, getActivity());
|
|
|
gridThree.setAdapter(adapter2);
|
|
|
TextView title_one = contentView.findViewById(R.id.title_one);
|
|
|
TextView title_two = contentView.findViewById(R.id.title_two);
|
|
|
title_one.setText("公司性质");
|
|
|
title_two.setText("团队规模");
|
|
|
|
|
|
adapter.setClickPosition(yqBean.getSelectA());
|
|
|
adapter1.setClickPosition(yqBean.getSelectB());
|
|
|
adapter2.setClickPosition(yqBean.getSelectC());
|
|
|
stack1.setLabels(gsA);
|
|
|
stack2.setLabels(gsB);
|
|
|
|
|
|
gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter.setClickPosition(position);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
requestBody.setEducation(xueLiList.get(position).getPropId());
|
|
|
yqBean.setSelectA(position);
|
|
|
}
|
|
|
});
|
|
|
stack1.setSelectMode(true, gs_one);
|
|
|
stack2.setSelectMode(true, gs_two);
|
|
|
|
|
|
gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
stack1.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter1.setClickPosition(position);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
requestBody.setExprience(jingYanList.get(position).getPropId());
|
|
|
yqBean.setSelectB(position);
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (gs_one.size() > 1) {
|
|
|
gs_one.remove(1);
|
|
|
}
|
|
|
gs_one.remove(0);
|
|
|
gs_one.add(gsA.get(index));
|
|
|
stack1.setSelectMode(true, gs_one);
|
|
|
gs_one.add(index + "");
|
|
|
Log.e("gs_one", gs_one.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
gridThree.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
stack2.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter2.setClickPosition(position);
|
|
|
adapter2.notifyDataSetChanged();
|
|
|
requestBody.setJobNature(zhiYeList.get(position).getPropId());
|
|
|
yqBean.setSelectC(position);
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (gs_two.size() > 1) {
|
|
|
gs_two.remove(1);
|
|
|
}
|
|
|
gs_two.remove(0);
|
|
|
gs_two.add(gsB.get(index));
|
|
|
stack2.setSelectMode(true, gs_two);
|
|
|
gs_two.add(index + "");
|
|
|
Log.e("gs_two", gs_two.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linRequire.getBottom());
|
|
|
final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linCompany.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(linRequire);
|
|
|
popupWindow.showAsDropDown(linCompany);
|
|
|
|
|
|
reset.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
|
|
|
yqBean.setSelectA(0);
|
|
|
yqBean.setSelectB(0);
|
|
|
yqBean.setSelectC(0);
|
|
|
|
|
|
adapter.setClickPosition(0);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
adapter1.setClickPosition(0);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
adapter2.setClickPosition(0);
|
|
|
adapter2.notifyDataSetChanged();
|
|
|
|
|
|
requestBody.setEducation(null);
|
|
|
requestBody.setExprience(null);
|
|
|
requestBody.setJobNature(null);
|
|
|
|
|
|
if (gs_one.size() > 0) {
|
|
|
gs_one.remove(0);
|
|
|
}
|
|
|
|
|
|
gs_one.add(gsA.get(0));
|
|
|
stack1.setSelectMode(true, gs_one);
|
|
|
|
|
|
if (gs_two.size() > 0) {
|
|
|
gs_two.remove(0);
|
|
|
}
|
|
|
gs_two.add(gsB.get(0));
|
|
|
stack2.setSelectMode(true, gs_two);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
sure.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
popupWindow.dismiss();
|
|
|
chageAlpha(1f);
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
|
|
|
if (gs_one.size() > 0) {
|
|
|
if (!gs_one.get(0).equals("不限")) {
|
|
|
requestBody.setCompanyNature(xingzhiList.get(Integer.valueOf(gs_one.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setCompanyNature(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setCompanyNature(null);
|
|
|
}
|
|
|
|
|
|
if (gs_two.size() > 0) {
|
|
|
if (!gs_two.get(0).equals("不限")) {
|
|
|
requestBody.setCompanySize(guiMoList.get(Integer.valueOf(gs_two.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setCompanySize(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setCompanySize(null);
|
|
|
}
|
|
|
|
|
|
doRequset(requestBody);
|
|
|
popupWindow.dismiss();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
@Override
|
|
|
public void onDismiss() {
|
|
|
chageAlpha(1f);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//职位->公司弹窗
|
|
|
private void showCompanyPop(final List<AddressBean.PropListBean> xingzhiList, final List<AddressBean.PropListBean> guiMoList) {
|
|
|
/* 要求 */
|
|
|
private void showDrop3(final List<String> yqA, final List<String> yqB, final List<String> yqC) {
|
|
|
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_require, null);
|
|
|
final StackLabel stack1 = contentView.findViewById(R.id.stack_req_a);
|
|
|
final StackLabel stack2 = contentView.findViewById(R.id.stack_req_b);
|
|
|
final StackLabel stack3 = contentView.findViewById(R.id.stack_req_c);
|
|
|
|
|
|
View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_category, null);
|
|
|
TextView textOne = (TextView) contentView.findViewById(R.id.title_one);
|
|
|
TextView texttwo = (TextView) contentView.findViewById(R.id.title_two);
|
|
|
GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
|
|
|
textOne.setText("公司性质");
|
|
|
texttwo.setText("团队规模");
|
|
|
|
|
|
final GridViewAdapter adapter = new GridViewAdapter(xingzhiList, getActivity());
|
|
|
gridOne.setAdapter(adapter);
|
|
|
final GridViewAdapter adapter1 = new GridViewAdapter(guiMoList, getActivity());
|
|
|
gridTwo.setAdapter(adapter1);
|
|
|
stack1.setLabels(yqA);
|
|
|
stack2.setLabels(yqB);
|
|
|
stack3.setLabels(yqC);
|
|
|
|
|
|
adapter.setClickPosition(companyBean.getSelectA());
|
|
|
adapter1.setClickPosition(companyBean.getSelectB());
|
|
|
stack1.setSelectMode(true, yq_one);
|
|
|
stack2.setSelectMode(true, yq_two);
|
|
|
stack3.setSelectMode(true, yq_three);
|
|
|
|
|
|
gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
stack1.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter.setClickPosition(position);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
requestBody.setCompanyNature(xingzhiList.get(position).getPropId());
|
|
|
|
|
|
companyBean.setSelectA(position);
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (yq_one.size() > 1) {
|
|
|
yq_one.remove(1);
|
|
|
}
|
|
|
yq_one.remove(0);
|
|
|
yq_one.add(yqA.get(index));
|
|
|
stack1.setSelectMode(true, yq_one);
|
|
|
yq_one.add(index + "");
|
|
|
Log.e("yq_one", yq_one.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
stack2.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
adapter1.setClickPosition(position);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
requestBody.setCompanySize(guiMoList.get(position).getPropId());
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (yq_two.size() > 1) {
|
|
|
yq_two.remove(1);
|
|
|
}
|
|
|
yq_two.remove(0);
|
|
|
yq_two.add(yqB.get(index));
|
|
|
stack2.setSelectMode(true, yq_two);
|
|
|
yq_two.add(index + "");
|
|
|
Log.e("yq_two", yq_two.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
companyBean.setSelectB(position);
|
|
|
stack3.setOnLabelClickListener(new OnLabelClickListener() {
|
|
|
@Override
|
|
|
public void onClick(int index, View v, String s) {
|
|
|
if (yq_three.size() > 1) {
|
|
|
yq_three.remove(1);
|
|
|
}
|
|
|
yq_three.remove(0);
|
|
|
yq_three.add(yqC.get(index));
|
|
|
stack3.setSelectMode(true, yq_three);
|
|
|
yq_three.add(index + "");
|
|
|
Log.e("yq_three", yq_three.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
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
|
|
|
public void onClick(View v) {
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
|
|
|
companyBean.setSelectA(0);
|
|
|
companyBean.setSelectB(0);
|
|
|
if (yq_one.size() > 0) {
|
|
|
yq_one.remove(0);
|
|
|
}
|
|
|
yq_one.add(gsA.get(0));
|
|
|
stack1.setSelectMode(true, yq_one);
|
|
|
|
|
|
adapter.setClickPosition(0);
|
|
|
adapter.notifyDataSetChanged();
|
|
|
adapter1.setClickPosition(0);
|
|
|
adapter1.notifyDataSetChanged();
|
|
|
if (yq_two.size() > 0) {
|
|
|
yq_two.remove(0);
|
|
|
}
|
|
|
yq_two.add(gsB.get(0));
|
|
|
stack2.setSelectMode(true, yq_two);
|
|
|
|
|
|
requestBody.setCompanyNature(null);
|
|
|
requestBody.setCompanySize(null);
|
|
|
if (yq_three.size() > 0) {
|
|
|
yq_three.remove(0);
|
|
|
}
|
|
|
yq_three.add(gsB.get(0));
|
|
|
stack3.setSelectMode(true, yq_three);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
sure.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
popupWindow.dismiss();
|
|
|
chageAlpha(1f);
|
|
|
// sure.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
// sure.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
// reset.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
if (yq_one.size() > 0) {
|
|
|
if (!yq_one.get(0).equals("不限")) {
|
|
|
requestBody.setEducation(xueLiList.get(Integer.valueOf(yq_one.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setEducation(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setEducation(null);
|
|
|
}
|
|
|
|
|
|
if (yq_two.size() > 0) {
|
|
|
if (!yq_two.get(0).equals("不限")) {
|
|
|
requestBody.setExprience(jingYanList.get(Integer.valueOf(yq_two.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setExprience(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setExprience(null);
|
|
|
}
|
|
|
|
|
|
if (yq_three.size() > 0) {
|
|
|
if (!yq_three.get(0).equals("不限")) {
|
|
|
requestBody.setJobNature(zhiYeList.get(Integer.valueOf(yq_three.get(1))).getPropId());
|
|
|
} else {
|
|
|
requestBody.setJobNature(null);
|
|
|
}
|
|
|
} else {
|
|
|
requestBody.setJobNature(null);
|
|
|
}
|
|
|
|
|
|
doRequset(requestBody);
|
|
|
popupWindow.dismiss();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
@Override
|
|
|
public void onDismiss() {
|
|
|
chageAlpha(1f);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//职位->城市弹窗
|
...
|
...
|
@@ -624,20 +697,24 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
listOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
requestBody.setProvinceId(provinceList.get(position).getProvOid());
|
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
proviceId = provinceList.get(1).getProvOid();
|
|
|
listTwo.setVisibility(View.INVISIBLE);
|
|
|
cityBean.setSelectB(0);
|
|
|
requestBody.setProvinceId(null); // 不限
|
|
|
requestBody.setCityIdId(null); // 不限
|
|
|
} else if (cityBean.getSelectA() == position && cityBean.getSelectA() != 0) {
|
|
|
listTwo.setVisibility(View.VISIBLE);
|
|
|
popCityListAdapter.change(cityBean.getSelectB());
|
|
|
cityBean.setSelectB(cityBean.getSelectB());
|
|
|
requestBody.setProvinceId(provinceList.get(position).getProvOid());
|
|
|
} else {
|
|
|
proviceId = provinceList.get(position).getProvOid();
|
|
|
listTwo.setVisibility(View.VISIBLE);
|
|
|
popCityListAdapter.change(0);
|
|
|
requestBody.setProvinceId(provinceList.get(position).getProvOid());
|
|
|
}
|
|
|
|
|
|
// model.getModel(activity, 7, 2, proviceId, String.valueOf(true));
|
...
|
...
|
@@ -652,11 +729,13 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
listTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
@Override
|
|
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
requestBody.setCityIdId(cityList.get(position).getCityId());
|
|
|
if(position == 0){
|
|
|
requestBody.setCityIdId(null);
|
|
|
}else {
|
|
|
requestBody.setCityIdId(cityList.get(position).getCityId());
|
|
|
}
|
|
|
popCityListAdapter.change(position); // 改
|
|
|
|
|
|
cityBean.setSelectB(position);
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -692,20 +771,425 @@ public class OfficeFragment extends BaseMvpFragment<CommonPresenter, ZhaopinMode |
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
popupWindow.dismiss();
|
|
|
chageAlpha(1f);
|
|
|
|
|
|
Log.e("requestBody",requestBody.toString());
|
|
|
doRequset(requestBody);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
@Override
|
|
|
public void onDismiss() {
|
|
|
chageAlpha(1f);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 数据返回
|
|
|
private void doRequset(JobSearchBody body) {
|
|
|
Log.e("zhangtao:request", body.toString());
|
|
|
Log.e("zhangtao", "=================================================");
|
|
|
MyServer myServer = HttpUtils.getInstance().getServer(NetConfig.zhaopinUrl);
|
|
|
myServer.JobSearch(body)
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(new BaseObsever() {
|
|
|
@Override
|
|
|
public void onNext(Object value) {
|
|
|
super.onNext(value);
|
|
|
HotJobBean hotJobBean = (HotJobBean) value;
|
|
|
List<HotJobBean.JobListBean> jobListBeans = hotJobBean.getJobList();
|
|
|
|
|
|
jobList.clear();
|
|
|
jobList.addAll(jobListBeans);
|
|
|
jobHuntWorkAdapter.notifyDataSetChanged();
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onError(Throwable e) {
|
|
|
super.onError(e);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onComplete() {
|
|
|
super.onComplete();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
// private void showRequirePop(final List<AddressBean.PropListBean> xueLiList, final List<AddressBean.PropListBean> jingYanList, final List<AddressBean.PropListBean> zhiYeList) {
|
|
|
//
|
|
|
// View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_require, null);
|
|
|
// GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
// GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
// GridView gridThree = (GridView) contentView.findViewById(R.id.grid_three);
|
|
|
// final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
// final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
//
|
|
|
// final GridViewAdapter adapter = new GridViewAdapter(xueLiList, getActivity());
|
|
|
// gridOne.setAdapter(adapter);
|
|
|
// final GridViewAdapter adapter1 = new GridViewAdapter(jingYanList, getActivity());
|
|
|
// gridTwo.setAdapter(adapter1);
|
|
|
// final GridViewAdapter adapter2 = new GridViewAdapter(zhiYeList, getActivity());
|
|
|
// gridThree.setAdapter(adapter2);
|
|
|
//
|
|
|
// adapter.setClickPosition(yqBean.getSelectA());
|
|
|
// adapter1.setClickPosition(yqBean.getSelectB());
|
|
|
// adapter2.setClickPosition(yqBean.getSelectC());
|
|
|
//
|
|
|
// gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter.setClickPosition(position);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// requestBody.setEducation(xueLiList.get(position).getPropId());
|
|
|
// yqBean.setSelectA(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter1.setClickPosition(position);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// requestBody.setExprience(jingYanList.get(position).getPropId());
|
|
|
// yqBean.setSelectB(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// gridThree.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter2.setClickPosition(position);
|
|
|
// adapter2.notifyDataSetChanged();
|
|
|
// requestBody.setJobNature(zhiYeList.get(position).getPropId());
|
|
|
// yqBean.setSelectC(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// 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(linRequire);
|
|
|
//
|
|
|
// reset.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// yqBean.setSelectA(0);
|
|
|
// yqBean.setSelectB(0);
|
|
|
// yqBean.setSelectC(0);
|
|
|
//
|
|
|
// adapter.setClickPosition(0);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// adapter1.setClickPosition(0);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// adapter2.setClickPosition(0);
|
|
|
// adapter2.notifyDataSetChanged();
|
|
|
//
|
|
|
// requestBody.setEducation(null);
|
|
|
// requestBody.setExprience(null);
|
|
|
// requestBody.setJobNature(null);
|
|
|
// }
|
|
|
// });
|
|
|
// sure.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// popupWindow.dismiss();
|
|
|
// chageAlpha(1f);
|
|
|
// doRequset(requestBody);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
// @Override
|
|
|
// public void onDismiss() {
|
|
|
// chageAlpha(1f);
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
|
|
|
//职位->公司弹窗
|
|
|
// private void showCompanyPop(final List<AddressBean.PropListBean> xingzhiList, final List<AddressBean.PropListBean> guiMoList) {
|
|
|
//
|
|
|
// View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_category, null);
|
|
|
// TextView textOne = (TextView) contentView.findViewById(R.id.title_one);
|
|
|
// TextView texttwo = (TextView) contentView.findViewById(R.id.title_two);
|
|
|
// GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
// GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
// final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
// final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
//
|
|
|
// textOne.setText("公司性质");
|
|
|
// texttwo.setText("团队规模");
|
|
|
//
|
|
|
// final GridViewAdapter adapter = new GridViewAdapter(xingzhiList, getActivity());
|
|
|
// gridOne.setAdapter(adapter);
|
|
|
// final GridViewAdapter adapter1 = new GridViewAdapter(guiMoList, getActivity());
|
|
|
// gridTwo.setAdapter(adapter1);
|
|
|
//
|
|
|
// adapter.setClickPosition(companyBean.getSelectA());
|
|
|
// adapter1.setClickPosition(companyBean.getSelectB());
|
|
|
//
|
|
|
// gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter.setClickPosition(position);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// requestBody.setCompanyNature(xingzhiList.get(position).getPropId());
|
|
|
//
|
|
|
// companyBean.setSelectA(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter1.setClickPosition(position);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// requestBody.setCompanySize(guiMoList.get(position).getPropId());
|
|
|
//
|
|
|
// companyBean.setSelectB(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linCompany.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);
|
|
|
//
|
|
|
// reset.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
//// reset.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
//// reset.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// sure.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// sure.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
//
|
|
|
// companyBean.setSelectA(0);
|
|
|
// companyBean.setSelectB(0);
|
|
|
//
|
|
|
// adapter.setClickPosition(0);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// adapter1.setClickPosition(0);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
//
|
|
|
// requestBody.setCompanyNature(null);
|
|
|
// requestBody.setCompanySize(null);
|
|
|
// }
|
|
|
// });
|
|
|
// sure.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// popupWindow.dismiss();
|
|
|
// chageAlpha(1f);
|
|
|
//// sure.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
//// sure.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// reset.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// reset.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
//
|
|
|
// doRequset(requestBody);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
// @Override
|
|
|
// public void onDismiss() {
|
|
|
// chageAlpha(1f);
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
|
|
|
//职位->类别弹窗
|
|
|
// private void showCategoryPop(final List<AddressBean.PropListBean> propList, final List<AddressBean.PropListBean> zhinengList) {
|
|
|
//
|
|
|
// View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_category, null);
|
|
|
// GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
// GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
// final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
// final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
//
|
|
|
// final GridViewAdapter adapter = new GridViewAdapter(propList, getActivity());
|
|
|
// gridOne.setAdapter(adapter);
|
|
|
// adapter.setClickPosition(lbBean.getSelectA());
|
|
|
//
|
|
|
// final GridViewAdapter adapter1 = new GridViewAdapter(zhinengList, getActivity());
|
|
|
// gridTwo.setAdapter(adapter1);
|
|
|
// adapter1.setClickPosition(lbBean.getSelectB());
|
|
|
//
|
|
|
// gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter.setClickPosition(position);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// requestBody.setCompanyIndustry(propList.get(position).getPropId());
|
|
|
//
|
|
|
// lbBean.setSelectA(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
//
|
|
|
// gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter1.setClickPosition(position);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// requestBody.setJobFunction(zhinengList.get(position).getPropId());
|
|
|
//
|
|
|
// lbBean.setSelectB(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// final PopupWindow popupWindow = new PopupWindow(contentView, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT - linCategory.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(linCategory);
|
|
|
//
|
|
|
// reset.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
//// reset.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
//// reset.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// sure.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// sure.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
//
|
|
|
// lbBean.setSelectA(0);
|
|
|
// lbBean.setSelectB(0);
|
|
|
//
|
|
|
// adapter.setClickPosition(0);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// adapter1.setClickPosition(0);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
//
|
|
|
// requestBody.setCompanyIndustry(null);
|
|
|
// requestBody.setJobFunction(null);
|
|
|
// }
|
|
|
// });
|
|
|
// sure.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// popupWindow.dismiss();
|
|
|
// chageAlpha(1f);
|
|
|
//// sure.setBackgroundColor(getResources().getColor(R.color.color_ff5400));
|
|
|
//// sure.setTextColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// reset.setBackgroundColor(getResources().getColor(R.color.color_ffffff));
|
|
|
//// reset.setTextColor(getResources().getColor(R.color.color_6f6f6f));
|
|
|
//
|
|
|
// doRequset(requestBody);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
// @Override
|
|
|
// public void onDismiss() {
|
|
|
// chageAlpha(1f);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
//职位->要求弹窗
|
|
|
// private void showRequirePop(final List<AddressBean.PropListBean> xueLiList, final List<AddressBean.PropListBean> jingYanList, final List<AddressBean.PropListBean> zhiYeList) {
|
|
|
//
|
|
|
// View contentView = LayoutInflater.from(getActivity()).inflate(R.layout.pop_require, null);
|
|
|
// GridView gridOne = (GridView) contentView.findViewById(R.id.grid_one);
|
|
|
// GridView gridTwo = (GridView) contentView.findViewById(R.id.grid_two);
|
|
|
// GridView gridThree = (GridView) contentView.findViewById(R.id.grid_three);
|
|
|
// final TextView sure = (TextView) contentView.findViewById(R.id.tv_sure);
|
|
|
// final TextView reset = (TextView) contentView.findViewById(R.id.tv_reset);
|
|
|
//
|
|
|
// final GridViewAdapter adapter = new GridViewAdapter(xueLiList, getActivity());
|
|
|
// gridOne.setAdapter(adapter);
|
|
|
// final GridViewAdapter adapter1 = new GridViewAdapter(jingYanList, getActivity());
|
|
|
// gridTwo.setAdapter(adapter1);
|
|
|
// final GridViewAdapter adapter2 = new GridViewAdapter(zhiYeList, getActivity());
|
|
|
// gridThree.setAdapter(adapter2);
|
|
|
//
|
|
|
// adapter.setClickPosition(yqBean.getSelectA());
|
|
|
// adapter1.setClickPosition(yqBean.getSelectB());
|
|
|
// adapter2.setClickPosition(yqBean.getSelectC());
|
|
|
//
|
|
|
// gridOne.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter.setClickPosition(position);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// requestBody.setEducation(xueLiList.get(position).getPropId());
|
|
|
// yqBean.setSelectA(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// gridTwo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter1.setClickPosition(position);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// requestBody.setExprience(jingYanList.get(position).getPropId());
|
|
|
// yqBean.setSelectB(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// gridThree.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
// @Override
|
|
|
// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
// adapter2.setClickPosition(position);
|
|
|
// adapter2.notifyDataSetChanged();
|
|
|
// requestBody.setJobNature(zhiYeList.get(position).getPropId());
|
|
|
// yqBean.setSelectC(position);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// 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(linRequire);
|
|
|
//
|
|
|
// reset.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// yqBean.setSelectA(0);
|
|
|
// yqBean.setSelectB(0);
|
|
|
// yqBean.setSelectC(0);
|
|
|
//
|
|
|
// adapter.setClickPosition(0);
|
|
|
// adapter.notifyDataSetChanged();
|
|
|
// adapter1.setClickPosition(0);
|
|
|
// adapter1.notifyDataSetChanged();
|
|
|
// adapter2.setClickPosition(0);
|
|
|
// adapter2.notifyDataSetChanged();
|
|
|
//
|
|
|
// requestBody.setEducation(null);
|
|
|
// requestBody.setExprience(null);
|
|
|
// requestBody.setJobNature(null);
|
|
|
// }
|
|
|
// });
|
|
|
// sure.setOnClickListener(new View.OnClickListener() {
|
|
|
// @Override
|
|
|
// public void onClick(View v) {
|
|
|
// popupWindow.dismiss();
|
|
|
// chageAlpha(1f);
|
|
|
// doRequset(requestBody);
|
|
|
// }
|
|
|
// });
|
|
|
//
|
|
|
// popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
// @Override
|
|
|
// public void onDismiss() {
|
|
|
// chageAlpha(1f);
|
|
|
// }
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
private void chageAlpha(float color) {
|
|
|
WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes();
|
|
|
lp.alpha = color;
|
...
|
...
|
|