Skip to content

Commit

Permalink
Merge pull request #572 from Esri/ncastle/cert-fix-all
Browse files Browse the repository at this point in the history
Certification fixes
  • Loading branch information
nCastle1 authored Dec 14, 2018
2 parents 0fb74f1 + 412e6e5 commit d58a7a2
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public override View GetView(int position, View convertView, ViewGroup parent)

// Use white as the default text color (available transforms).
transformTextView.SetTextColor(Android.Graphics.Color.White);
transformTextView.SetBackgroundColor(Android.Graphics.Color.DarkGray);

// See if the transform is missing required projection engine files. If so, display the text in gray.
if (thisTransform.IsMissingProjectionEngineFiles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,28 +166,28 @@ private string GetOutputText(Geometry selectedGeometry)
// Add the point relationships to the output
if (selectedGeometry.GeometryType != GeometryType.Point)
{
output += "\tRelationship(s) with Point:\n";
output += " Relationship(s) with Point:\n";
foreach (SpatialRelationship relationship in pointRelationships)
{
output += $"\t\t{relationship}\n";
output += $" {relationship}\n";
}
}
// Add the polygon relationships to the output
if (selectedGeometry.GeometryType != GeometryType.Polygon)
{
output += "\tRelationship(s) with Polygon:\n";
output += " Relationship(s) with Polygon:\n";
foreach (SpatialRelationship relationship in polygonRelationships)
{
output += $"\t\t{relationship}\n";
output += $" {relationship}\n";
}
}
// Add the polyline relationships to the output
if (selectedGeometry.GeometryType != GeometryType.Polyline)
{
output += "\tRelationship(s) with Polyline:\n";
output += " Relationship(s) with Polyline:\n";
foreach (SpatialRelationship relationship in polylineRelationships)
{
output += $"\t\t{relationship}\n";
output += $" {relationship}\n";
}
}

Expand Down Expand Up @@ -224,7 +224,7 @@ private void CreateLayout()

// Create a Textview for the results.
_resultTextView = new TextView(this);
_resultTextView.SetMinHeight(350);
_resultTextView.SetMinLines(7);

//Add the labels to the layout.
layout.AddView(helpLabel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Esri.ArcGISRuntime.UI;
using Esri.ArcGISRuntime.UI.Controls;
using System;
using Android.Views;

namespace ArcGISRuntime.Samples.DisplayDrawingStatus
{
Expand All @@ -32,6 +33,9 @@ public class DisplayDrawingStatus : Activity
// Waiting popup
private AlertDialog _progressDialog;

// Status label
private TextView _statusLabel;

protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
Expand Down Expand Up @@ -75,10 +79,12 @@ private void OnDrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
if (e.Status == DrawStatus.InProgress)
{
_progressDialog.Show();
_statusLabel.Text = "Drawing status: In progress";
}
else
{
_progressDialog.Hide();
_statusLabel.Text = "Drawing status: Complete";
}
});
}
Expand All @@ -88,7 +94,11 @@ private void CreateLayout()
// Create a new vertical layout for the app
LinearLayout layout = new LinearLayout(this) { Orientation = Orientation.Vertical };

// Add the map view to the layout
_statusLabel = new TextView(this);
_statusLabel.Text = "Drawing status: unknown";

// Add the views to the layout
layout.AddView(_statusLabel);
layout.AddView(_myMapView);

// Create an activity indicator
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/iOS/ArcGISRuntime.Xamarin.Forms.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<OutputPath>..\..\..\output\Forms\iPhoneSimulator\release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>Full</MtouchLink>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchArch>i386, x86_64</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchSdkVersion>10.1</MtouchSdkVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ private void AnimatePlane()
{
// Update stats display.
_altitudeLabel.Text = $"{currentFrame.Elevation:F}m";
_headingLabel.Text = $"{currentFrame.Heading:F}°";
_pitchLabel.Text = $"{currentFrame.Pitch:F}°";
_rollLabel.Text = $"{currentFrame.Roll:F}°";
_headingLabel.Text = $"{currentFrame.Heading:F}\u00B0";
_pitchLabel.Text = $"{currentFrame.Pitch:F}\u00B0";
_rollLabel.Text = $"{currentFrame.Roll:F}\u00B0";
_progressLabel.Text = $"{missionProgress * 100:F}%";
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class DisplayDrawingStatus : UIViewController
// Hold references to the UI controls.
private MapView _myMapView;
private UIActivityIndicatorView _activityIndicator;
private UILabel _statusLabel;

public DisplayDrawingStatus()
{
Expand All @@ -52,15 +53,31 @@ public override void LoadView()
TranslatesAutoresizingMaskIntoConstraints = false
};

_statusLabel = new UILabel
{
Text = "Drawing status: Unknown",
AdjustsFontSizeToFitWidth = true,
TextAlignment = UITextAlignment.Center,
BackgroundColor = UIColor.FromWhiteAlpha(0, .6f),
TextColor = UIColor.White,
Lines = 1,
TranslatesAutoresizingMaskIntoConstraints = false
};

View = new UIView();
View.AddSubviews(_myMapView, _activityIndicator);
View.AddSubviews(_myMapView, _activityIndicator, _statusLabel);

_myMapView.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true;
_myMapView.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true;
_myMapView.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true;
_myMapView.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;

_activityIndicator.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true;
_statusLabel.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true;
_statusLabel.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true;
_statusLabel.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;
_statusLabel.HeightAnchor.ConstraintEqualTo(40).Active = true;

_activityIndicator.TopAnchor.ConstraintEqualTo(_statusLabel.BottomAnchor).Active = true;
_activityIndicator.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true;
_activityIndicator.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;
_activityIndicator.HeightAnchor.ConstraintEqualTo(40).Active = true;
Expand Down Expand Up @@ -103,10 +120,12 @@ private void OnMapViewDrawStatusChanged(object sender, DrawStatusChangedEventArg
if (e.Status == DrawStatus.InProgress)
{
_activityIndicator.Hidden = false;
_statusLabel.Text = "Drawing status: In progress";
}
else
{
_activityIndicator.Hidden = true;
_statusLabel.Text = "Drawing status: Completed";
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,29 @@ public override void LoadView()
_myMapView = new MapView();
_myMapView.TranslatesAutoresizingMaskIntoConstraints = false;

UILabel helpLabel = new UILabel
{
Text = "Tap to show the route to the nearest facility.",
AdjustsFontSizeToFitWidth = true,
TextAlignment = UITextAlignment.Center,
BackgroundColor = UIColor.FromWhiteAlpha(0, .6f),
TextColor = UIColor.White,
Lines = 1,
TranslatesAutoresizingMaskIntoConstraints = false
};

View = new UIView();
View.AddSubviews(_myMapView);
View.AddSubviews(_myMapView, helpLabel);

_myMapView.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true;
_myMapView.BottomAnchor.ConstraintEqualTo(View.BottomAnchor).Active = true;
_myMapView.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true;
_myMapView.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;

helpLabel.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor).Active = true;
helpLabel.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active = true;
helpLabel.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;
helpLabel.HeightAnchor.ConstraintEqualTo(40).Active = true;
}

public override void ViewDidLoad()
Expand Down

0 comments on commit d58a7a2

Please sign in to comment.