Permalink
Browse files

Various formatting fixes and corrections

  • Loading branch information...
asb3993 committed Apr 4, 2018
1 parent f9a1055 commit 5015eca68feb490dcc171282b653bbdb58da50c7
Showing with 80 additions and 772 deletions.
  1. +0 −1 Recipes/README.md
  2. +1 −1 Recipes/android/controls/autocomplete_text_view/README.md
  3. +0 −2 Recipes/android/controls/imageview/README.md
  4. BIN Recipes/android/controls/imageview/index/Images/DisplayImage.png
  5. +1 −1 Recipes/android/controls/webview/README.md
  6. +1 −4 Recipes/android/data/databases/README.md
  7. +0 −2 Recipes/android/data/databases/sqlite-component/README.md
  8. +0 −2 Recipes/android/layout/README.md
  9. +1 −1 Recipes/android/layout/grid_view/README.md
  10. +2 −2 Recipes/android/media/audio/README.md
  11. +2 −2 Recipes/android/media/video/README.md
  12. +0 −1 Recipes/android/networking/README.md
  13. 0 ...droid/networking/{networkinfo → detect-network-connection}/detect_network_connection/Activity1.cs
  14. 0 ...orking/{networkinfo → detect-network-connection}/detect_network_connection/Assets/AboutAssets.txt
  15. 0 ...rking/{networkinfo → detect-network-connection}/detect_network_connection/NetworkDetection.csproj
  16. 0 ...tworking/{networkinfo → detect-network-connection}/detect_network_connection/NetworkDetection.sln
  17. 0 ...networkinfo → detect-network-connection}/detect_network_connection/Properties/AndroidManifest.xml
  18. 0 ...ng/{networkinfo → detect-network-connection}/detect_network_connection/Properties/AssemblyInfo.cs
  19. 0 .../{networkinfo → detect-network-connection}/detect_network_connection/Resources/AboutResources.txt
  20. BIN ...g/{networkinfo → detect-network-connection}/detect_network_connection/Resources/Drawable/Icon.png
  21. BIN .../{networkinfo → detect-network-connection}/detect_network_connection/Resources/Drawable/Thumbs.db
  22. BIN ...rkinfo → detect-network-connection}/detect_network_connection/Resources/Drawable/green_square.png
  23. BIN ...workinfo → detect-network-connection}/detect_network_connection/Resources/Drawable/red_square.png
  24. 0 ...ng/{networkinfo → detect-network-connection}/detect_network_connection/Resources/Layout/Main.axml
  25. 0 ...networkinfo → detect-network-connection}/detect_network_connection/Resources/Resource.Designer.cs
  26. 0 .../{networkinfo → detect-network-connection}/detect_network_connection/Resources/Values/Strings.xml
  27. BIN ...workinfo → detect-network-connection}/detect_network_connection/Resources/drawable-hdpi/Thumbs.db
  28. BIN ...o → detect-network-connection}/detect_network_connection/Resources/drawable-hdpi/green_square.png
  29. BIN ...nfo → detect-network-connection}/detect_network_connection/Resources/drawable-hdpi/red_square.png
  30. BIN ...workinfo → detect-network-connection}/detect_network_connection/Resources/drawable-ldpi/Thumbs.db
  31. BIN ...o → detect-network-connection}/detect_network_connection/Resources/drawable-ldpi/green_square.png
  32. BIN ...nfo → detect-network-connection}/detect_network_connection/Resources/drawable-ldpi/red_square.png
  33. BIN ...workinfo → detect-network-connection}/detect_network_connection/Resources/drawable-mdpi/Thumbs.db
  34. BIN ...o → detect-network-connection}/detect_network_connection/Resources/drawable-mdpi/green_square.png
  35. BIN ...nfo → detect-network-connection}/detect_network_connection/Resources/drawable-mdpi/red_square.png
  36. BIN ...orkinfo → detect-network-connection}/detect_network_connection/Resources/drawable-xhdpi/Thumbs.db
  37. BIN ... → detect-network-connection}/detect_network_connection/Resources/drawable-xhdpi/green_square.png
  38. BIN ...fo → detect-network-connection}/detect_network_connection/Resources/drawable-xhdpi/red_square.png
  39. +0 −4 Recipes/android/networking/networkinfo/README.md
  40. +0 −1 Recipes/android/networking/sms/send_an_sms/README.md
  41. +0 −1 Recipes/android/os_device_resources/geocoder/reverse_geocode_a_location/README.md
  42. +1 −1 Recipes/android/other_ux/animation/README.md
  43. +1 −1 Recipes/android/other_ux/drawing/README.md
  44. +1 −1 Recipes/android/other_ux/fragment/README.md
  45. +1 −1 Recipes/android/resources/device_specific/detect_screen_size/README.md
  46. +1 −1 Recipes/android/web_services/consuming_services/call_a_rest_web_service/README.md
  47. +1 −1 Recipes/ios/content_controls/scroll_view/README.md
  48. +1 −1 Recipes/ios/content_controls/split_view/README.md
  49. +1 −1 Recipes/ios/content_controls/tables/README.md
  50. +1 −1 Recipes/ios/content_controls/web_view/README.md
  51. +1 −1 Recipes/ios/graphics_and_drawing/core_graphics/README.md
  52. +1 −1 Recipes/ios/graphics_and_drawing/core_text/README.md
  53. +1 −1 Recipes/ios/input/keyboards/README.md
  54. +52 −61 Recipes/ios/multitasking/track_significant_location_change/README.md
  55. +0 −115 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/ActionSheetDatePicker.cs
  56. +0 −73 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/ActionSheetDatePicker.csproj
  57. +0 −26 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/ActionSheetDatePicker.sln
  58. +0 −42 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/ActionSheetViewController.cs
  59. +0 −45 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/AppDelegate.cs
  60. +0 −20 Recipes/ios/standard_controls/actionsheet/actionsheet_date_picker/Info.plist
  61. +0 −125 ...andard_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/ActionSheetDatePicker.cs
  62. +0 −74 ...rd_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/ActionSheetDatePicker.csproj
  63. +0 −26 ...ndard_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/ActionSheetDatePicker.sln
  64. +0 −48 ...rd_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/ActionSheetViewController.cs
  65. +0 −45 ...pes/ios/standard_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/AppDelegate.cs
  66. +0 −22 Recipes/ios/standard_controls/actionsheet/create_a_dismissable_actionsheet_date_picker/Info.plist
  67. +1 −1 Recipes/ios/standard_controls/alertcontroller/README.md
  68. +1 −1 Recipes/ios/standard_controls/buttons/README.md
  69. +1 −1 Recipes/ios/standard_controls/segmented_button_control/README.md
  70. +1 −1 Recipes/ios/standard_controls/sliders/README.md
  71. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/AppDelegate.cs
  72. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/Info.plist
  73. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/Main.cs
  74. 0 ..._field/{ → style_text}/style-text/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json
  75. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/StyledText.csproj
  76. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/StyledText.sln
  77. 0 Recipes/ios/standard_controls/text_field/{ → style_text}/style-text/StyledTextViewController.cs
  78. +1 −1 Recipes/mac/README.md
  79. +2 −7 Recipes/mac/general/environment-checks/README.md
  80. +1 −1 Recipes/mac/ui/outlineview/README.md
