Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ListView tableList = findViewById(R.id.transforms_list); mTransformAdapter = new DatumTransformationAdapter(this, mTransformValues); tableList.setAdapter(mTransformAdapter); tableList.setOnItemClickListener((AdapterView<?> adapterView, View view, int i, long l) -> { view.setSelected(true); DatumTransformation selectedTransform = (DatumTransformation) adapterView.getAdapter().getItem(i); Point projectedGeometry = null; try { projectedGeometry = (Point) GeometryEngine.project(mOriginalGeometry, mMapView.getSpatialReference(), selectedTransform); } catch (ArcGISRuntimeException agsEx) { Snackbar.make(tableList, agsEx.getMessage() + "\n" + getResources().getString(R.string.transform_missing_files), Snackbar.LENGTH_LONG).show(); removeProjectedGeometryGraphic(); return; } if (projectedGraphic == null) { projectedGraphic = addGraphic(projectedGeometry, Color.argb(255, 255, 0, 0), SimpleMarkerSymbol.Style.CROSS); } else { projectedGraphic.setGeometry(projectedGeometry); } }); CheckBox checkBox = findViewById(R.id.order_by_check_box); checkBox.setOnCheckedChangeListener((CompoundButton compoundButton, boolean newCheckState) -> { mUseExtentForSuitability = newCheckState; setupTransformsList(); }); mMapView = findViewById(R.id.mapView); mArcGISMap = new ArcGISMap(Basemap.createLightGrayCanvas()); mMapView.setMap(mArcGISMap); mOriginalGeometry = new Point(538985.355, 177329.516, SpatialReference.create(27700)); addGraphic(mOriginalGeometry, Color.argb(255, 0, 0, 255), SimpleMarkerSymbol.Style.SQUARE); mArcGISMap.addDoneLoadingListener(() -> { if (mArcGISMap.getLoadStatus() == LoadStatus.LOADED) { if (mTransformValues.size() == 0) { Viewpoint vp = new Viewpoint(mOriginalGeometry, 5000); mMapView.setViewpointAsync(vp, 2); checkPermissions(); } } }); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final ListView tableList = findViewById(R.id.transforms_list); mTransformAdapter = new DatumTransformationAdapter(this, mTransformValues); tableList.setAdapter(mTransformAdapter); tableList.setOnItemClickListener((AdapterView<?> adapterView, View view, int i, long l) -> { view.setSelected(true); DatumTransformation selectedTransform = (DatumTransformation) adapterView.getAdapter().getItem(i); Point projectedGeometry; try { projectedGeometry = (Point) GeometryEngine.project(mOriginalGeometry, mMapView.getSpatialReference(), selectedTransform); } catch (ArcGISRuntimeException agsEx) { Snackbar.make(tableList, agsEx.getMessage() + "\n" + getResources().getString(R.string.transform_missing_files), Snackbar.LENGTH_LONG).show(); removeProjectedGeometryGraphic(); return; } if (mProjectedGraphic == null) { mProjectedGraphic = addGraphic(projectedGeometry, Color.argb(255, 255, 0, 0), SimpleMarkerSymbol.Style.CROSS); } else { mProjectedGraphic.setGeometry(projectedGeometry); } }); CheckBox checkBox = findViewById(R.id.order_by_check_box); checkBox.setOnCheckedChangeListener((CompoundButton compoundButton, boolean newCheckState) -> { mUseExtentForSuitability = newCheckState; setupTransformsList(); }); mMapView = findViewById(R.id.mapView); mArcGISMap = new ArcGISMap(Basemap.createLightGrayCanvas()); mMapView.setMap(mArcGISMap); mOriginalGeometry = new Point(538985.355, 177329.516, SpatialReference.create(27700)); addGraphic(mOriginalGeometry, Color.argb(255, 0, 0, 255), SimpleMarkerSymbol.Style.SQUARE); mArcGISMap.addDoneLoadingListener(() -> { if (mArcGISMap.getLoadStatus() == LoadStatus.LOADED) { if (mTransformValues.size() == 0) { Viewpoint vp = new Viewpoint(mOriginalGeometry, 5000); mMapView.setViewpointAsync(vp, 2); checkPermissions(); } } }); }