I have fixed the original issue. See below.
map.setOnSingleTapListener(new OnSingleTapListener() {
private static final long serialVersionUID = 1L;
public void onSingleTap(float x, float y) {
if (!map.isLoaded()) {
return;
}
for (FeatureLayer featureLayer : gdbFeatureTableList) {
if (featureLayer.getFeatureIDs(x, y, 10, 10).length == 0) {
// Do nothing
}
else {
long [] selFeatures = featureLayer.getFeatureIDs(x, y, 10, 10);
if (selFeatures != null && selFeatures.length > 0) {
long targetID = selFeatures[0];
Feature feature = featureLayer.getFeature(targetID);
Map<String, Object> attributesMap = feature.getAttributes();
StringBuilder sb = new StringBuilder();
for (Entry<String, Object> att : attributesMap.entrySet()) {
if (!att.getKey().equalsIgnoreCase("GlobalID") && !att.getValue().toString().trim().equalsIgnoreCase("")) {
sb.append(att.getKey() + ": " + att.getValue().toString() + "\n");
}
}
String attributes = sb.toString();
callout.animatedShow(map.toMapPoint(new Point(x, y)), loadView(attributes));
}
}
}
}
});
Like I said, It's the simple things that get me...I now have a different issue. One of my FeatureLayers has many attributes. Not all of these attributes are being shown in the Callout. Is there a character or string max limit for the Callout?