Android sample UI Tweaks

This commit is contained in:
Morten Nielsen 2018-07-10 16:14:39 -07:00
parent 2e4e6aa939
commit 3e26a65a7b
2 changed files with 16 additions and 8 deletions

View file

@ -168,8 +168,8 @@ namespace SampleApp.Droid
status.Text = string.Join("\n", messages.Reverse().Select(n=>n.ToString()));
if(message is Rmc rmc)
{
FindViewById<TextView>(Resource.Id.latitude).Text = "Latitude = " + rmc.Latitude.ToString();
FindViewById<TextView>(Resource.Id.longitude).Text = "Longitude = " + rmc.Longitude.ToString();
FindViewById<TextView>(Resource.Id.latitude).Text = "Latitude = " + rmc.Latitude.ToString("0.0000000");
FindViewById<TextView>(Resource.Id.longitude).Text = "Longitude = " + rmc.Longitude.ToString("0.0000000");
}
else if (message is Gga gga)
{

View file

@ -18,12 +18,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Altitude =" />
<Spinner
android:id="@+id/device_picker"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="NMEA Device:" />
<Spinner
android:id="@+id/device_picker"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"