Guest User

Untitled

a guest
Nov 17th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. if (mResponse != null) {
  2. // Manually filter the proto message to the label descriptions
  3. ArrayList<String> labels = new ArrayList<String>();
  4. String labelstr = "";
  5.  
  6. if (mResponse != "No stored label data") {
  7. for (String it : mResponse.split(",")) {
  8. if (it.split(":")[0].contains("description")) {
  9. labels.add(it.split(":")[1]);
  10. labelstr += it.split(":")[1] + " / ";
  11. }
  12. }
  13. Log.d(TAG, "Found: " + labels.size() + " labels.");
  14. } else {
  15. Log.d(TAG, "Building cache...");
  16. }
  17. ((TextView) findViewById(R.id.response_data))
  18. .setText(labelstr);
  19. }
Add Comment
Please, Sign In to add comment