├── .gitattributes ├── .gitignore ├── Example └── ExampleApp │ ├── ExampleApp.Android │ ├── Assets │ │ └── AboutAssets.txt │ ├── ExampleApp.Android.csproj │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.Designer.cs │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ │ └── icon.png │ │ ├── drawable │ │ │ └── icon.png │ │ ├── layout │ │ │ ├── Tabbar.axml │ │ │ └── Toolbar.axml │ │ └── values │ │ │ └── styles.xml │ └── packages.config │ ├── ExampleApp.UWP │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-100.png │ │ ├── LockScreenLogo.scale-125.png │ │ ├── LockScreenLogo.scale-150.png │ │ ├── LockScreenLogo.scale-200.png │ │ ├── LockScreenLogo.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-125.png │ │ ├── Square150x150Logo.scale-150.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-125.png │ │ ├── Square44x44Logo.scale-150.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png │ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png │ │ ├── StoreLogo.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-125.png │ │ ├── Wide310x150Logo.scale-150.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Wide310x150Logo.scale-400.png │ ├── ExampleApp.UWP.csproj │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ └── project.json │ ├── ExampleApp.iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── ExampleApp.iOS.csproj │ ├── Info.plist │ ├── Main.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small-40.png │ │ ├── Icon-Small-40@2x.png │ │ ├── Icon-Small-40@3x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ └── LaunchScreen.storyboard │ ├── iTunesArtwork │ ├── iTunesArtwork@2x │ └── packages.config │ └── ExampleApp │ ├── App.xaml │ ├── App.xaml.cs │ ├── ExampleApp.csproj │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── LICENSE ├── README.md └── src └── Forms └── SPControls.MarkdownTextView ├── SPControls.MarkdownTextView.Droid ├── HtmlTagHandler.cs ├── MarkdownTextView.cs ├── MarkdownTextViewRenderer.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.Designer.cs │ └── Values │ │ └── Strings.xml ├── SPControls.MarkdownTextView.Droid.csproj ├── SPControls.MarkdownTextView.Droid.csproj.bak ├── TextUtil.cs └── packages.config ├── SPControls.MarkdownTextView.iOS ├── MarkdownTextView.cs ├── MarkdownTextViewRenderer.cs ├── Properties │ └── AssemblyInfo.cs ├── SPControls.MarkdownTextView.iOS.csproj ├── TextUtil.cs └── packages.config ├── SPControls.MarkdownTextView.sln ├── SPControls.MarkdownTextView ├── Markdown.cs ├── MarkdownTextView.cs ├── Properties │ └── AssemblyInfo.cs ├── SPControls.MarkdownTextView.csproj ├── StringExtensions.cs └── packages.config └── SuaveControls.MarkdownTextView.NuGet └── SuaveControls.MarkdownTextView.NuGet.nuproj /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | *.VC.VC.opendb 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | # TODO: Comment the next line if you want to checkin your web deploy settings 144 | # but database connection strings (with potential passwords) will be unencrypted 145 | *.pubxml 146 | *.publishproj 147 | 148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 149 | # checkin your Azure Web App publish settings, but sensitive information contained 150 | # in these scripts will be unencrypted 151 | PublishScripts/ 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Windows Store app package directories and files 174 | AppPackages/ 175 | BundleArtifacts/ 176 | Package.StoreAssociation.xml 177 | _pkginfo.txt 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | ~$* 188 | *~ 189 | *.dbmdl 190 | *.dbproj.schemaview 191 | *.pfx 192 | *.publishsettings 193 | node_modules/ 194 | orleans.codegen.cs 195 | 196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 198 | #bower_components/ 199 | 200 | # RIA/Silverlight projects 201 | Generated_Code/ 202 | 203 | # Backup & report files from converting an old project file 204 | # to a newer Visual Studio version. Backup files are not needed, 205 | # because we have git ;-) 206 | _UpgradeReport_Files/ 207 | Backup*/ 208 | UpgradeLog*.XML 209 | UpgradeLog*.htm 210 | 211 | # SQL Server files 212 | *.mdf 213 | *.ldf 214 | 215 | # Business Intelligence projects 216 | *.rdl.data 217 | *.bim.layout 218 | *.bim_*.settings 219 | 220 | # Microsoft Fakes 221 | FakesAssemblies/ 222 | 223 | # GhostDoc plugin setting file 224 | *.GhostDoc.xml 225 | 226 | # Node.js Tools for Visual Studio 227 | .ntvs_analysis.dat 228 | 229 | # Visual Studio 6 build log 230 | *.plg 231 | 232 | # Visual Studio 6 workspace options file 233 | *.opt 234 | 235 | # Visual Studio LightSwitch build output 236 | **/*.HTMLClient/GeneratedArtifacts 237 | **/*.DesktopClient/GeneratedArtifacts 238 | **/*.DesktopClient/ModelManifest.xml 239 | **/*.Server/GeneratedArtifacts 240 | **/*.Server/ModelManifest.xml 241 | _Pvt_Extensions 242 | 243 | # Paket dependency manager 244 | .paket/paket.exe 245 | paket-files/ 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # JetBrains Rider 251 | .idea/ 252 | *.sln.iml 253 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/ExampleApp.Android.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {ED4EE319-8093-4DEB-A04E-54AAE93D4D9B} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Properties 12 | ExampleApp.Droid 13 | ExampleApp.Android 14 | 512 15 | true 16 | Resources\Resource.Designer.cs 17 | Off 18 | Properties\AndroidManifest.xml 19 | true 20 | v8.0 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | true 30 | full 31 | false 32 | bin\Debug\ 33 | DEBUG;TRACE 34 | prompt 35 | 4 36 | True 37 | None 38 | armeabi,armeabi-v7a,x86 39 | 40 | 41 | pdbonly 42 | true 43 | bin\Release\ 44 | TRACE 45 | prompt 46 | 4 47 | False 48 | SdkOnly 49 | 50 | 51 | 52 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\FormsViewGroup.dll 53 | True 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll 64 | True 65 | 66 | 67 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll 68 | True 69 | 70 | 71 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll 72 | True 73 | 74 | 75 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll 76 | True 77 | 78 | 79 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll 80 | True 81 | 82 | 83 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll 84 | True 85 | 86 | 87 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll 88 | True 89 | 90 | 91 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll 92 | True 93 | 94 | 95 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Core.dll 96 | True 97 | 98 | 99 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 100 | True 101 | 102 | 103 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 104 | True 105 | 106 | 107 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 108 | True 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | {6de3988b-d8f7-4ab5-8996-af1bc4808e47} 138 | SPControls.MarkdownTextView.Droid 139 | 140 | 141 | {8DD48410-8798-46B4-B1CF-6A8D9F7C3CA7} 142 | ExampleApp 143 | 144 | 145 | 146 | 147 | 148 | 149 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | 10 | namespace ExampleApp.Droid 11 | { 12 | [Activity(Label = "ExampleApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity 14 | { 15 | protected override void OnCreate(Bundle bundle) 16 | { 17 | TabLayoutResource = Resource.Layout.Tabbar; 18 | ToolbarResource = Resource.Layout.Toolbar; 19 | SPControls.MarkdownTextView.Droid.MarkdownTextView.Init(); 20 | base.OnCreate(bundle); 21 | 22 | global::Xamarin.Forms.Forms.Init(this, bundle); 23 | LoadApplication(new App()); 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ExampleApp.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ExampleApp.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | 32 | // Add some common permissions, these can be removed if not needed 33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 35 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/Resource.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.4952 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ExampleApp.Droid 12 | { 13 | 14 | 15 | public partial class Resource 16 | { 17 | 18 | public partial class Attribute 19 | { 20 | 21 | private Attribute() 22 | { 23 | } 24 | } 25 | 26 | public partial class Drawable 27 | { 28 | 29 | // aapt resource value: 0x7f020000 30 | public const int Icon = 2130837504; 31 | 32 | private Drawable() 33 | { 34 | } 35 | } 36 | 37 | public partial class Id 38 | { 39 | 40 | // aapt resource value: 0x7f050000 41 | public const int MyButton = 2131034112; 42 | 43 | private Id() 44 | { 45 | } 46 | } 47 | 48 | public partial class Layout 49 | { 50 | 51 | // aapt resource value: 0x7f030000 52 | public const int Main = 2130903040; 53 | 54 | private Layout() 55 | { 56 | } 57 | } 58 | 59 | public partial class String 60 | { 61 | 62 | // aapt resource value: 0x7f040001 63 | public const int ApplicationName = 2130968577; 64 | 65 | // aapt resource value: 0x7f040000 66 | public const int Hello = 2130968576; 67 | 68 | private String() 69 | { 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.Android/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.Android/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.Android/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.Android/Resources/drawable/icon.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.Android/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Navigation; 17 | 18 | namespace ExampleApp.UWP 19 | { 20 | /// 21 | /// Provides application-specific behavior to supplement the default Application class. 22 | /// 23 | sealed partial class App : Application 24 | { 25 | /// 26 | /// Initializes the singleton application object. This is the first line of authored code 27 | /// executed, and as such is the logical equivalent of main() or WinMain(). 28 | /// 29 | public App() 30 | { 31 | this.InitializeComponent(); 32 | this.Suspending += OnSuspending; 33 | } 34 | 35 | /// 36 | /// Invoked when the application is launched normally by the end user. Other entry points 37 | /// will be used such as when the application is launched to open a specific file. 38 | /// 39 | /// Details about the launch request and process. 40 | protected override void OnLaunched(LaunchActivatedEventArgs e) 41 | { 42 | 43 | #if DEBUG 44 | if (System.Diagnostics.Debugger.IsAttached) 45 | { 46 | this.DebugSettings.EnableFrameRateCounter = true; 47 | } 48 | #endif 49 | 50 | Frame rootFrame = Window.Current.Content as Frame; 51 | 52 | // Do not repeat app initialization when the Window already has content, 53 | // just ensure that the window is active 54 | if (rootFrame == null) 55 | { 56 | // Create a Frame to act as the navigation context and navigate to the first page 57 | rootFrame = new Frame(); 58 | 59 | rootFrame.NavigationFailed += OnNavigationFailed; 60 | 61 | Xamarin.Forms.Forms.Init(e); 62 | 63 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 64 | { 65 | //TODO: Load state from previously suspended application 66 | } 67 | 68 | // Place the frame in the current Window 69 | Window.Current.Content = rootFrame; 70 | } 71 | 72 | if (rootFrame.Content == null) 73 | { 74 | // When the navigation stack isn't restored navigate to the first page, 75 | // configuring the new page by passing required information as a navigation 76 | // parameter 77 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 78 | } 79 | // Ensure the current window is active 80 | Window.Current.Activate(); 81 | } 82 | 83 | /// 84 | /// Invoked when Navigation to a certain page fails 85 | /// 86 | /// The Frame which failed navigation 87 | /// Details about the navigation failure 88 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 89 | { 90 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 91 | } 92 | 93 | /// 94 | /// Invoked when application execution is being suspended. Application state is saved 95 | /// without knowing whether the application will be terminated or resumed with the contents 96 | /// of memory still intact. 97 | /// 98 | /// The source of the suspend request. 99 | /// Details about the suspend request. 100 | private void OnSuspending(object sender, SuspendingEventArgs e) 101 | { 102 | var deferral = e.SuspendingOperation.GetDeferral(); 103 | //TODO: Save application state and stop any background activity 104 | deferral.Complete(); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-100.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-125.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-150.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/LockScreenLogo.scale-400.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.UWP/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/ExampleApp.UWP.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | {C510D5DC-C90B-443F-8509-1E3B3A9EC451} 8 | AppContainerExe 9 | Properties 10 | ExampleApp.UWP 11 | ExampleApp.UWP 12 | en-US 13 | UAP 14 | 10.0.14393.0 15 | 10.0.10586.0 16 | 14 17 | true 18 | 512 19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 20 | ExampleApp.UWP_TemporaryKey.pfx 21 | 22 | 23 | true 24 | bin\ARM\Debug\ 25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 26 | ;2008 27 | full 28 | ARM 29 | false 30 | prompt 31 | true 32 | 33 | 34 | bin\ARM\Release\ 35 | TRACE;NETFX_CORE;WINDOWS_UWP 36 | true 37 | ;2008 38 | pdbonly 39 | ARM 40 | false 41 | prompt 42 | true 43 | true 44 | 45 | 46 | true 47 | bin\x64\Debug\ 48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 49 | ;2008 50 | full 51 | x64 52 | false 53 | prompt 54 | true 55 | 56 | 57 | bin\x64\Release\ 58 | TRACE;NETFX_CORE;WINDOWS_UWP 59 | true 60 | ;2008 61 | pdbonly 62 | x64 63 | false 64 | prompt 65 | true 66 | true 67 | 68 | 69 | true 70 | bin\x86\Debug\ 71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 72 | ;2008 73 | full 74 | x86 75 | false 76 | prompt 77 | true 78 | 79 | 80 | bin\x86\Release\ 81 | TRACE;NETFX_CORE;WINDOWS_UWP 82 | true 83 | ;2008 84 | pdbonly 85 | x86 86 | false 87 | prompt 88 | true 89 | true 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | App.xaml 98 | 99 | 100 | MainPage.xaml 101 | 102 | 103 | 104 | 105 | 106 | Designer 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | MSBuild:Compile 147 | Designer 148 | 149 | 150 | MSBuild:Compile 151 | Designer 152 | 153 | 154 | 155 | 156 | {ad5550fe-4aa4-4d9a-b69b-c99b8a3e8b39} 157 | ExampleApp 158 | 159 | 160 | 161 | 14.0 162 | 163 | 164 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | namespace ExampleApp.UWP 17 | { 18 | public sealed partial class MainPage 19 | { 20 | public MainPage() 21 | { 22 | this.InitializeComponent(); 23 | 24 | LoadApplication(new ExampleApp.App()); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | ExampleApp.UWP 18 | ADunn 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ExampleApp.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ExampleApp.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.UWP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0", 4 | "Xamarin.Forms": "2.3.3.193" 5 | }, 6 | "frameworks": { 7 | "uap10.0": {} 8 | }, 9 | "runtimes": { 10 | "win10-arm": {}, 11 | "win10-arm-aot": {}, 12 | "win10-x86": {}, 13 | "win10-x86-aot": {}, 14 | "win10-x64": {}, 15 | "win10-x64-aot": {} 16 | } 17 | } -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | using SPControls.MarkdownTextView.iOS; 8 | 9 | namespace ExampleApp.iOS 10 | { 11 | // The UIApplicationDelegate for the application. This class is responsible for launching the 12 | // User Interface of the application, as well as listening (and optionally responding) to 13 | // application events from iOS. 14 | [Register("AppDelegate")] 15 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 16 | { 17 | // 18 | // This method is invoked when the application has loaded and is ready to run. In this 19 | // method you should instantiate the window, load the UI into it and then make the window 20 | // visible. 21 | // 22 | // You have 17 seconds to return from this method, or iOS will terminate your application. 23 | // 24 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 25 | { 26 | MarkdownTextView.Init(); 27 | global::Xamarin.Forms.Forms.Init(); 28 | LoadApplication(new App()); 29 | 30 | return base.FinishedLaunching(app, options); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/ExampleApp.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | 8.0.30703 7 | 2.0 8 | {7FBA5C7A-4EEC-405F-8BD3-16F2BD6F6759} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Exe 11 | ExampleApp.iOS 12 | Resources 13 | ExampleApp.iOS 14 | 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\iPhoneSimulator\Debug 22 | DEBUG 23 | prompt 24 | 4 25 | false 26 | i386, x86_64 27 | None 28 | true 29 | 30 | 31 | none 32 | true 33 | bin\iPhoneSimulator\Release 34 | prompt 35 | 4 36 | None 37 | i386, x86_64 38 | false 39 | 40 | 41 | true 42 | full 43 | false 44 | bin\iPhone\Debug 45 | DEBUG 46 | prompt 47 | 4 48 | false 49 | ARMv7, ARM64 50 | iPhone Developer 51 | true 52 | Entitlements.plist 53 | 54 | 55 | none 56 | true 57 | bin\iPhone\Release 58 | prompt 59 | 4 60 | ARMv7, ARM64 61 | false 62 | iPhone Developer 63 | Entitlements.plist 64 | 65 | 66 | none 67 | True 68 | bin\iPhone\Ad-Hoc 69 | prompt 70 | 4 71 | False 72 | ARMv7, ARM64 73 | True 74 | Automatic:AdHoc 75 | iPhone Distribution 76 | Entitlements.plist 77 | 78 | 79 | none 80 | True 81 | bin\iPhone\AppStore 82 | prompt 83 | 4 84 | False 85 | ARMv7, ARM64 86 | Automatic:AppStore 87 | iPhone Distribution 88 | Entitlements.plist 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 124 | True 125 | 126 | 127 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 128 | True 129 | 130 | 131 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 132 | True 133 | 134 | 135 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 136 | True 137 | 138 | 139 | 140 | 141 | 142 | {886e4f51-3d0e-407d-95c9-a5c4640a6118} 143 | SPControls.MarkdownTextView.iOS 144 | false 145 | false 146 | 147 | 148 | {8DD48410-8798-46B4-B1CF-6A8D9F7C3CA7} 149 | ExampleApp 150 | 151 | 152 | 153 | 154 | 155 | 156 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Info.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | ExampleApp 27 | CFBundleIdentifier 28 | com.yourcompany.ExampleApp 29 | CFBundleVersion 30 | 1.0 31 | CFBundleIconFiles 32 | 33 | Icon-60@2x 34 | Icon-60@3x 35 | Icon-76 36 | Icon-76@2x 37 | Default 38 | Default@2x 39 | Default-568h@2x 40 | Default-Portrait 41 | Default-Portrait@2x 42 | Icon-Small-40 43 | Icon-Small-40@2x 44 | Icon-Small-40@3x 45 | Icon-Small 46 | Icon-Small@2x 47 | Icon-Small@3x 48 | 49 | UILaunchStoryboardName 50 | LaunchScreen 51 | 52 | 53 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace ExampleApp.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ExampleApp.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ExampleApp.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Default.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-60@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-60@3x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-76.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-76@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small@2x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/Resources/Icon-Small@3x.png -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/iTunesArtwork: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/iTunesArtwork -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/iTunesArtwork@2x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuavePirate/MarkdownTextView/b7979a80cd73f84459c0cc5e47d8d0cc70349197/Example/ExampleApp/ExampleApp.iOS/iTunesArtwork@2x -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Xamarin.Forms; 7 | 8 | namespace ExampleApp 9 | { 10 | public partial class App : Application 11 | { 12 | public App() 13 | { 14 | InitializeComponent(); 15 | 16 | MainPage = new ExampleApp.MainPage(); 17 | } 18 | 19 | protected override void OnStart() 20 | { 21 | // Handle when your app starts 22 | } 23 | 24 | protected override void OnSleep() 25 | { 26 | // Handle when your app sleeps 27 | } 28 | 29 | protected override void OnResume() 30 | { 31 | // Handle when your app resumes 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/ExampleApp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 11.0 6 | Debug 7 | AnyCPU 8 | {8DD48410-8798-46B4-B1CF-6A8D9F7C3CA7} 9 | Library 10 | Properties 11 | ExampleApp 12 | ExampleApp 13 | 512 14 | v4.5 15 | Profile259 16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 17 | 18 | 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | App.xaml 40 | 41 | 42 | MainPage.xaml 43 | 44 | 45 | 46 | 47 | 48 | Designer 49 | MSBuild:UpdateDesignTimeXaml 50 | 51 | 52 | Designer 53 | MSBuild:UpdateDesignTimeXaml 54 | 55 | 56 | 57 | 58 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll 59 | True 60 | 61 | 62 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll 63 | True 64 | 65 | 66 | ..\..\..\src\Forms\SPControls.MarkdownTextView\packages\Xamarin.Forms.2.3.3.193\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll 67 | True 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | {67f9d3a8-f71e-4428-913f-c37ae82cdb24} 76 | SPControls.MarkdownTextView 77 | 78 | 79 | 80 | 81 | 82 | 83 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using SPControls.Forms; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Xamarin.Forms; 8 | 9 | namespace ExampleApp 10 | { 11 | public partial class MainPage : ContentPage 12 | { 13 | public MainPage() 14 | { 15 | InitializeComponent(); 16 | Container.Children.Add(new MarkdownTextView() 17 | { 18 | Markdown = "# Hello *World*", 19 | TextColor = Color.Red, 20 | HorizontalOptions = LayoutOptions.Center, 21 | VerticalOptions = LayoutOptions.Center 22 | }); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Resources; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("ExampleApp")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("ExampleApp")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: NeutralResourcesLanguage("en")] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /Example/ExampleApp/ExampleApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alex Dunn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MarkdownTextView 2 | 3 | ![alt tag](https://alexdunndev.files.wordpress.com/2017/02/xamagonmarkdown.png?w=1462) 4 | 5 | A Xamarin.Forms component to display markdown text in a TextView 6 | # Installation 7 | 8 | Now on NuGet! 9 | 10 | `Install-Package MarkdownTextView.Forms` 11 | 12 | https://www.nuget.org/packages/MarkdownTextView.Forms 13 | 14 | 15 | ## Usage 16 | - Call `Init` before calling `Xamarin.Forms.Init()` 17 | - iOS: SPControls.MarkdownTextView.iOS.MarkdownTextView.Init(); 18 | - Android: SPControls.MarkdownTextView.Droid.MarkdownTextView.Init(); 19 | - Use the control 20 | - In Xaml: 21 | 22 | ``` 23 | 26 | 27 | 28 | ``` 29 | - or in C#: 30 | ``` 31 | var mdTextView = new MarkdownTextView(); 32 | mdTextView.Markdown = "# this is my *header* tag"; 33 | ``` 34 | 35 | ## TODO 36 | - Add other properties for updating markdown settings 37 | - Add text color settings 38 | - Add UWP Support 39 | 40 | # Sponsors 41 | 42 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/HtmlTagHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Android.App; 7 | using Android.Content; 8 | using Android.OS; 9 | using Android.Runtime; 10 | using Android.Views; 11 | using Android.Widget; 12 | using Android.Text.Style; 13 | using Android.Text; 14 | using Org.Xml.Sax; 15 | 16 | namespace SPControls 17 | { 18 | /// 19 | /// Custom tag handler for parsing more html tags for android textviews 20 | /// This is a port/translation of https://github.com/sufficientlysecure/html-textview/blob/master/HtmlTextView/src/main/java/org/sufficientlysecure/htmltextview/HtmlTagHandler.java 21 | /// Which is considered the most robust handler 22 | /// 23 | public class HtmlTagHandler : Java.Lang.Object, Android.Text.Html.ITagHandler 24 | { 25 | /** 26 | * Keeps track of lists (ol, ul). On bottom of Stack is the outermost list 27 | * and on top of Stack is the most nested list 28 | */ 29 | Stack lists = new Stack(); 30 | /** 31 | * Tracks indexes of ordered lists so that after a nested list ends 32 | * we can continue with correct index of outer list 33 | */ 34 | Stack olNextIndex = new Stack(); 35 | /** 36 | * List indentation in pixels. Nested lists use multiple of this. 37 | */ 38 | private static int indent = 10; 39 | private static int listItemIndent = indent * 2; 40 | private static BulletSpan bullet = new BulletSpan(indent); 41 | 42 | private class Ul : Java.Lang.Object 43 | { 44 | } 45 | 46 | private class Ol : Java.Lang.Object 47 | { 48 | } 49 | 50 | private class Code : Java.Lang.Object 51 | { 52 | } 53 | 54 | private class Center : Java.Lang.Object 55 | { 56 | } 57 | 58 | private class Strike : Java.Lang.Object 59 | { 60 | } 61 | 62 | 63 | public void HandleTag(Boolean opening, String tag, Android.Text.IEditable output, IXMLReader xmlReader) 64 | { 65 | if (opening) 66 | { 67 | // opening tag 68 | // if (HtmlTextView.DEBUG) { 69 | // Log.d(HtmlTextView.TAG, "opening, output: " + output.ToString()); 70 | // } 71 | // 72 | if (tag.ToLower() == "ul") 73 | { 74 | lists.Push(tag); 75 | } 76 | else if (tag.EqualsIgnoreCase("ol")) 77 | { 78 | lists.Push(tag); 79 | olNextIndex.Push(1); 80 | } 81 | else if (tag.EqualsIgnoreCase("li")) 82 | { 83 | if (output.Length() > 0 && output.CharAt(output.Length() - 1) != '\n') 84 | { 85 | output.Append("\n"); 86 | } 87 | String parentList = lists.Peek(); 88 | if (parentList.EqualsIgnoreCase("ol")) 89 | { 90 | Start(output, new Ol()); 91 | output.Append(olNextIndex.Peek().ToString()).Append('.').Append(' '); 92 | olNextIndex.Push(olNextIndex.Pop() + 1); 93 | } 94 | else if (parentList.EqualsIgnoreCase("ul")) 95 | { 96 | Start(output, new Ul()); 97 | } 98 | } 99 | else if (tag.EqualsIgnoreCase("code")) 100 | { 101 | Start(output, new Code()); 102 | } 103 | else if (tag.EqualsIgnoreCase("center")) 104 | { 105 | Start(output, new Center()); 106 | } 107 | else if (tag.EqualsIgnoreCase("s") || tag.EqualsIgnoreCase("strike")) 108 | { 109 | Start(output, new Strike()); 110 | } 111 | } 112 | else 113 | { 114 | // closing tag 115 | // if (HtmlTextView.DEBUG) { 116 | // Log.d(HtmlTextView.TAG, "closing, output: " + output.ToString()); 117 | // } 118 | // 119 | if (tag.EqualsIgnoreCase("ul")) 120 | { 121 | lists.Pop(); 122 | } 123 | else if (tag.EqualsIgnoreCase("ol")) 124 | { 125 | lists.Pop(); 126 | olNextIndex.Pop(); 127 | } 128 | else if (tag.EqualsIgnoreCase("li")) 129 | { 130 | if (lists.Peek().EqualsIgnoreCase("ul")) 131 | { 132 | if (output.Length() > 0 && output.CharAt(output.Length() - 1) != '\n') 133 | { 134 | output.Append("\n"); 135 | } 136 | // Nested BulletSpans increases distance between bullet and Text, so we must prevent it. 137 | int bulletMargin = indent; 138 | if (lists.Count > 1) 139 | { 140 | bulletMargin = indent - bullet.GetLeadingMargin(true); 141 | if (lists.Count > 2) 142 | { 143 | // This get's more complicated when we add a LeadingMarginSpan into the same line: 144 | // we have also counter it's effect to BulletSpan 145 | bulletMargin -= (lists.Count - 2) * listItemIndent; 146 | } 147 | } 148 | BulletSpan newBullet = new BulletSpan(bulletMargin); 149 | End(output, typeof(Ul), false, 150 | new LeadingMarginSpanStandard(listItemIndent * (lists.Count - 1)), 151 | newBullet); 152 | } 153 | else if (lists.Peek().EqualsIgnoreCase("ol")) 154 | { 155 | if (output.Length() > 0 && output.CharAt(output.Length() - 1) != '\n') 156 | { 157 | output.Append("\n"); 158 | } 159 | int numberMargin = listItemIndent * (lists.Count - 1); 160 | if (lists.Count > 2) 161 | { 162 | // Same as in ordered lists: counter the effect of nested Spans 163 | numberMargin -= (lists.Count - 2) * listItemIndent; 164 | } 165 | End(output, typeof(Ol), false, new LeadingMarginSpanStandard(numberMargin)); 166 | } 167 | } 168 | else if (tag.EqualsIgnoreCase("code")) 169 | { 170 | End(output, typeof(Code), false, new TypefaceSpan("monospace")); 171 | } 172 | else if (tag.EqualsIgnoreCase("center")) 173 | { 174 | End(output, typeof(Center), true, new AlignmentSpanStandard(Layout.Alignment.AlignCenter)); 175 | } 176 | else if (tag.EqualsIgnoreCase("s") || tag.EqualsIgnoreCase("strike")) 177 | { 178 | End(output, typeof(Strike), false, new StrikethroughSpan()); 179 | } 180 | } 181 | } 182 | 183 | /** 184 | * Mark the opening tag by using private classes 185 | */ 186 | private void Start(IEditable output, Java.Lang.Object mark) 187 | { 188 | int len = output.Length(); 189 | output.SetSpan(mark, len, len, SpanTypes.MarkMark); 190 | 191 | // if (HtmlTextView.DEBUG) { 192 | // Log.d(HtmlTextView.TAG, "len: " + len); 193 | // } 194 | } 195 | 196 | /** 197 | * Modified from {@link Android.Text.Html} 198 | */ 199 | private void End(IEditable output, Type kind, Boolean paragraphStyle, params Java.Lang.Object[] replaces) 200 | { 201 | Java.Lang.Object obj = GetLast(output, kind); 202 | // start of the tag 203 | int where = output.GetSpanStart(obj); 204 | // end of the tag 205 | int len = output.Length(); 206 | 207 | output.RemoveSpan(obj); 208 | 209 | if (where != len) 210 | { 211 | int thisLen = len; 212 | // paragraph styles like AlignmentSpan need to end with a new line! 213 | if (paragraphStyle) 214 | { 215 | output.Append("\n"); 216 | thisLen++; 217 | } 218 | foreach (Java.Lang.Object replace in replaces) 219 | { 220 | output.SetSpan(replace, where, thisLen, SpanTypes.ExclusiveExclusive); 221 | } 222 | 223 | // if (HtmlTextView.DEBUG) { 224 | // Log.d(HtmlTextView.TAG, "where: " + where); 225 | // Log.d(HtmlTextView.TAG, "thisLen: " + thisLen); 226 | // } 227 | } 228 | } 229 | 230 | /** 231 | * Get last marked position of a specific tag kind (private class) 232 | */ 233 | private static Java.Lang.Object GetLast(IEditable Text, Type kind) 234 | { 235 | Java.Lang.Object[] objs = Text.GetSpans(0, Text.Length(), Java.Lang.Class.FromType(kind)); // TODO: LOl will this work? 236 | if (objs.Length == 0) 237 | { 238 | return null; 239 | } 240 | else 241 | { 242 | for (int i = objs.Length; i > 0; i--) 243 | { 244 | if (Text.GetSpanFlags(objs[i - 1]) == SpanTypes.MarkMark) 245 | { 246 | return objs[i - 1]; 247 | } 248 | } 249 | return null; 250 | } 251 | } 252 | 253 | } 254 | } -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/MarkdownTextView.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SPControls.MarkdownTextView.Droid 3 | { 4 | public static class MarkdownTextView 5 | { 6 | public static void Init() { } 7 | } 8 | } -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/MarkdownTextViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Android.App; 7 | using Android.Content; 8 | using Android.OS; 9 | using Android.Runtime; 10 | using Android.Views; 11 | using Android.Widget; 12 | using Xamarin.Forms.Platform.Android; 13 | using SPControls; 14 | using Xamarin.Forms; 15 | using System.ComponentModel; 16 | using SPControls.Forms; 17 | 18 | [assembly: ExportRenderer(typeof(SPControls.Forms.MarkdownTextView), typeof(MarkdownTextViewRenderer))] 19 | namespace SPControls 20 | { 21 | public class MarkdownTextViewRenderer : LabelRenderer 22 | { 23 | public SPControls.Forms.MarkdownTextView TextView 24 | { 25 | get 26 | { 27 | return (SPControls.Forms.MarkdownTextView)Element; 28 | } 29 | } 30 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 31 | { 32 | base.OnElementPropertyChanged(sender, e); 33 | if(e.PropertyName == "Markdown" && !string.IsNullOrEmpty(TextView.Markdown)) 34 | { 35 | Control.TextFormatted = TextUtil.GetFormattedHtml(TextView.Markdown.GetHtmlFromMarkdown(true)); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("SPControls.MarkdownTextView.Droid")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("SPControls.MarkdownTextView.Droid")] 14 | [assembly: AssemblyCopyright("Copyright © 2017")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/Resources/Values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World, Click Me! 4 | $projectname$ 5 | 6 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/SPControls.MarkdownTextView.Droid.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | 8.0.30703 9 | 2.0 10 | {6DE3988B-D8F7-4AB5-8996-AF1BC4808E47} 11 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 12 | Library 13 | Properties 14 | SPControls 15 | SPControls.MarkdownTextView.Droid 16 | 512 17 | Resources\Resource.Designer.cs 18 | Off 19 | True 20 | v8.0 21 | 22 | 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\Debug\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | 33 | 34 | pdbonly 35 | true 36 | bin\Release\ 37 | TRACE 38 | prompt 39 | 4 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll 50 | True 51 | 52 | 53 | ..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll 54 | True 55 | 56 | 57 | ..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll 58 | True 59 | 60 | 61 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll 62 | True 63 | 64 | 65 | ..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll 66 | True 67 | 68 | 69 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll 70 | True 71 | 72 | 73 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll 74 | True 75 | 76 | 77 | ..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll 78 | True 79 | 80 | 81 | ..\packages\Xamarin.Forms.2.4.0.282\lib\MonoAndroid10\FormsViewGroup.dll 82 | 83 | 84 | ..\packages\Xamarin.Forms.2.4.0.282\lib\MonoAndroid10\Xamarin.Forms.Core.dll 85 | 86 | 87 | ..\packages\Xamarin.Forms.2.4.0.282\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 88 | 89 | 90 | ..\packages\Xamarin.Forms.2.4.0.282\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 91 | 92 | 93 | ..\packages\Xamarin.Forms.2.4.0.282\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24} 114 | SPControls.MarkdownTextView 115 | 116 | 117 | 118 | 119 | 120 | 121 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/SPControls.MarkdownTextView.Droid.csproj.bak: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {6DE3988B-D8F7-4AB5-8996-AF1BC4808E47} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Properties 12 | SPControls 13 | SPControls.MarkdownTextView.Droid 14 | 512 15 | Resources\Resource.Designer.cs 16 | Off 17 | True 18 | v7.0 19 | 20 | 21 | 22 | 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE 28 | prompt 29 | 4 30 | 31 | 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE 36 | prompt 37 | 4 38 | 39 | 40 | 41 | ..\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\FormsViewGroup.dll 42 | True 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll 52 | True 53 | 54 | 55 | ..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll 56 | True 57 | 58 | 59 | ..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll 60 | True 61 | 62 | 63 | ..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll 64 | True 65 | 66 | 67 | ..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll 68 | True 69 | 70 | 71 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll 72 | True 73 | 74 | 75 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll 76 | True 77 | 78 | 79 | ..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll 80 | True 81 | 82 | 83 | ..\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Core.dll 84 | True 85 | 86 | 87 | ..\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 88 | True 89 | 90 | 91 | ..\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 92 | True 93 | 94 | 95 | ..\packages\Xamarin.Forms.2.3.3.193\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 96 | True 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24} 114 | SPControls.MarkdownTextView 115 | 116 | 117 | 118 | 119 | 120 | 121 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 122 | 123 | 124 | 125 | 126 | 127 | 134 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/TextUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Android.App; 7 | using Android.Content; 8 | using Android.OS; 9 | using Android.Runtime; 10 | using Android.Views; 11 | using Android.Widget; 12 | using Java.Lang; 13 | using Android.Text; 14 | 15 | namespace SPControls 16 | { 17 | internal static class TextUtil 18 | { 19 | public static ICharSequence GetFormattedHtml(string htmlText) 20 | { 21 | try 22 | { 23 | ICharSequence html; 24 | if(Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.N) 25 | { 26 | html = Html.FromHtml(htmlText.ParseCodeTags(), FromHtmlOptions.ModeLegacy, null, new HtmlTagHandler()) as ICharSequence; 27 | } 28 | else 29 | { 30 | // handle legacy builds 31 | html = Html.FromHtml(htmlText.ParseCodeTags(), null, new HtmlTagHandler()) as ICharSequence; 32 | } 33 | // this is required to get rid of the end two "\n" that android adds with Html.FromHtml 34 | // see: http://stackoverflow.com/questions/16585557/extra-padding-on-textview-with-html-contents for example 35 | while (html.CharAt(html.Length() - 1) == '\n') 36 | { 37 | html = html.SubSequenceFormatted(0, html.Length() - 1); 38 | } 39 | return html; 40 | } 41 | catch 42 | { 43 | return null; 44 | } 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.iOS/MarkdownTextView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Foundation; 7 | using UIKit; 8 | 9 | namespace SPControls.MarkdownTextView.iOS 10 | { 11 | public static class MarkdownTextView 12 | { 13 | public static void Init() { } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Forms/SPControls.MarkdownTextView/SPControls.MarkdownTextView.iOS/MarkdownTextViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | using Foundation; 7 | using UIKit; 8 | using SPControls.MarkdownTextView.iOS; 9 | using Xamarin.Forms; 10 | using Xamarin.Forms.Platform.iOS; 11 | using System.ComponentModel; 12 | 13 | [assembly: ExportRenderer(typeof(SPControls.Forms.MarkdownTextView), typeof(MarkdownTextViewRenderer))] 14 | namespace SPControls.MarkdownTextView.iOS 15 | { 16 | public class MarkdownTextViewRenderer : LabelRenderer 17 | { 18 | public SPControls.Forms.MarkdownTextView TextView 19 | { 20 | get 21 | { 22 | return (SPControls.Forms.MarkdownTextView)Element; 23 | } 24 | } 25 | 26 | protected override void OnElementChanged(ElementChangedEventArgs