Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void showRoute(String route) {
- try {
- JSONObject jsonObject = new JSONObject(route);
- String arrayData = jsonObject.getString("JsonData");
- JSONArray jsonArray = new JSONArray(arrayData);
- Log.d(TAG, "JSONArray" + ">>>>>>>>>>" + jsonArray);
- for (int i = 467; i < jsonArray.length(); i++) {
- int month=5;//set search condition, i want to show a list , it's month > 5
- if (Integer.parseInt(jsonArray.getJSONObject(i).getString("STARTMONTH"))>=month) {
- String EDUTITLE = jsonArray.getJSONObject(i).getString("EDUTITLE");
- String STARTMONTH = jsonArray.getJSONObject(i).getString("STARTMONTH");
- String STARTDAY = jsonArray.getJSONObject(i).getString("STARTDAY");
- String STARTDATE = jsonArray.getJSONObject(i).getString("STARTDATE");
- String SPONSER = jsonArray.getJSONObject(i).getString("SPONSER");
- String EDUSCORE = jsonArray.getJSONObject(i).getString("EDUSCORE");
- String EDUIN = jsonArray.getJSONObject(i).getString("EDUIN");
- String HOLDER = jsonArray.getJSONObject(i).getString("HOLDER");
- ActivityListItem listItem = new ActivityListItem(EDUTITLE, STARTMONTH, STARTDAY, STARTDATE, SPONSER, EDUSCORE, EDUIN, HOLDER);
- arrayList.add(listItem);
- }else {
- recyclerView.setVisibility(View.GONE);
- textForEmpty.setVisibility(View.VISIBLE);
- }
- //arrayListOrigin.add(listItem);
- }
- } catch (JSONException ex) {
- ex.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement