...
|
...
|
@@ -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;
|
...
|
...
|
@@ -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) {
|
|
|
//
|
...
|
...
|
|