0

I would like to evenly divide a page between an ArcGISRuntime MapView and a ListView that displays attributes for elements in the map. I am using Xamarin Android.

After some research, it seemed that GridLayout was the preferred way to divide up a page proportionally. I have prototyped this by setting rowCount=2 on the GridLayout and layout_rowHeight="1" for each row.

In all of the ESRI Xamarin Andoir samples that I have looked at, the pattern is to create the layout in code. When I try this, I am unable to set the rowHeight property on a MapView.

When I try to create the layout in XML, I define the namespace for the MapView using lowercase, but GridView appears to have a whitelist of views that it can contain.I get an error "The element 'GridLayout' has invalid child element 'MapView'.

toddw
  • 81
  • 8

1 Answers1

0

The Mapview control isn't special so the approach you would use is the same as any other axml you'd use to split a view in two columns.

Here's another good post that covers this Android GridLayout Equal Column Widths

Also look at our demos repo which includes more full-blown app samples including Xamarin android using axml: https://github.com/Esri/arcgis-runtime-demos-dotnet

/Morten ArcGIS Runtime Team

Community
  • 1
  • 1
dotMorten
  • 1,953
  • 1
  • 14
  • 10
  • Thank you for your guidance. I reviewed the samples that you referenced and I couldn't find any that were relevant to my problem. Is it possible for the ArcGIS Runtime Team to create a basic GIS sample for Xamarin Android? For a set of features, I would like to see their spatial attributes in a map and their non-spatial attributes in a table on the same page. I would like the table to scroll and take up a fixed percentage of the screen. I would like the table and the map to be synchronized so that clicking in one would highight the corresponding attributes in the other. – toddw Mar 20 '17 at 20:28