@@ -12,6 +12,5 @@ Platforms
- [Xamarin.Android](android)
- [Xamarin.iOS](ios)
- [Xamarin.Mac](mac)
- [Test Cloud](testcloud)
@@ -6,6 +6,6 @@ title: "Autocomplete Text View"
The AutoCompleteTextView is an editable text view that shows completion
suggestions automatically as the user begins typing.
[ ![](Images/AutoCompleteTextView.png)](Images/AutoCompleteTextView.png)
[ ![](index/Images/AutoCompleteTextView.png)](index/Images/AutoCompleteTextView.png)
- [Add an Autocomplete Text Input](/Recipes/android/controls/autocomplete_text_view/add_an_autocomplete_text_input)  
@@ -5,6 +5,4 @@ title: "ImageView"
The ImageView is a UI widget that can load and display images.
[ ![](Images/DisplayImage.png)](Images/DisplayImage.png)
- [Display An Image](/Recipes/android/controls/imageview/display_an_image)
Binary file not shown.
@@ -7,7 +7,7 @@ The WebView is a specialize view that displays web pages. It allows
developers to embed a browser in their application or to display some online
content in an Activity.
[ ![](Images/LoadWebPage.png)](Images/LoadWebPage.png)
[ ![](index/Images/LoadWebPage.png)](index/Images/LoadWebPage.png)
- [Call C# from JavaScript](/Recipes/android/controls/webview/call_csharp_from_javascript)
- [Load a Web Page](/Recipes/android/controls/webview/load_a_web_page/)
@@ -1,11 +1,8 @@
---
--
id: 2C73E638-B22F-4147-B05E-C72752A63A7E
title: "Databases"
dateupdated: 2017-08-22
--
brief: "Databases are primarily used for the storage and recall of information. There are three key ways to use the built in"
capabilities of the Android database system.
brief: "Databases are primarily used for the storage and recall of information. There are three key ways to use the built in capabilities of the Android database system."
---
@@ -1,10 +1,8 @@
---
--
id: 26172BD6-0F3D-48B8-B396-2033F654D76E
title: "Create a Database with SQLite.NET"
brief: "This recipe will demonstrate how to create an SQLite database with the SQLite.NET PCL library."
dateupdated: 2018-01-19
--
---
# Recipe
@@ -1,10 +1,8 @@
---
--
id: 18F2141B-0499-6294-0357-510679496897
title: "Layouts"
subtitle: "How to build screen layouts."
dateupdated: 2017-07-24
--
---
This section contains Recipes on how layout Android Activities.
@@ -7,6 +7,6 @@ subtitle: "Android.Widget.GridView"
Android's GridView allows applications to lay out content in a grid using
cells arranging in rows and columns.
[ ![](Images/gridview.png)](Images/gridview.png)
[ ![](index/Images/gridview.png)](index/Images/gridview.png)
- [Create a Grid View](/Recipes/android/layout/grid_view/create_a_grid_view)
@@ -1,13 +1,13 @@
---
id: 94811333-33FB-1578-BA11-E10F08D3D950
title Audio
title: Audio
---
Android includes classes that make it easy to work with audio such as the
MediaPlayer and MediaRecorder. Using these classes, applications can add support
for audio playback and recording.
[ ![](Images/recordaudio.png)](Images/recordaudio.png)
[ ![](index/Images/recordaudio.png)](index/Images/recordaudio.png)
- <span class="noChildren"><a href="/Recipes/android/media/audio/play_audio">Play Audio</a></span>
- <span class="noChildren"><a href="/Recipes/android/media/audio/record_audio">Record Audio</a></span>
@@ -4,10 +4,10 @@ title: "Video"
---
Android includes support for working with video. Using classes such as the
VideoView and MediaRecorder, Andorid applications can add features such as video
VideoView and MediaRecorder, Android applications can add features such as video
recording and playback.
[ ![](Images/recordvideo.png)](Images/recordvideo.png)
[ ![](index/Images/recordvideo.png)](index/Images/recordvideo.png)
- <span class="noChildren"><a href="/Recipes/android/media/video/play_video">Play Video</a></span>
- <span class="noChildren"><a href="/Recipes/android/media/video/record_video">Record Video</a></span>
@@ -9,6 +9,5 @@ Using network related features like email and SMS.
- [Detect Network Connection](/Recipes/android/networking/detect-network-connection/)
- [Detect GSM Signal Strength](/Recipes/android/networking/gsm_strength/)
- [Email](/Recipes/android/networking/email)
- [Network Connection](/Recipes/android/networking/detect-network-connection/)
- [SMS](/Recipes/android/networking/sms)

This file was deleted.

Oops, something went wrong.
@@ -5,7 +5,6 @@ brief: "This recipe shows how to send an SMS message using the SMSManager or an
sdk:
- title: "SmsManager Class Reference"
url: http://developer.android.com/reference/android/telephony/gsm/SmsManager.html
<a name="Recipe" class="injected"></a>
---
# Recipe
@@ -8,7 +8,6 @@ article:
sdk:
- title: "Geocoder API"
url: http://developer.android.com/reference/android/location/Geocoder.html
<a name="Recipe" class="injected"></a>
---
# Recipe
@@ -5,7 +5,7 @@ title: "Animation"
Android provides support for animating properties of any type as well as animating frame-by-frame with several Drawable objects. This section includes Recipes that cover various ways to work with animation in Android.
[ ![](Images/screen2.png)](Images/screen2.png)
[ ![](index/Images/screen2.png)](index/Images/screen2.png)
- <span class="noChildren"><a href="/Recipes/android/other_ux/animation/frame_animation">Frame Animation</a>**
- <span class="noChildren"><a href="/Recipes/android/other_ux/animation/rotate_animation">Rotate Animation</a></span>
@@ -5,7 +5,7 @@ title: "Drawing"
Android includes drawing APIs that allow 2D graphics to be created and manipulated programmatically. This allows aspects of drawing such as stroke style, color and width to be controlled when drawable arbitrary shapes.
[ ![](Images/oval.png)](Images/oval.png)
[ ![](index/Images/oval.png)](index/Images/oval.png)
@@ -8,7 +8,7 @@ design flexibility across tablets and phones. They allow portions on the user
interface to be grouped into reusable components that can be loaded at
runtime.
[ ![](Images/CreateAFragment.png)](Images/CreateAFragment.png)
[ ![](index/Images/CreateAFragment.png)](index/Images/CreateAFragment.png)
- <span class="noChildren"><a href="/Recipes/android/other_ux/fragment/create_a_fragment">Create a
Fragment</a></span>
@@ -7,7 +7,7 @@ article:
sdk:
- title: "Supporting Multiple Screens"
url: http://developer.android.com/guide/practices/screens_support.html
- title: "Display Metrics<"
- title: "Display Metrics"
url: http://developer.android.com/reference/android/util/DisplayMetrics.html
---
@@ -4,7 +4,7 @@ title: "Call a REST Web Service"
brief: "This recipe shows how to call a RESTful service using HTTP, parse JSON results, and display the results on the screen."
samplecode:
- title: "WeatherREST"
url: /samples/monodroid/WeatherREST
url: https://developer.xamarin.com/samples/monodroid/WeatherREST
article:
- title: "Introduction to Web Services"
url: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/
@@ -8,7 +8,7 @@ that doesn't fit within the screen. They allow the user to zoom in and out of
the content using pinch gestures and to drag the display area around to view
different parts of the content.
[ ![](Images/halloween_scrollview.jpg)](Images/halloween_scrollview.jpg)
[ ![](index/Images/halloween_scrollview.jpg)](index/Images/halloween_scrollview.jpg)
&nbsp;
@@ -11,7 +11,7 @@ be used on the iPad.
When the split view is displayed on an iPad that is in a vertical orientation, the master list is hidden until the user swipes from the edge at the language start direction. When the split view is displayed on an iPad that is in the horizontal orientation, the master list is permanently displayed adjacent to the edge at the language start direction.
[ ![One vertical and one horizontal iPad, showing that the master view is shown when horizontal and hidden when vertical.](Images/Picture_1.png)](Images/Picture_1.png)
[ ![One vertical and one horizontal iPad, showing that the master view is shown when horizontal and hidden when vertical.](index/Images/Picture_1.png)](index/Images/Picture_1.png)
- [Communicate Between Master and Detail Controllers](/Recipes/ios/content_controls/split_view/communicate_between_master_and_detail_controllers)
- [Show and Hide the Master View Button](/Recipes/ios/content_controls/split_view/show_and_hide_the_master_view_button)
@@ -9,7 +9,7 @@ It's hard to find an application that doesn't use tables in some form. Tables in
iOS are highly customizable and wrap a lot of functioality that we get for
free.
[ ![](Images/image1.png)](Images/image1.png)
[ ![](index/Images/image1.png)](index/Images/image1.png)
<a name="Table_Basics" class="injected"></a>
@@ -9,7 +9,7 @@ application. In addition to pages hosted on the web, you can also use it to
display local content (including various document formats), and you can even
interact with JavaScript in pages it has loaded.
[ ![](Images/WebView_1.png)](Images/WebView_1.png)
[ ![](index/Images/WebView_1.png)](index/Images/WebView_1.png)
- [Load a Web Page](/Recipes/ios/content_controls/web_view/load_a_web_page)
- [Load Local Content](/Recipes/ios/content_controls/web_view/load_local_content)
@@ -5,6 +5,6 @@ title: "Core Text"
Core Graphics is a low-level 2D graphics framework that allows drawing device independent graphics.
[ ![](Images/Core_Graphics.png)](Images/Core_Graphics.png)
[ ![](index/Images/Core_Graphics.png)](index/Images/Core_Graphics.png)
- [Create a Transparent Region in a View](/Recipes/ios/graphics_and_drawing/core_graphics/transparent_region_view)
@@ -6,6 +6,6 @@ title: "Core Text"
The Core Text framework is a high-performance, low-level API for laying out
text.
[ ![](Images/Core_Text.png)](Images/Core_Text.png)
[ ![](index/Images/Core_Text.png)](index/Images/Core_Text.png)
- [Draw Unicode Text with CoreText](/Recipes/ios/graphics_and_drawing/core_text/draw_unicode_text_with_coretext)
@@ -6,7 +6,7 @@ title: "Keyboards"
iOS provides a system keyboard that is controllable based upon the control
that present it, such as a `UITextField`. This section includes keyboard-related Recipes.
[ ![](Images/26.png)](Images/26.png)
[ ![](index/Images/26.png)](index/Images/26.png)
- [Dismiss the Keyboard](/Recipes/ios/input/keyboards/dismiss_the_keyboard)
@@ -9,65 +9,56 @@ brief: "The Significant Location Changes API tracks major changes in the user's
# Recipe
1. The Significant Location Changes API requires the **CoreLocation** library, so we'll start by adding the using directive:
```
using CoreLocation;
```
<ol start="2">
<li>Next, create an instance of a <code>CLLocationManager</code>. The location manager listens to the system's location service:</li>
</ol>
```
var LocMgr = new CLLocationManager();
```
<ol start="3">
<li>Starting with iOS 8, applications must call <code>requestWhenInUseAuthorization</code> on <code>CLLocationManager</code> to gain access to the user's application. If the app hasn't been granted permission before, the user will be prompted to allow or deny access.</li>
</ol>
```
LocMgr.requestAlwaysAuthorization(); //to access user's location in the background
LocMgr.requestWhenInUseAuthorization(); //to access user's location when the app is in use.
```
<ol start="4">
<li>In addition to explicitly requesting access to the user's location, you must add two keys to the <strong>Info.plist</strong> file, by opening <strong>Info.plist</strong> and selecting **Source**. </li>
</ol>
* **NSLocationWhenInUseUsageDescription** - A description of why your app wants to access the user's location in the foreground.
* **NSLocationAlwaysInUsageDescription** - A description of why your app wants to access the user's location in the background.
<ol start="5">
<li>Check if location services are enabled on the device and for your application. If location data is available, start listening for changes with the <code>StartMonitoringSignificantLocationChanges</code></li>
</ol>
```
if (CLLocationManager.LocationServicesEnabled) {
LocMgr.StartMonitoringSignificantLocationChanges ();
} else {
Console.WriteLine ("Location services not enabled, please enable this in your Settings");
}
```
<ol start="6">
<li>When the service receives a location update, the system will wake the application in the background to handle the location changed event. To run your code, subscribe to the location service's <code>LocationsUpdated</code> event, and add a custom handler:</li>
</ol>
```
LocMgr.LocationsUpdated += (o, e) =&gt; Console.WriteLine ("Location change received");
```
> ℹ️ **Note**: The application has approximately 10 seconds after the `LocationsUpdated` event fires to run code in the background. If you want to run a process that takes more than 10 seconds, wrap it in a [Background Task](https://developer.xamarin.com/guides/cross-platform/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/ios_backgrounding_with_tasks).
<ol start="7">
<li>Call the following method to stop monitoring location:</li>
</ol>
```
LocMgr.StopMonitoringSignificantLocationChanges ();
```
<ol start="8">
<li>The application output should resemble the following:</li>
</ol>
![]("Images/02.png")
To test significant location changes in the iOS simulator, refer to the <a href="Recipes/ios/multitasking/test_location_changes_in_simulator" target="_blank">Test Location Changes in Simulator recipe</a>.
```
using CoreLocation;
```
2. Next, create an instance of a `CLLocationManager`. The location manager listens to the system's location service:
```
var LocMgr = new CLLocationManager();
```
3. Starting with iOS 8, applications must call `requestWhenInUseAuthorization` on `CLLocationManager` to gain access to the user's application. If the app hasn't been granted permission before, the user will be prompted to allow or deny access.
```
LocMgr.requestAlwaysAuthorization(); //to access user's location in the background
LocMgr.requestWhenInUseAuthorization(); //to access user's location when the app is in use.
```
4. In addition to explicitly requesting access to the user's location, you must add two keys to the **Info.plist** file, by opening **Info.plist** and selecting **Source**:
* **NSLocationWhenInUseUsageDescription** - A description of why your app wants to access the user's location in the foreground.
* **NSLocationAlwaysInUsageDescription** - A description of why your app wants to access the user's location in the background.
5. Check if location services are enabled on the device and for your application. If location data is available, start listening for changes with the `StartMonitoringSignificantLocationChanges`
```
if (CLLocationManager.LocationServicesEnabled) {
LocMgr.StartMonitoringSignificantLocationChanges ();
} else {
Console.WriteLine ("Location services not enabled, please enable this in your Settings");
}
```
6. When the service receives a location update, the system will wake the application in the background to handle the location changed event. To run your code, subscribe to the location service's `LocationsUpdated` event, and add a custom handler:
```
LocMgr.LocationsUpdated += (o, e) =&gt; Console.WriteLine ("Location change received");
```
> ℹ️ **Note**: The application has approximately 10 seconds after the `LocationsUpdated` event fires to run code in the background. If you want to run a process that takes more than 10 seconds, wrap it in a [Background Task](https://developer.xamarin.com/guides/cross-platform/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/ios_backgrounding_with_tasks).
7. Call the following method to stop monitoring location:
```
LocMgr.StopMonitoringSignificantLocationChanges ();
```
8. The application output should resemble the following:
![](Images/02.png)
To test significant location changes in the iOS simulator, refer to the [Test Location Changes in Simulator recipe](Recipes/ios/multitasking/test_location_changes_in_simulator).
Oops, something went wrong.

0 comments on commit 5015eca

Please sign in to comment.