java - Getting the maximum size of a list from other class -
i trying maximum size of list on other class set maximum size in loop class. result, doesn't read size get. here code:
users.java
private void populatelist() { cusinfomanipulator c = new cusinfomanipulator(this); int max = c.getmaxsize(); for(int x = 0;x<max;x++){ hashmap<string, string> value= new hashmap<string,string>(); c.listdata(x); value.put("username", "username: " + c.getuserl()); value.put("name","customer name: "+ c.getfnamel() +" "+ c.getlnamel()); value.put("address", "address: " + c.getaddressl()); value.put("landmark", "landmarks: " + c.getlandmrkl()); value.put("num1", "contact number 1: " + c.getnuml()); value.put("num2","contact number 2: " + c.getnum2l()); list.add(value); } } the maximum size of list parse cloud:
list<parseobject> searchitems = query.find(); int max = searchitems.size(); public int getmaxsize() { return max; } can please me figure out went wrong in code , why doesn't max size?
not sure maybe should do:
public int getmaxsize() { list<parseobject> searchitems = query.find(); int max = searchitems.size(); return max; }
Comments
Post a Comment