Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enter code here
- HashMap<String, String> map = new HashMap<>();
- map.put("", Variable Name);
- map.put("", Variable Name);
- TechnicianID.add("0");
- Technician.add("Select Technician");
- appDialogs.showProgressDialog();
- callAPiActivity.doPost((Activity) mContext, map, "URL, new GetApiResult() {
- @Override
- public void onSuccesResult(JSONObject result) throws JSONException {
- appDialogs.hideProgressDialog();
- JSONArray techArray = result.getJSONArray("data");
- for (int i = 0; i < techArray.length(); i++) {
- JSONObject techObj = techArray.getJSONObject(i);
- TechnicianID.add(techObj.getString("u_id"));
- Technician.add(techObj.getString("first_name"));
- }
- TechnicianAdapter = new ArrayAdapter(mContext, R.layout.simple_spinner_item, Technician);
- TechnicianAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);
- spinnerTechnician.setAdapter(TechnicianAdapter);
- }
- @Override
- public void onFailureResult(String messgae) throws JSONException {
- appDialogs.hideProgressDialog();
- appDialogs.setErrorToast(messgae);
- }
- @Override
- public void onNetworkRetry(String messgae) throws JSONException {
- }
- });
- }
Add Comment
Please, Sign In to add comment