<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need help with compass on Xamarin Android map in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327887#M3880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's returning null, you probably have a resource generating issue in your code, or&amp;nbsp;an issue with how you include the .axml in your project.&amp;nbsp;The Xamarin forums are probably a better place to help trouble-shoot that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you set the content too like this?&lt;BR /&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs#L27" title="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs#L27"&gt;arcgis-toolkit-dotnet/CompassMapViewSample.cs at master · Esri/arcgis-toolkit-dotnet · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set the build action to&amp;nbsp;&lt;SPAN class="" style="color: #22863a; background-color: #ffffff;"&gt;AndroidResource as well as placing it under&amp;nbsp;&lt;SPAN style="color: #032f62;"&gt;Resources\layout\&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2020 17:22:56 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2020-04-24T17:22:56Z</dc:date>
    <item>
      <title>Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327883#M3876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to figure out how to put a compass on a map view in a xamarin android application. I wrote (copied from your github example) this code, and went as far as to create a compass.png file in the Drawables resource directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Activity:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #008080;"&gt; _compass = FindViewById&amp;lt;Compass&amp;gt;(Resource.Id.compass);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _compass.GeoView = _mapFrag.MyMapView;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080;"&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;_compass.AutoHide = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;In compass.axml:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;lt;RelativeLayout xmlns:android="&lt;A href="http://schemas.android.com/apk/res/android" style="color: #008080;"&gt;http://schemas.android.com/apk/res/android&lt;/A&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:orientation="vertical"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="match_parent"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="match_parent"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Esri.ArcGISRuntime.Toolkit.UI.Controls.Compass&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width="30dp"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height="30dp"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignParentRight="true"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_alignParentTop="true"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginTop="20dp"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_marginRight="20dp"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:id="@+id/compass" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; color: #008080;"&gt;&amp;lt;/RelativeLayout&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;I'll be the first to admit that markup is not my forte. I've been scouring the Internet for documentation (I know, it's a dirty word). I've come up with a bunch of sites and documents that brag about a Compass control, and a github with compass code drowning in some larger (demonstration) project that I can't sort out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;The FindViewById returns null.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;env:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;VisualStudio 19 / Windoze 10 / Xamarin Android&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;Esri.ArcGISRuntime =&amp;gt; v100.6.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;Esri.ArcGISRuntime.Toolkit =&amp;gt; v100.4.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;Esri.ArcGISRuntime.Xamarin.Android =&amp;gt; v100.6.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;(note: I tried at some point in the past to bring all the libraries up to date, and it broke something else in the project)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px; color: black;"&gt;Any help working this out would be appreciated. Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2020 22:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327883#M3876</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2020-04-22T22:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327884#M3877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all,&amp;nbsp;I'd recommend you keep the versions in sync. If you target 100.6 of the runtime, make the toolkit also use v100.6. That guarantees the greatest compatibility.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrt to how to declare the compass, see the Compass sample in the repo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;axml:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Resources/layout/CompassMapViewSample.axml" title="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Resources/layout/CompassMapViewSample.axml"&gt;https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Resources/layout/CompassMapViewSample.axml&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code-behind:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs" title="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs"&gt;https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(you can skip the Seekbar slider bit - the samples are really meant to be functional tests and the slider is there to test resizing works correctly)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2020 23:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327884#M3877</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-04-22T23:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327885#M3878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right. Well, that's where I got the code snippets in the first place, so clearly there's something that I'm missing. When I run the code, FindViewById returns null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 00:01:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327885#M3878</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2020-04-23T00:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327886#M3879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I sync’d the libraries at 100.6.0. The code snippet I originally floated yesterday came from the two links that you supplied. Still, FindViewById returns null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 17:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327886#M3879</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2020-04-23T17:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327887#M3880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's returning null, you probably have a resource generating issue in your code, or&amp;nbsp;an issue with how you include the .axml in your project.&amp;nbsp;The Xamarin forums are probably a better place to help trouble-shoot that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you set the content too like this?&lt;BR /&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs#L27" title="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/Samples/Toolkit.SampleApp.Android/Samples/CompassMapViewSample.cs#L27"&gt;arcgis-toolkit-dotnet/CompassMapViewSample.cs at master · Esri/arcgis-toolkit-dotnet · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set the build action to&amp;nbsp;&lt;SPAN class="" style="color: #22863a; background-color: #ffffff;"&gt;AndroidResource as well as placing it under&amp;nbsp;&lt;SPAN style="color: #032f62;"&gt;Resources\layout\&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 17:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327887#M3880</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-04-24T17:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with compass on Xamarin Android map</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327888#M3881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;I assume you set the content too like this?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;arcgis-toolkit-dotnet/CompassMapViewSample.cs at master · Esri/arcgis-toolkit-dotnet · GitHub(Resource.Id.compass);&lt;/P&gt;&lt;P&gt;            if(_compass != null) {&lt;/P&gt;&lt;P&gt;                _compass.GeoView = _mapFrag.MyMapView;&lt;/P&gt;&lt;P&gt;                _compass.AutoHide = false;&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The build action is AnrdoidResource, and the layout lives under Resources/Layout. To be honest, I didn’t know which would be a more appropriate forum. I am trying to extrapolate from your compass code example. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 19:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/need-help-with-compass-on-xamarin-android-map/m-p/327888#M3881</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2020-04-27T19:00:17Z</dc:date>
    </item>
  </channel>
</rss>

