intersectionMenuItem.setChecked(true); showGeometry(GeometryEngine.intersection(inputPolygon1, inputPolygon2)); return true; } else if (itemId == R.id.action_union) { unionMenuItem.setChecked(true); showGeometry(GeometryEngine.union(inputPolygon1, inputPolygon2)); return true; } else if (itemId == R.id.action_difference) { differenceMenuItem.setChecked(true); // note that the difference method gives different results depending on the order of input geometries showGeometry(GeometryEngine.difference(inputPolygon1, inputPolygon2)); return true; } else if (itemId == R.id.action_symmetric_difference) { symmetricDifferenceMenuItem.setChecked(true); showGeometry(GeometryEngine.symmetricDifference(inputPolygon1, inputPolygon2));