我可以成功地将数据从数据库提取到recyclerview,我想将这个recyclerview数据导出为PDF ... 请提出任何可以帮助我的解决方案/逻辑.... 是否可以使用 Google REST API https://developers.google.com/fit/android/get-started
这就是我如何获取json ......
private void showJSONExp(String response){
try { JSONArray a = new JSONArray(response);
l.clear();
total = 0;
for (int i = 0; i<a.length(); i++)
{
JSONObject collegeData = a.getJSONObject(i);
id1 = collegeData.getString("id");
amount1 = collegeData.getString("amount");
total += Integer.parseInt(amount1);
description1 = collegeData.getString("description");
date1 = collegeData.getString("date");
emM = new ExpModel(id1, Integer.parseInt(amount1), description1, date1);
l.add(emM);
RADate.notifyDataSetChanged();
}
//Toast.makeText(getApplicationContext(), ""+total, Toast.LENGTH_SHORT).show();
totalExp.setText(String.valueOf(total));
} catch (JSONException e) {
e.printStackTrace();
}
}
提前致谢....