Vote count: 0
I have a process in which a user selects a city, then sees medical practitioners in that state.
I have results that show the name of the medical practice:
@Override
protected void onResume() {
super.onResume();
setProgressBarIndeterminateVisibility(true);
Bundle b = getIntent().getExtras();
final String[] resultArr = b.getStringArray("selectedItems");
String location = b.getString("selectedItems");
ParseQuery<ParseUser> query = ParseUser.getQuery();
query.orderByAscending(ParseConstants.KEY_PRACTICE_NAME);
query.findInBackground(new FindCallback<ParseUser>() {
@Override
public void done(List<ParseUser> users, ParseException e) {
setProgressBarIndeterminateVisibility(false);
if (e == null) {
// Success
//store users variable in Parse to mMidwifeLocations
mMidwives = users;
mCurrentUser = ParseUser.getCurrentUser();
//mMidwifeType = ParseUser.getString("usertype");
//store users in string array, locations
String[] midwives = new String[mMidwives.size()];
String[] locations = new String[mMidwives.size()];
String check;
String location;
int i = 0;
for(ParseUser user : mMidwives) {
//get city value from user, assign it to check variable
location = user.getString("city");
check = user.getString("userType");
if (!Arrays.asList(midwives).contains(check) && type != "patient" && Arrays.asList(resultArr).contains(location) ) {
//in locations array, assign practiename values
midwives[i] = user.getString("practicename");
}
}
i++;
I also want to return in the list the primary contact, address, and practice philosophy..what is the best strategy to do this? I am using a simple_list_item_1 list type...there are other list types...wondering if using one of those might be the answer..thanks in advance..
asked 50 secs ago
Android ListView, adding items from database in listview
Aucun commentaire:
Enregistrer un commentaire