public void OnBackClicked(View view) { if (!FragmentHelper.BackToPreviousFragment(this)) { Finish(); } }
public void OnAddAnchorClicked(View view) { var placementFragment = new AnchorPlacementFragment(); placementFragment.OnAnchorPlaced = OnAnchorPlaced; FragmentHelper.PushFragment(this, placementFragment); }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); if (CloudAnchorManager == null) { FragmentHelper.BackToPreviousFragment(Activity); } }
public void OnStartWatcherClicked(View view) { WatcherFragment watcherFragment = new WatcherFragment(); watcherFragment.CloudAnchorManager = cloudAnchorManager; watcherFragment.OnAnchorDiscovered = OnAnchorDiscovered; FragmentHelper.PushFragment(this, watcherFragment); }
public void OnAnchorCreationFailed(AnchorVisual placedAnchor, string errorMessage) { placedAnchor.Destroy(); FragmentHelper.BackToPreviousFragment(this); RunOnUiThread(() => { string toastMessage = "Failed to save anchor: " + errorMessage; Toast.MakeText(this, toastMessage, ToastLength.Long).Show(); }); }
public void OnAnchorPlaced(AnchorVisual placedAnchor) { var creationFragment = new AnchorCreationFragment(); creationFragment.OnAnchorCreated = OnAnchorCreated; creationFragment.OnAnchorCreationFailed = OnAnchorCreationFailed; creationFragment.CloudAnchorManager = cloudAnchorManager; creationFragment.PlacedVisual = placedAnchor; FragmentHelper.BackToPreviousFragment(this); FragmentHelper.PushFragment(this, creationFragment); }
private void StartWatcher() { if (CloudAnchorManager.LocatingAnchors) { FragmentHelper.BackToPreviousFragment(Activity); } watcher = CloudAnchorManager.StartLocating(new AnchorLocateCriteria { NearDevice = new NearDeviceCriteria { DistanceInMeters = 8.0f, MaxResultCount = 25 } }); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_coarse_reloc); arFragment = (ArFragment)SupportFragmentManager.FindFragmentById(Resource.Id.ar_fragment); sceneView = arFragment.ArSceneView; sensorStatusView = FindViewById <SensorStatusView>(Resource.Id.sensor_status); Scene scene = sceneView.Scene; scene.Update += (_, args) => { // Pass frames to Spatial Anchors for processing. cloudAnchorManager?.Update(sceneView.ArFrame); sensorStatusView.Update(); }; FragmentHelper.ReplaceFragment(this, new ActionSelectionFragment()); }
void IOnClickListener.OnClick(View view) { FragmentHelper.BackToPreviousFragment(Activity); }
private void OnLocateAnchorsCompleted( object sender, LocateAnchorsCompletedEvent locateAnchorsCompletedEvent) { FragmentHelper.BackToPreviousFragment(Activity); }
public void OnAnchorCreated(AnchorVisual createdAnchor) { createdAnchor.SetColor(this, Android.Graphics.Color.Green); FragmentHelper.BackToPreviousFragment(this); }