├── .config └── dotnet-tools.json ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── a-regression.md │ ├── b-bug-report.md │ ├── c-feature-request.md │ ├── d-enhancement-proposal.md │ └── e-question.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build.yml │ └── release-nuget.yml ├── .gitignore ├── AndHUD.sln ├── AndHUD ├── AndHUD.cs ├── AndHUD.csproj ├── ProgressWheel.cs ├── Resources │ ├── drawable-hdpi │ │ ├── ic_errorstatus.png │ │ └── ic_successstatus.png │ ├── drawable-mdpi │ │ ├── ic_errorstatus.png │ │ └── ic_successstatus.png │ ├── drawable-xhdpi │ │ ├── ic_errorstatus.png │ │ └── ic_successstatus.png │ ├── drawable │ │ ├── roundedbg.xml │ │ └── roundedbgdark.xml │ ├── layout │ │ ├── loading.xml │ │ ├── loadingimage.xml │ │ └── loadingprogress.xml │ └── values │ │ ├── attrs.xml │ │ └── strings.xml └── XHUD.cs ├── Art ├── AndHUD.Icon ├── AndHUD.StatusIcons ├── AndHUD_128x128.png ├── AndHUD_512x512.png ├── Collage.png ├── ErrorStatus.png ├── ExportedIcon │ └── App Icon │ │ ├── 36.png │ │ ├── 48.png │ │ ├── 72.png │ │ ├── 96.png │ │ └── artwork.png ├── QuestionStatus.png └── SuccessStatus.png ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Directory.build.props ├── LICENSE ├── README.md ├── Sample ├── AndroidManifest.xml ├── MainActivity.cs ├── Resources │ ├── AboutResources.txt │ ├── drawable-hdpi │ │ └── ic_questionstatus.png │ ├── drawable-mdpi │ │ └── ic_questionstatus.png │ ├── drawable-xhdpi │ │ └── ic_questionstatus.png │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_second.xml │ │ └── content_main.xml │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml ├── Sample.csproj └── SecondActivity.cs ├── build.cake └── icon.png /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "cake.tool": { 6 | "version": "5.0.0", 7 | "commands": [ 8 | "dotnet-cake" 9 | ], 10 | "rollForward": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome:http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Don't use tabs for indentation. 7 | [*] 8 | indent_style = space 9 | # (Please don't specify an indent_size here; that has too many unintended consequences.) 10 | 11 | # Code files 12 | [*.{cs,csx,vb,vbx}] 13 | indent_size = 4 14 | insert_final_newline = true 15 | charset = utf-8-bom 16 | 17 | # Xml project files 18 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] 19 | indent_size = 2 20 | 21 | # Xml config files 22 | [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] 23 | indent_size = 2 24 | 25 | # JSON files 26 | [*.json] 27 | indent_size = 2 28 | 29 | # Dotnet code style settings: 30 | [*.{cs,vb}] 31 | # Sort using and Import directives with System.* appearing first 32 | dotnet_sort_system_directives_first = true 33 | # Avoid "this." and "Me." if not necessary 34 | dotnet_style_qualification_for_field = false:suggestion 35 | dotnet_style_qualification_for_property = false:suggestion 36 | dotnet_style_qualification_for_method = false:suggestion 37 | dotnet_style_qualification_for_event = false:suggestion 38 | 39 | # Use language keywords instead of framework type names for type references 40 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion 41 | dotnet_style_predefined_type_for_member_access = true:suggestion 42 | 43 | # Suggest more modern language features when available 44 | dotnet_style_object_initializer = true:suggestion 45 | dotnet_style_collection_initializer = true:suggestion 46 | dotnet_style_coalesce_expression = true:suggestion 47 | dotnet_style_null_propagation = true:suggestion 48 | dotnet_style_explicit_tuple_names = true:suggestion 49 | 50 | # CSharp code style settings: 51 | [*.cs] 52 | # Prefer "var" everywhere 53 | csharp_style_var_for_built_in_types = true:suggestion 54 | csharp_style_var_when_type_is_apparent = true:suggestion 55 | csharp_style_var_elsewhere = true:suggestion 56 | 57 | # Prefer method-like constructs to have a block body 58 | csharp_style_expression_bodied_methods = false:none 59 | csharp_style_expression_bodied_constructors = false:none 60 | csharp_style_expression_bodied_operators = false:none 61 | 62 | # Prefer property-like constructs to have an expression-body 63 | csharp_style_expression_bodied_properties = true:none 64 | csharp_style_expression_bodied_indexers = true:none 65 | csharp_style_expression_bodied_accessors = true:none 66 | 67 | # Suggest more modern language features when available 68 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 69 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 70 | csharp_style_inlined_variable_declaration = true:suggestion 71 | csharp_style_throw_expression = true:suggestion 72 | csharp_style_conditional_delegate_call = true:suggestion 73 | 74 | # Newline settings 75 | csharp_new_line_before_open_brace = all 76 | csharp_new_line_before_else = true 77 | csharp_new_line_before_catch = true 78 | csharp_new_line_before_finally = true 79 | csharp_new_line_before_members_in_object_initializers = true 80 | csharp_new_line_before_members_in_anonymous_types = true 81 | 82 | # Braces after if 83 | csharp_prefer_braces = false 84 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # This file is understood by git 1.7.2+. 2 | 3 | # Windows specific files should always be crlf on checkout 4 | *.bat text eol=crlf 5 | *.cmd text eol=crlf 6 | *.ps1 text eol=crlf 7 | 8 | # Check out the following as ln always for osx/linux/cygwin 9 | *.sh text eol=lf 10 | 11 | # Opt in the following types to always normalize line endings 12 | # on checkin and always use native endings on checkout. 13 | *.config text 14 | *.cs text diff=csharp 15 | *.csproj text 16 | *.md text 17 | *.msbuild text 18 | *.nuspec text 19 | *.pp text 20 | *.ps1 text 21 | *.sln text 22 | *.tt text 23 | *.txt text 24 | *.xaml text 25 | *.xml text 26 | 27 | # Binary files 28 | *.bmp binary 29 | *.jpeg binary 30 | *.jpg binary 31 | *.nupkg binary 32 | *.png binary 33 | *.sdf binary 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/a-regression.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🔙 Regression 4 | about: Report unexpected behavior that worked previously 5 | --- 6 | 7 | ## 🔙 Regression 8 | 9 | 10 | 11 | ### Old (and correct) behavior 12 | 13 | ### Current behavior 14 | 15 | ### Reproduction steps 16 | 17 | ### Configuration 18 | 19 | **Version:** 1.x 20 | 21 | **Platform:** 22 | - [ ] :iphone: iOS 23 | - [ ] :robot: Android 24 | - [ ] :checkered_flag: WPF 25 | - [ ] :earth_americas: UWP 26 | - [ ] :apple: MacOS 27 | - [ ] :tv: tvOS 28 | - [ ] :monkey: Xamarin.Forms 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/b-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🐛 Bug Report 4 | about: Create a report to help us fix bugs and make improvements 5 | --- 6 | 7 | ## 🐛 Bug Report 8 | 9 | 10 | 11 | ### Expected behavior 12 | 13 | ### Reproduction steps 14 | 15 | ### Configuration 16 | 17 | **Version:** 1.x 18 | 19 | **Platform:** 20 | - [ ] :iphone: iOS 21 | - [ ] :robot: Android 22 | - [ ] :checkered_flag: WPF 23 | - [ ] :earth_americas: UWP 24 | - [ ] :apple: MacOS 25 | - [ ] :tv: tvOS 26 | - [ ] :monkey: Xamarin.Forms 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/c-feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🚀 Feature Request 4 | about: Want to see something new included in the Framework? Submit it! 5 | --- 6 | 7 | ## 🚀 Feature Requests 8 | 9 | 10 | 11 | ### Contextualize the feature 12 | 13 | 14 | ### Describe the feature 15 | 16 | 17 | ### Platforms affected (mark all that apply) 18 | - [ ] :iphone: iOS 19 | - [ ] :robot: Android 20 | - [ ] :checkered_flag: WPF 21 | - [ ] :earth_americas: UWP 22 | - [ ] :apple: MacOS 23 | - [ ] :tv: tvOS 24 | - [ ] :monkey: Xamarin.Forms 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/d-enhancement-proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🏗 Enhancement Proposal 4 | about: Proposals for code cleanup, refactor and improvements in general 5 | --- 6 | 7 | ## 🏗 Enhancement Proposal 8 | 9 | 10 | 11 | ### Pitch 12 | 13 | 14 | 15 | ### Platforms affected (mark all that apply) 16 | - [ ] :iphone: iOS 17 | - [ ] :robot: Android 18 | - [ ] :checkered_flag: WPF 19 | - [ ] :earth_americas: UWP 20 | - [ ] :apple: MacOS 21 | - [ ] :tv: tvOS 22 | - [ ] :monkey: Xamarin.Forms 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/e-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 💬 Questions and Help 4 | about: If you have questions, please use this for support 5 | --- 6 | 7 | ## 💬 Questions and Help 8 | 9 | For questions or help we recommend checking: 10 | 11 | - The [Xamarin tag in Stack Overflow](https://stackoverflow.com/questions/tagged/xamarin) 12 | - The [General slack channel in the Xamarin Slack](https://xamarinchat.herokuapp.com/) 13 | - Ask your question in the [Xamarin Forums](https://forums.xamarin.com/) -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### :sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...) 2 | 3 | 4 | ### :arrow_heading_down: What is the current behavior? 5 | 6 | 7 | ### :new: What is the new behavior (if this is a feature change)? 8 | 9 | 10 | ### :boom: Does this PR introduce a breaking change? 11 | 12 | 13 | ### :bug: Recommendations for testing 14 | 15 | 16 | ### :memo: Links to relevant issues/docs 17 | 18 | 19 | ### :thinking: Checklist before submitting 20 | 21 | - [ ] All projects build 22 | - [ ] Follows style guide lines 23 | - [ ] Relevant documentation was updated 24 | - [ ] Rebased onto current develop 25 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push] 4 | 5 | env: 6 | JAVA_DISTRIBUTION: 'microsoft' 7 | JAVA_VERSION: 17 8 | NET_VERSION: 9.0.200 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: windows-latest 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 0 20 | fetch-tags: true 21 | 22 | - name: Install .NET ${{ env.NET_VERSION }} 23 | uses: actions/setup-dotnet@v4 24 | with: 25 | dotnet-version: ${{ env.NET_VERSION }} 26 | 27 | - name: Set up JDK 28 | uses: actions/setup-java@v4 29 | with: 30 | distribution: ${{ env.JAVA_DISTRIBUTION }} 31 | java-version: ${{ env.JAVA_VERSION }} 32 | 33 | - name: Restore .NET tools 34 | run: dotnet tool restore 35 | 36 | - name: Install workload 37 | run: dotnet workload install android --version ${{ env.NET_VERSION }} 38 | 39 | - name: Restore dotnet tools 40 | run: dotnet tool restore 41 | 42 | - name: Run the Cake script 43 | run: dotnet cake 44 | 45 | - uses: actions/upload-artifact@master 46 | with: 47 | name: NugetPackage 48 | path: artifacts 49 | -------------------------------------------------------------------------------- /.github/workflows/release-nuget.yml: -------------------------------------------------------------------------------- 1 | name: Release NuGet 2 | 3 | on: 4 | release: 5 | types: [published] 6 | workflow_dispatch: 7 | inputs: 8 | runId: 9 | description: "The run id of the GitHub Action Run to publish artifacts from" 10 | required: false 11 | default: '-1' 12 | 13 | jobs: 14 | nuget-publish: 15 | runs-on: windows-latest 16 | steps: 17 | - name: Download specific artifact 18 | if: ${{ github.event.inputs.runId > 0 }} 19 | uses: dawidd6/action-download-artifact@v6 20 | with: 21 | workflow: build.yml 22 | branch: main 23 | run_id: ${{ github.event.inputs.runId }} 24 | 25 | - name: Download latest artifact 26 | if: ${{ github.event.inputs.runId == -1 }} 27 | uses: dawidd6/action-download-artifact@v6 28 | with: 29 | workflow: build.yml 30 | branch: main 31 | 32 | - shell: pwsh 33 | name: Publish NuGet Package 34 | env: 35 | API_KEY: ${{ secrets.NUGET_API_KEY }} 36 | run: dotnet nuget push **/*.nupkg -k "$env:API_KEY" -s https://api.nuget.org/v3/index.json 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | ## Android Auto-generated files 5 | Resource.designer.cs 6 | 7 | # User-specific files 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | build/ 24 | bld/ 25 | [Bb]in/ 26 | [Oo]bj/ 27 | 28 | # Visual Studo 2015 cache/options directory 29 | .vs/ 30 | 31 | # MSTest test Results 32 | [Tt]est[Rr]esult*/ 33 | [Tt]est[Rr]esult* 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | *.exe 76 | *.bak 77 | *.cache 78 | *.lib 79 | 80 | # Chutzpah Test files 81 | _Chutzpah* 82 | 83 | # Visual C++ cache files 84 | ipch/ 85 | *.aps 86 | *.ncb 87 | *.opensdf 88 | *.sdf 89 | *.cachefile 90 | 91 | # Visual Studio profiler 92 | *.psess 93 | *.vsp 94 | *.vspx 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding addin-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # NCrunch 117 | _NCrunch_* 118 | .*crunch*.local.xml 119 | *.ncrunchproject 120 | 121 | # MightyMoose 122 | *.mm.* 123 | AutoTest.Net/ 124 | 125 | # Web workbench (sass) 126 | .sass-cache/ 127 | 128 | # Installshield output folder 129 | [Ee]xpress/ 130 | 131 | # DocProject is a documentation generator add-in 132 | DocProject/buildhelp/ 133 | DocProject/Help/*.HxT 134 | DocProject/Help/*.HxC 135 | DocProject/Help/*.hhc 136 | DocProject/Help/*.hhk 137 | DocProject/Help/*.hhp 138 | DocProject/Help/Html2 139 | DocProject/Help/html 140 | 141 | # Click-Once directory 142 | publish/ 143 | 144 | # Publish Web Output 145 | *.[Pp]ublish.xml 146 | *.azurePubxml 147 | # TODO: Comment the next line if you want to checkin your web deploy settings 148 | # but database connection strings (with potential passwords) will be unencrypted 149 | *.pubxml 150 | *.publishproj 151 | 152 | # NuGet Packages 153 | *.nupkg 154 | # The packages folder can be ignored because of Package Restore 155 | **/packages/* 156 | # except build/, which is used as an MSBuild target. 157 | !**/packages/build/ 158 | # Uncomment if necessary however generally it will be regenerated when needed 159 | #!**/packages/repositories.config 160 | # NuGet v3's project.json files produces more ignoreable files 161 | *.nuget.props 162 | *.nuget.targets 163 | 164 | #Allow NuGet.exe (do not ignore) 165 | !NuGet.exe 166 | *.orig 167 | 168 | # Windows Azure Build Output 169 | csx/ 170 | *.build.csdef 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | 175 | # Others 176 | *.[Cc]ache 177 | ClientBin/ 178 | [Ss]tyle[Cc]op.* 179 | ~$* 180 | *~ 181 | *.dbmdl 182 | *.dbproj.schemaview 183 | *.pfx 184 | *.publishsettings 185 | node_modules/ 186 | bower_components/ 187 | 188 | # RIA/Silverlight projects 189 | Generated_Code/ 190 | 191 | # Backup & report files from converting an old project file 192 | # to a newer Visual Studio version. Backup files are not needed, 193 | # because we have git ;-) 194 | _UpgradeReport_Files/ 195 | Backup*/ 196 | UpgradeLog*.XML 197 | UpgradeLog*.htm 198 | 199 | # SQL Server files 200 | *.mdf 201 | *.ldf 202 | 203 | # Business Intelligence projects 204 | *.rdl.data 205 | *.bim.layout 206 | *.bim_*.settings 207 | 208 | # Microsoft Fakes 209 | FakesAssemblies/ 210 | 211 | # Node.js Tools for Visual Studio 212 | .ntvs_analysis.dat 213 | 214 | # Visual Studio 6 build log 215 | *.plg 216 | 217 | # Visual Studio 6 workspace options file 218 | *.opt 219 | 220 | #ignore thumbnails created by windows 221 | Thumbs.db 222 | 223 | # Xcode 224 | .DS_Store 225 | */build/* 226 | *.pbxuser 227 | !default.pbxuser 228 | *.mode1v3 229 | !default.mode1v3 230 | *.mode2v3 231 | !default.mode2v3 232 | *.perspectivev3 233 | !default.perspectivev3 234 | xcuserdata 235 | profile 236 | *.moved-aside 237 | DerivedData 238 | .idea/ 239 | *.hmap 240 | *.xccheckout 241 | 242 | #CocoaPods 243 | Pods 244 | nuspec/nuget.exe 245 | 246 | # NuGet 247 | packages/ 248 | repositories.config 249 | 250 | #Build 251 | project.lock.json 252 | tools/* 253 | !tools/packages.config 254 | artifacts/ 255 | *.nupkg 256 | *.binlog 257 | 258 | #linting 259 | .sonarqube/ 260 | 261 | # dotnet tools 262 | .store/ -------------------------------------------------------------------------------- /AndHUD.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.6.33323.6 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AndHUD", "AndHUD\AndHUD.csproj", "{021AA4E4-9082-411F-9F4B-90AF672CA6EF}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{F1E19123-3224-4176-9964-B3BFAB0877EF}" 9 | ProjectSection(SolutionItems) = preProject 10 | build.cake = build.cake 11 | .github\workflows\build.yml = .github\workflows\build.yml 12 | Directory.build.props = Directory.build.props 13 | README.md = README.md 14 | EndProjectSection 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample", "Sample\Sample.csproj", "{FE8BBF20-2871-472A-9A0B-2A7EEE67893B}" 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|Any CPU = Debug|Any CPU 21 | Release|Any CPU = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {021AA4E4-9082-411F-9F4B-90AF672CA6EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {021AA4E4-9082-411F-9F4B-90AF672CA6EF}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {021AA4E4-9082-411F-9F4B-90AF672CA6EF}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {021AA4E4-9082-411F-9F4B-90AF672CA6EF}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 31 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Release|Any CPU.Build.0 = Release|Any CPU 33 | {FE8BBF20-2871-472A-9A0B-2A7EEE67893B}.Release|Any CPU.Deploy.0 = Release|Any CPU 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {27B49879-B6EF-497F-A4DA-44C503610BD7} 40 | EndGlobalSection 41 | GlobalSection(MonoDevelopProperties) = preSolution 42 | StartupItem = AndHUD\AndHUD.csproj 43 | EndGlobalSection 44 | EndGlobal 45 | -------------------------------------------------------------------------------- /AndHUD/AndHUD.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using Android.App; 5 | using Android.Content; 6 | using Android.Graphics; 7 | using Android.Graphics.Drawables; 8 | using Android.OS; 9 | using Android.Util; 10 | using Android.Views; 11 | using Android.Widget; 12 | 13 | namespace AndroidHUD 14 | { 15 | public class AndHUD 16 | { 17 | private const string TagName = nameof(AndHUD); 18 | 19 | static AndHUD shared; 20 | 21 | public static AndHUD Shared 22 | { 23 | get 24 | { 25 | if (shared == null) 26 | shared = new AndHUD (); 27 | 28 | return shared; 29 | } 30 | } 31 | 32 | public AndHUD() 33 | { 34 | } 35 | 36 | public Dialog CurrentDialog { get; private set; } 37 | 38 | ProgressWheel progressWheel = null; 39 | TextView statusText = null; 40 | ImageView imageView = null; 41 | 42 | object statusObj = null; 43 | 44 | private readonly SemaphoreSlim _semaphoreSlim = new(1); 45 | 46 | public void Show (Context context, string status = null, int progress = -1, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, bool centered = true, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 47 | { 48 | if (progress >= 0) 49 | showProgress (context, progress, status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 50 | else 51 | showStatus (context, true, status, maskType, timeout, clickCallback, centered, cancelCallback, prepareDialogCallback, dialogShownCallback); 52 | } 53 | 54 | public void ShowSuccess(Context context, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 55 | { 56 | showImage (context, GetDrawable(context, Resource.Drawable.ic_successstatus), status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 57 | } 58 | 59 | public void ShowError(Context context, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 60 | { 61 | showImage (context, GetDrawable(context, Resource.Drawable.ic_errorstatus), status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 62 | } 63 | 64 | public void ShowSuccessWithStatus(Context context, string status, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 65 | { 66 | showImage (context, GetDrawable(context, Resource.Drawable.ic_successstatus), status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 67 | } 68 | 69 | public void ShowErrorWithStatus(Context context, string status, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 70 | { 71 | showImage (context, GetDrawable(context, Resource.Drawable.ic_errorstatus), status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 72 | } 73 | 74 | public void ShowImage(Context context, int drawableResourceId, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 75 | { 76 | showImage (context, GetDrawable(context, drawableResourceId), status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 77 | } 78 | 79 | public void ShowImage(Context context, Drawable drawable, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 80 | { 81 | showImage (context, drawable, status, maskType, timeout, clickCallback, cancelCallback, prepareDialogCallback, dialogShownCallback); 82 | } 83 | 84 | public void ShowToast(Context context, string status, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, bool centered = true, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 85 | { 86 | showStatus (context, false, status, maskType, timeout, clickCallback, centered, cancelCallback, prepareDialogCallback, dialogShownCallback); 87 | } 88 | 89 | public void Dismiss() 90 | { 91 | if (!_semaphoreSlim.Wait(1000)) 92 | { 93 | Log.Warn(TagName, "Timed out getting semaphore on Dismiss()"); 94 | return; 95 | } 96 | try 97 | { 98 | DismissCurrent (); 99 | } 100 | finally 101 | { 102 | _semaphoreSlim.Release(); 103 | } 104 | } 105 | 106 | Drawable GetDrawable(Context context, int drawableResourceId) 107 | { 108 | if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) 109 | { 110 | return context.Resources.GetDrawable(drawableResourceId, context.Theme); 111 | } 112 | else 113 | { 114 | #pragma warning disable CS0618 // Type or member is obsolete 115 | return context.Resources.GetDrawable(drawableResourceId); 116 | #pragma warning restore CS0618 // Type or member is obsolete 117 | } 118 | } 119 | 120 | void showStatus (Context context, bool spinner, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, bool centered = true, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 121 | { 122 | if (timeout == null) 123 | timeout = TimeSpan.Zero; 124 | 125 | if (!_semaphoreSlim.Wait(1000)) 126 | { 127 | Log.Warn(TagName, "Timed out getting semaphore on showStatus()"); 128 | return; 129 | } 130 | 131 | if (CurrentDialog != null && statusObj == null) 132 | DismissCurrent (); 133 | 134 | try 135 | { 136 | if (CurrentDialog == null) 137 | { 138 | SetupDialog (context, maskType, cancelCallback, (a, d, m) => { 139 | var view = LayoutInflater.From (context)?.Inflate (Resource.Layout.loading, null); 140 | 141 | if (clickCallback != null && view is not null) 142 | view.Click += (sender, e) => clickCallback(); 143 | 144 | statusObj = new object(); 145 | 146 | statusText = view?.FindViewById(Resource.Id.textViewStatus); 147 | 148 | if (!spinner) 149 | { 150 | var progressBar = view?.FindViewById(Resource.Id.loadingProgressBar); 151 | if (progressBar != null) 152 | progressBar.Visibility = ViewStates.Gone; 153 | } 154 | 155 | if (maskType != MaskType.Black) 156 | view?.SetBackgroundResource(Resource.Drawable.roundedbgdark); 157 | 158 | if (statusText != null) 159 | { 160 | statusText.Text = status ?? ""; 161 | statusText.Visibility = string.IsNullOrEmpty(status) ? ViewStates.Gone : ViewStates.Visible; 162 | } 163 | 164 | if (!centered && d.Window is not null) 165 | { 166 | d.Window.SetGravity (GravityFlags.Bottom); 167 | var p = d.Window.Attributes; 168 | 169 | p.Y = DpToPx (context, 22); 170 | 171 | d.Window.Attributes = p; 172 | } 173 | 174 | return view; 175 | }, prepareDialogCallback, dialogShownCallback); 176 | 177 | RunTimeout(timeout); 178 | } 179 | else 180 | { 181 | 182 | Application.SynchronizationContext.Send(_ => { 183 | if (statusText != null) 184 | statusText.Text = status ?? ""; 185 | }, null); 186 | } 187 | } 188 | finally 189 | { 190 | _semaphoreSlim.Release(); 191 | } 192 | } 193 | 194 | int DpToPx(Context context, int dp) 195 | { 196 | var displayMetrics = context.Resources.DisplayMetrics; 197 | return (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, dp, displayMetrics); 198 | } 199 | 200 | void showProgress(Context context, int progress, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 201 | { 202 | timeout ??= TimeSpan.Zero; 203 | 204 | if (!_semaphoreSlim.Wait(1000)) 205 | { 206 | Log.Warn(TagName, "Timed out getting semaphore on showProgress()"); 207 | return; 208 | } 209 | 210 | if (CurrentDialog != null && progressWheel == null) 211 | DismissCurrent (); 212 | 213 | try 214 | { 215 | if (CurrentDialog == null) 216 | { 217 | SetupDialog (context, maskType, cancelCallback, (a, d, m) => { 218 | var inflater = LayoutInflater.FromContext(context); 219 | var view = inflater?.Inflate(Resource.Layout.loadingprogress, null); 220 | 221 | if (clickCallback != null && view is not null) 222 | view.Click += (sender, e) => clickCallback(); 223 | 224 | progressWheel = view?.FindViewById(Resource.Id.loadingProgressWheel); 225 | statusText = view?.FindViewById(Resource.Id.textViewStatus); 226 | 227 | if (maskType != MaskType.Black) 228 | view?.SetBackgroundResource(Resource.Drawable.roundedbgdark); 229 | 230 | progressWheel?.SetProgress(0); 231 | 232 | if (statusText != null) 233 | { 234 | statusText.Text = status ?? ""; 235 | statusText.Visibility = string.IsNullOrEmpty(status) ? ViewStates.Gone : ViewStates.Visible; 236 | } 237 | 238 | return view; 239 | }, prepareDialogCallback, dialogShownCallback); 240 | 241 | RunTimeout(timeout); 242 | } 243 | else 244 | { 245 | Application.SynchronizationContext.Send(state => { 246 | progressWheel?.SetProgress (progress); 247 | statusText.Text = status ?? ""; 248 | }, null); 249 | } 250 | } 251 | finally 252 | { 253 | _semaphoreSlim.Release(); 254 | } 255 | } 256 | 257 | void showImage(Context context, Drawable image, string status = null, MaskType maskType = MaskType.Black, TimeSpan? timeout = null, Action clickCallback = null, Action cancelCallback = null, Action prepareDialogCallback = null, Action dialogShownCallback = null) 258 | { 259 | if (timeout == null) 260 | timeout = TimeSpan.Zero; 261 | 262 | if (!_semaphoreSlim.Wait(1000)) 263 | { 264 | Log.Warn(TagName, "Timed out getting semaphore on showImage()"); 265 | return; 266 | } 267 | 268 | if (CurrentDialog != null && imageView == null) 269 | DismissCurrent (); 270 | try 271 | { 272 | if (CurrentDialog == null) 273 | { 274 | SetupDialog (context, maskType, cancelCallback, (a, d, m) => { 275 | var inflater = LayoutInflater.FromContext(context); 276 | var view = inflater?.Inflate(Resource.Layout.loadingimage, null); 277 | 278 | if (clickCallback != null && view is not null) 279 | view.Click += (sender, e) => clickCallback(); 280 | 281 | imageView = view?.FindViewById(Resource.Id.loadingImage); 282 | statusText = view?.FindViewById(Resource.Id.textViewStatus); 283 | 284 | if (maskType != MaskType.Black) 285 | view?.SetBackgroundResource(Resource.Drawable.roundedbgdark); 286 | 287 | imageView?.SetImageDrawable(image); 288 | 289 | if (statusText != null) 290 | { 291 | statusText.Text = status ?? ""; 292 | statusText.Visibility = string.IsNullOrEmpty(status) ? ViewStates.Gone : ViewStates.Visible; 293 | } 294 | 295 | return view; 296 | }, prepareDialogCallback, dialogShownCallback); 297 | 298 | RunTimeout(timeout); 299 | } 300 | else 301 | { 302 | Application.SynchronizationContext.Send(state => { 303 | imageView?.SetImageDrawable(image); 304 | statusText.Text = status ?? ""; 305 | }, null); 306 | } 307 | } 308 | finally 309 | { 310 | _semaphoreSlim.Release(); 311 | } 312 | } 313 | 314 | async void RunTimeout(TimeSpan? timeout) 315 | { 316 | if (timeout > TimeSpan.Zero) 317 | { 318 | try 319 | { 320 | await Task.Delay(timeout.Value).ConfigureAwait(false); 321 | DismissCurrent(); 322 | } 323 | catch (Exception e) 324 | { 325 | Log.Error(TagName, e.ToString()); 326 | } 327 | } 328 | } 329 | 330 | void SetupDialog(Context context, MaskType maskType, Action cancelCallback, Func customSetup, Action prepareDialogCallback = null, Action dialogShownCallback = null) 331 | { 332 | Application.SynchronizationContext.Send(state => { 333 | 334 | var dialog = new Dialog(context); 335 | 336 | dialog.RequestWindowFeature((int)WindowFeatures.NoTitle); 337 | 338 | if (maskType != MaskType.Black) 339 | dialog.Window.ClearFlags(WindowManagerFlags.DimBehind); 340 | 341 | if (maskType == MaskType.None) 342 | dialog.Window.SetFlags(WindowManagerFlags.NotTouchModal, WindowManagerFlags.NotTouchModal); 343 | 344 | dialog.Window.SetBackgroundDrawable(new ColorDrawable(Color.Transparent)); 345 | 346 | var customView = customSetup(context, dialog, maskType); 347 | 348 | dialog.SetContentView (customView); 349 | 350 | dialog.SetCancelable (cancelCallback != null); 351 | if (cancelCallback != null) 352 | dialog.CancelEvent += (sender, e) => cancelCallback(); 353 | 354 | prepareDialogCallback?.Invoke(dialog); 355 | 356 | CurrentDialog = dialog; 357 | 358 | CurrentDialog.Show (); 359 | 360 | dialogShownCallback?.Invoke(CurrentDialog); 361 | 362 | }, null); 363 | } 364 | 365 | void DismissCurrent() 366 | { 367 | if (CurrentDialog != null) 368 | { 369 | void ActionDismiss() 370 | { 371 | try 372 | { 373 | if (!IsAlive(CurrentDialog) || !IsAlive(CurrentDialog.Window)) 374 | return; 375 | 376 | CurrentDialog.Hide(); 377 | CurrentDialog.Dismiss(); 378 | } 379 | catch (Exception ex) 380 | { 381 | Log.Error(TagName, "Failed to dismiss dialog {0}", ex.ToString()); 382 | } 383 | finally 384 | { 385 | statusText = null; 386 | statusObj = null; 387 | imageView = null; 388 | progressWheel = null; 389 | CurrentDialog = null; 390 | } 391 | } 392 | 393 | Application.SynchronizationContext.Send(_ => ActionDismiss(), null); 394 | } 395 | } 396 | 397 | static bool IsAlive(Java.Lang.Object @object) 398 | { 399 | if (@object == null) 400 | return false; 401 | 402 | if (@object.Handle == IntPtr.Zero) 403 | return false; 404 | 405 | if (@object is Activity activity) 406 | { 407 | if (activity.IsFinishing) 408 | return false; 409 | 410 | if (Build.VERSION.SdkInt >= BuildVersionCodes.JellyBeanMr1 && 411 | activity.IsDestroyed) 412 | return false; 413 | } 414 | 415 | return true; 416 | } 417 | } 418 | 419 | public enum MaskType 420 | { 421 | None = 1, 422 | Clear = 2, 423 | Black = 3 424 | } 425 | } 426 | -------------------------------------------------------------------------------- /AndHUD/AndHUD.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net8.0-android;net9.0-android 4 | AndHUD 5 | AndroidHUD 6 | AndHUD 7 | AndHUD is a Progress / HUD library for Android which allows you to easily add amazing HUDs to your app! 8 | 22.0 9 | latest 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AndHUD/ProgressWheel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.OS; 3 | using Android.Views; 4 | using Android.Graphics; 5 | using Android.Util; 6 | using Android.Content; 7 | using Android.Runtime; 8 | 9 | namespace AndroidHUD 10 | { 11 | [Register("androidhud.ProgressWheel")] 12 | public class ProgressWheel : View 13 | { 14 | public ProgressWheel(Context context) 15 | : this(context, null, 0) 16 | { 17 | } 18 | 19 | public ProgressWheel(Context context, IAttributeSet attrs) 20 | : this(context, attrs, 0) 21 | { 22 | } 23 | 24 | public ProgressWheel (Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle) 25 | { 26 | CircleRadius = 80; 27 | BarLength = 60; 28 | BarWidth = 20; 29 | RimWidth = 20; 30 | TextSize = 20; 31 | 32 | //Padding (with defaults) 33 | WheelPaddingTop = 5; 34 | WheelPaddingBottom = 5; 35 | WheelPaddingLeft = 5; 36 | WheelPaddingRight = 5; 37 | 38 | //Colors (with defaults) 39 | BarColor = Color.White; 40 | CircleColor = Color.Transparent; 41 | RimColor = Color.Gray; 42 | TextColor = Color.White; 43 | 44 | //Animation 45 | //The amount of pixels to move the bar by on each draw 46 | SpinSpeed = 2; 47 | //The number of milliseconds to wait inbetween each draw 48 | DelayMillis = 0; 49 | 50 | spinHandler = new SpinHandler(msg => { 51 | Invalidate (); 52 | 53 | if (isSpinning) 54 | { 55 | progress += SpinSpeed; 56 | if (progress > 360) 57 | progress = 0; 58 | 59 | spinHandler.SendEmptyMessageDelayed (0, DelayMillis); 60 | } 61 | }); 62 | 63 | 64 | //ParseAttributes(context.ObtainStyledAttributes(attrs, null)); //TODO: swap null for R.styleable.ProgressWheel 65 | } 66 | 67 | // public string Text 68 | // { 69 | // get { return text; } 70 | // set { text = value; splitText = text.Split('\n'); } 71 | // } 72 | 73 | //public string[] SplitText { get { return splitText; } } 74 | 75 | 76 | public int CircleRadius { get;set; } 77 | public int BarLength { get;set; } 78 | public int BarWidth { get;set; } 79 | public int TextSize { get;set; } 80 | public int WheelPaddingTop { get;set; } 81 | public int WheelPaddingBottom { get; set; } 82 | public int WheelPaddingLeft { get;set; } 83 | public int WheelPaddingRight { get;set; } 84 | public Color BarColor { get;set; } 85 | public Color CircleColor { get;set; } 86 | public Color RimColor { get;set; } 87 | public Shader RimShader { get { return rimPaint.Shader; } set { rimPaint.SetShader(value); } } 88 | public Color TextColor { get;set; } 89 | public int SpinSpeed { get;set; } 90 | public int RimWidth { get;set; } 91 | public int DelayMillis { get;set; } 92 | 93 | public bool IsSpinning { get { return isSpinning; } } 94 | 95 | //Sizes (with defaults) 96 | int fullRadius = 100; 97 | 98 | //Paints 99 | Paint barPaint = new Paint(); 100 | Paint circlePaint = new Paint(); 101 | Paint rimPaint = new Paint(); 102 | Paint textPaint = new Paint(); 103 | 104 | //Rectangles 105 | //RectF rectBounds = new RectF(); 106 | RectF circleBounds = new RectF(); 107 | 108 | int progress = 0; 109 | bool isSpinning = false; 110 | SpinHandler spinHandler; 111 | 112 | Android.OS.BuildVersionCodes version = Android.OS.Build.VERSION.SdkInt; 113 | 114 | //Other 115 | //string text = ""; 116 | //string[] splitText = new string[]{}; 117 | 118 | protected override void OnAttachedToWindow () 119 | { 120 | base.OnAttachedToWindow (); 121 | 122 | SetupBounds (); 123 | SetupPaints (); 124 | 125 | Invalidate (); 126 | } 127 | 128 | void SetupPaints() 129 | { 130 | barPaint.Color = BarColor; 131 | barPaint.AntiAlias = true; 132 | barPaint.SetStyle (Paint.Style.Stroke); 133 | barPaint.StrokeWidth = BarWidth; 134 | 135 | rimPaint.Color = RimColor; 136 | rimPaint.AntiAlias = true; 137 | rimPaint.SetStyle (Paint.Style.Stroke); 138 | rimPaint.StrokeWidth = RimWidth; 139 | 140 | circlePaint.Color = CircleColor; 141 | circlePaint.AntiAlias = true; 142 | circlePaint.SetStyle(Paint.Style.Fill); 143 | 144 | textPaint.Color = TextColor; 145 | textPaint.SetStyle(Paint.Style.Fill); 146 | textPaint.AntiAlias = true; 147 | textPaint.TextSize = TextSize; 148 | } 149 | 150 | void SetupBounds() 151 | { 152 | WheelPaddingTop = this.WheelPaddingTop; 153 | WheelPaddingBottom = this.WheelPaddingBottom; 154 | WheelPaddingLeft = this.WheelPaddingLeft; 155 | WheelPaddingRight = this.WheelPaddingRight; 156 | 157 | // rectBounds = new RectF(WheelPaddingLeft, 158 | // WheelPaddingTop, 159 | // this.LayoutParameters.Width - WheelPaddingRight, 160 | // this.LayoutParameters.Height - WheelPaddingBottom); 161 | // 162 | circleBounds = new RectF(WheelPaddingLeft + BarWidth, 163 | WheelPaddingTop + BarWidth, 164 | this.LayoutParameters.Width - WheelPaddingRight - BarWidth, 165 | this.LayoutParameters.Height - WheelPaddingBottom - BarWidth); 166 | 167 | fullRadius = (this.LayoutParameters.Width - WheelPaddingRight - BarWidth)/2; 168 | CircleRadius = (fullRadius - BarWidth) + 1; 169 | } 170 | 171 | // void ParseAttributes(Android.Content.Res.TypedArray a) 172 | // { 173 | // BarWidth = (int) a.GetDimension(R.styleable.ProgressWheel_barWidth, barWidth); 174 | // RimWidth = (int) a.GetDimension(R.styleable.ProgressWheel_rimWidth, rimWidth); 175 | // SpinSpeed = (int) a.GetDimension(R.styleable.ProgressWheel_spinSpeed, spinSpeed); 176 | // DelayMillis = (int) a.GetInteger(R.styleable.ProgressWheel_delayMillis, delayMillis); 177 | // 178 | // if(DelayMillis < 0) 179 | // DelayMillis = 0; 180 | // 181 | // BarColor = a.GetColor(R.styleable.ProgressWheel_barColor, barColor); 182 | // BarLength = (int) a.GetDimension(R.styleable.ProgressWheel_barLength, barLength); 183 | // TextSize = (int) a.GetDimension(R.styleable.ProgressWheel_textSize, textSize); 184 | // TextColor = (int) a.GetColor(R.styleable.ProgressWheel_textColor, textColor); 185 | // 186 | // Text = a.GetString(R.styleable.ProgressWheel_text); 187 | // 188 | // RimColor = (int) a.GetColor(R.styleable.ProgressWheel_rimColor, rimColor); 189 | // CircleColor = (int) a.GetColor(R.styleable.ProgressWheel_circleColor, circleColor); 190 | // } 191 | 192 | 193 | 194 | //---------------------------------- 195 | //Animation stuff 196 | //---------------------------------- 197 | protected override void OnDraw (Canvas canvas) 198 | { 199 | base.OnDraw (canvas); 200 | 201 | //Draw the rim 202 | canvas.DrawArc(circleBounds, 360, 360, false, rimPaint); 203 | 204 | //Draw the bar 205 | if(isSpinning) 206 | canvas.DrawArc(circleBounds, progress - 90, BarLength, false, barPaint); 207 | else 208 | canvas.DrawArc(circleBounds, -90, progress, false, barPaint); 209 | 210 | //Draw the inner circle 211 | canvas.DrawCircle((circleBounds.Width() / 2) + RimWidth + WheelPaddingLeft, 212 | (circleBounds.Height() / 2) + RimWidth + WheelPaddingTop, 213 | CircleRadius, 214 | circlePaint); 215 | 216 | //Draw the text (attempts to center it horizontally and vertically) 217 | // int offsetNum = 2; 218 | // 219 | // foreach (var s in splitText) 220 | // { 221 | // float offset = textPaint.MeasureText(s) / 2; 222 | // 223 | // canvas.DrawText(s, this.Width / 2 - offset, 224 | // this.Height / 2 + (TextSize * (offsetNum)) 225 | // - ((splitText.Length - 1) * (TextSize / 2)), textPaint); 226 | // offsetNum++; 227 | // } 228 | } 229 | 230 | public void ResetCount() 231 | { 232 | progress = 0; 233 | //Text = "0%"; 234 | Invalidate(); 235 | } 236 | 237 | public void StopSpinning() 238 | { 239 | isSpinning = false; 240 | progress = 0; 241 | spinHandler.RemoveMessages(0); 242 | } 243 | 244 | 245 | public void Spin() 246 | { 247 | isSpinning = true; 248 | spinHandler.SendEmptyMessage(0); 249 | } 250 | 251 | public void IncrementProgress() 252 | { 253 | 254 | 255 | isSpinning = false; 256 | progress++; 257 | //Text = Math.Round(((float)progress/(float)360)*(float)100) + "%"; 258 | spinHandler.SendEmptyMessage(0); 259 | } 260 | 261 | public void SetProgress(int i) { 262 | isSpinning = false; 263 | var newProgress = (int)((float)i / (float)100 * (float)360); 264 | 265 | if (version >= Android.OS.BuildVersionCodes.Honeycomb) 266 | { 267 | Android.Animation.ValueAnimator va = 268 | (Android.Animation.ValueAnimator)Android.Animation.ValueAnimator.OfInt (progress, newProgress).SetDuration (250); 269 | 270 | va.Update += (sender, e) => { 271 | var interimValue = (int)e.Animation.AnimatedValue; 272 | 273 | progress = interimValue; 274 | 275 | //Text = Math.Round(((float)interimValue/(float)360)*(float)100) + "%"; 276 | 277 | Invalidate (); 278 | }; 279 | 280 | va.Start (); 281 | } else { 282 | progress = newProgress; 283 | Invalidate (); 284 | } 285 | 286 | spinHandler.SendEmptyMessage(0); 287 | } 288 | 289 | private sealed class SpinHandler : Handler 290 | { 291 | public SpinHandler(Action msgAction) : base(msgAction) 292 | { 293 | MessageAction = msgAction; 294 | } 295 | 296 | public Action MessageAction { get; } 297 | 298 | public override void HandleMessage (Message msg) 299 | { 300 | MessageAction (msg); 301 | } 302 | } 303 | } 304 | } 305 | 306 | -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-hdpi/ic_errorstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-hdpi/ic_errorstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-hdpi/ic_successstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-hdpi/ic_successstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-mdpi/ic_errorstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-mdpi/ic_errorstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-mdpi/ic_successstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-mdpi/ic_successstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-xhdpi/ic_errorstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-xhdpi/ic_errorstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable-xhdpi/ic_successstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/AndHUD/Resources/drawable-xhdpi/ic_successstatus.png -------------------------------------------------------------------------------- /AndHUD/Resources/drawable/roundedbg.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /AndHUD/Resources/drawable/roundedbgdark.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /AndHUD/Resources/layout/loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 15 | 27 | -------------------------------------------------------------------------------- /AndHUD/Resources/layout/loadingimage.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 18 | 30 | -------------------------------------------------------------------------------- /AndHUD/Resources/layout/loadingprogress.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 15 | 27 | -------------------------------------------------------------------------------- /AndHUD/Resources/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AndHUD/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndHUD 4 | 5 | -------------------------------------------------------------------------------- /AndHUD/XHUD.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.App; 3 | 4 | using AndroidHUD; 5 | 6 | namespace XHUD 7 | { 8 | public enum MaskType 9 | { 10 | // None = 1, 11 | Clear = 2, 12 | Black = 3, 13 | // Gradient 14 | } 15 | 16 | public static class HUD 17 | { 18 | public static Activity MyActivity; 19 | 20 | public static void Show(string message, int progress = -1, MaskType maskType = MaskType.Black) 21 | { 22 | AndHUD.Shared.Show(HUD.MyActivity, message, progress,(AndroidHUD.MaskType)maskType); 23 | } 24 | 25 | public static void Dismiss() 26 | { 27 | AndHUD.Shared.Dismiss(); 28 | } 29 | 30 | public static void ShowToast(string message, bool showToastCentered = true, double timeoutMs = 1000) 31 | { 32 | AndHUD.Shared.ShowToast(HUD.MyActivity, message, (AndroidHUD.MaskType)MaskType.Black, TimeSpan.FromSeconds(timeoutMs/1000), showToastCentered); 33 | } 34 | 35 | public static void ShowToast(string message, MaskType maskType, bool showToastCentered = true, double timeoutMs = 1000) 36 | { 37 | AndHUD.Shared.ShowToast(HUD.MyActivity, message, (AndroidHUD.MaskType)maskType, TimeSpan.FromSeconds(timeoutMs/1000), showToastCentered); 38 | } 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Art/AndHUD.Icon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/AndHUD.Icon -------------------------------------------------------------------------------- /Art/AndHUD.StatusIcons: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/AndHUD.StatusIcons -------------------------------------------------------------------------------- /Art/AndHUD_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/AndHUD_128x128.png -------------------------------------------------------------------------------- /Art/AndHUD_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/AndHUD_512x512.png -------------------------------------------------------------------------------- /Art/Collage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/Collage.png -------------------------------------------------------------------------------- /Art/ErrorStatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ErrorStatus.png -------------------------------------------------------------------------------- /Art/ExportedIcon/App Icon/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ExportedIcon/App Icon/36.png -------------------------------------------------------------------------------- /Art/ExportedIcon/App Icon/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ExportedIcon/App Icon/48.png -------------------------------------------------------------------------------- /Art/ExportedIcon/App Icon/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ExportedIcon/App Icon/72.png -------------------------------------------------------------------------------- /Art/ExportedIcon/App Icon/96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ExportedIcon/App Icon/96.png -------------------------------------------------------------------------------- /Art/ExportedIcon/App Icon/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/ExportedIcon/App Icon/artwork.png -------------------------------------------------------------------------------- /Art/QuestionStatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/QuestionStatus.png -------------------------------------------------------------------------------- /Art/SuccessStatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Art/SuccessStatus.png -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at [mvvmcross@gmail.com](mailto:mvvmcross@gmail). All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Finding an issue to work on 4 | 5 | If you'd like to work on something that isn't in a current issue, especially if it would be a big change, please open a new issue for discussion! 6 | 7 | ## Setting up a development environment 8 | 9 | First, you'll need git to fork and clone the repo. [GitHub has help pages about setting 10 | up git](https://help.github.com/articles/set-up-git/), and once you've done 11 | that, you should be able to clone the repo and change into the repo's directory 12 | from your terminal: 13 | 14 | ``` 15 | git clone https://github.com/{YourFork}/BTProgressHUD.git 16 | ``` 17 | 18 | If you are using SourceTree or another kind of visual git application, enter the url to your fork in the add new repository field. 19 | 20 | After you are done pull the develop branch, and open `BTProgressHUD.sln` in Visual Studio to get started. 21 | -------------------------------------------------------------------------------- /Directory.build.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | Copyright (c) Redth 4 | Apache-2.0 5 | https://github.com/Redth/AndHUD 6 | icon.png 7 | Redth 8 | Redth 9 | Xamarin, Android, Progress, AndHUD, AndroidHUD 10 | https://github.com/Redth/AndHUD/releases 11 | false 12 | 13 | https://github.com/Redth/AndHUD 14 | git 15 | $(AssemblyName) ($(TargetFramework)) 16 | en 17 | 2.0.0 18 | AnyCPU 19 | 20 | latest 21 | $(NoWarn);1591;1701;1702;1705;VSX1000;NU1603 22 | 23 | 24 | 25 | true 26 | true 27 | 28 | 29 | 30 | true 31 | true 32 | 33 | true 34 | 35 | true 36 | $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright 2015 Jonathan Dick 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AndHUD 2 | ========== 3 | 4 | AndHUD is a Progress / HUD library for Android which allows you to easily add amazing HUDs to your app! 5 | 6 | 7 | Features 8 | -------- 9 | - Spinner (with and without Text) 10 | - Progress (with and without Text) 11 | - Image (with and without Text) 12 | - Success / Error (with and without Text) 13 | - Toasts 14 | - Xamarin.Android Support 15 | - Xamarin Component store 16 | - Similar API and functionality to BTProgressHUD for iOS 17 | - XHUD API to help be compatible with BTProgressHUD's API (also has XHUD API) 18 | 19 | 20 | Quick and Simple 21 | ---------------- 22 | ```csharp 23 | //Show a simple status message with an indeterminate spinner 24 | AndHUD.Shared.Show(myActivity, "Status Message", -1, MaskType.Clear); 25 | 26 | //Show a progress with a filling circle representing the progress amount 27 | AndHUD.Shared.Show(myActivity, "Loading… 60%", 60); 28 | 29 | //Show a success image with a message 30 | AndHUD.Shared.ShowSuccess(myActivity, "It Worked!", MaskType.Clear, TimeSpan.FromSeconds(2)); 31 | 32 | //Show an error image with a message 33 | AndHUD.Shared.ShowError(myActivity, "It no worked :()", MaskType.Black, TimeSpan.FromSeconds(2)); 34 | 35 | //Show a toast, similar to Android native toasts, but styled as AndHUD 36 | AndHUD.Shared.ShowToast(myActivity, "This is a non-centered Toast…", MaskType.Clear, TimeSpan.FromSeconds(2)); 37 | 38 | //Show a custom image with text 39 | AndHUD.Shared.ShowImage(myActivity, Resource.Drawable.MyCustomImage, "Custom"); 40 | 41 | //Dismiss a HUD that will or will not be automatically timed out 42 | AndHUD.Shared.Dismiss(myActivity); 43 | 44 | //Show a HUD and only close it when it's clicked 45 | AndHUD.Shared.ShowToast(this, "Click this toast to close it!", MaskType.Clear, null, true, () => AndHUD.Shared.Dismiss(this)); 46 | ``` 47 | 48 | ![Collage of Possible HUDs](https://raw.github.com/Redth/AndHUD/master/Art/Collage.png) 49 | 50 | 51 | Changes 52 | ------- 53 | v1.4.3 54 | - Fixed crashes when hud is dismissing itself while Activity or Window is tearing down 55 | 56 | v1.4.2 57 | - Fixed text not being centered correctly 58 | 59 | v1.4.1 60 | - Fixed `NullReferenceException` when showing non-centered toast [#38](https://github.com/Redth/AndHUD/issues/38) 61 | - Added new sample App 62 | 63 | v1.4 64 | - Added `prepareDialogCallback` which is called right after the Dialog has been created. This can be used to customize the Dialog further. 65 | - Added `dialogShownCallback` to get notified when the Dialog has appeared on the screen. 66 | - Updated Target Framework to Android Oreo 8.1 67 | - A plethora of bug fixes 68 | - Fixed Null Ref when trying to update progress wheel 69 | - Fixed Null Ref when trying to set an image on the HUD 70 | - Removed duplicate Dismiss call from `showStatus` 71 | - Prevent exceptions when trying to show/close hud, when Activity is dead or in background 72 | - Remove obsolete call to GetDrawable 73 | - Fixed MaskType conversion from XHUD to AndHUD 74 | 75 | v1.3 76 | 77 | - Added cancelCallback parameter to allow dialogs to be cancellable 78 | - Added XHUD API to be compatible with BTProgressHUD 79 | - Renamed custom attributes to try and avoid collisions with other projects 80 | 81 | v1.2 82 | 83 | - Made all resources lowercase to work around a Xamarin.Android bug 84 | - Changed all method signatures to request a Context now instead of Activity 85 | 86 | v1.1 87 | 88 | - Target version now set to 3.1 (API Level 12), but can be used on 2.3 (API Level 9) and newer (anything below API Level 12 will lose the smooth animation for the progress indicator). 89 | 90 | 91 | Other Options 92 | ------------- 93 | - **MaskType:** By default, MaskType.Black dims the background behind the HUD. Use MaskType.Clear to prevent the dimming. Use MaskType.None to allow interaction with views behind the HUD. 94 | - **Timeout:** If you provide a timeout, the HUD will automatically be dismissed after the timeout elapses, if you have not already dismissed it manually. 95 | - **Click Callback:** If you provide a clickCallback parameter, when the HUD is tapped by the user, the action supplied will be executed. 96 | - **Cancel Callback:** If you provide a cancelCallback parameter, the HUD can be cancelled by the user pressing the back button, which will cause the cancelCallback action to be executed. 97 | 98 | 99 | Thanks 100 | ------ 101 | Thanks to Nic Wise (@fastchicken) who inspired the creation of this with his component BTProgressHUD (https://components.xamarin.com/view/btprogresshud/). It was so awesome for iOS that I needed to have it on Android as well :) 102 | 103 | -------------------------------------------------------------------------------- /Sample/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using AndroidHUD; 3 | using AndroidX.AppCompat.App; 4 | 5 | namespace SampleNet6; 6 | 7 | [Activity(Label = "@string/app_name", MainLauncher = true)] 8 | public class MainActivity : AppCompatActivity 9 | { 10 | private readonly string[] _demos = { 11 | "Status Indicator Only", 12 | "Status Indicator and Text", 13 | "Non-Modal Indicator and Text", 14 | "Progress Only", 15 | "Progress and Text", 16 | "Success Image Only", 17 | "Success Image and Text", 18 | "Error Image Only", 19 | "Error Image and Text", 20 | "Toast", 21 | "Toast Non-Centered", 22 | "Custom Image", 23 | "Click Callback", 24 | "Cancellable Callback", 25 | "Long Message", 26 | "Really Long Message", 27 | "Deadlock" 28 | }; 29 | 30 | private ListView _listView; 31 | 32 | protected override void OnCreate(Bundle? savedInstanceState) 33 | { 34 | base.OnCreate(savedInstanceState); 35 | 36 | // Set our view from the "main" layout resource 37 | SetContentView(Sample.Resource.Layout.activity_main); 38 | 39 | var toolbar = FindViewById(Sample.Resource.Id.toolbar); 40 | SetSupportActionBar(toolbar); 41 | 42 | var adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, _demos); 43 | 44 | _listView = FindViewById(Sample.Resource.Id.listview); 45 | _listView.Adapter = adapter; 46 | _listView.ItemClick += OnItemClick; 47 | } 48 | 49 | protected override void OnDestroy() 50 | { 51 | if (_listView != null) 52 | _listView.ItemClick -= OnItemClick; 53 | 54 | base.OnDestroy(); 55 | } 56 | 57 | private void OnItemClick(object sender, AdapterView.ItemClickEventArgs e) 58 | { 59 | var demo = _demos[e.Position]; 60 | 61 | switch (demo) 62 | { 63 | case "Status Indicator Only": 64 | AndHUD.Shared.Show(this, null, -1, MaskType.Black, TimeSpan.FromSeconds(3)); 65 | break; 66 | case "Status Indicator and Text": 67 | AndHUD.Shared.Show(this, "Loading...", -1, MaskType.Clear, TimeSpan.FromSeconds(3)); 68 | break; 69 | case "Non-Modal Indicator and Text": 70 | AndHUD.Shared.Show(this, "Loading...", -1, MaskType.None, TimeSpan.FromSeconds(5)); 71 | break; 72 | case "Progress Only": 73 | ShowProgressDemo(progress => AndHUD.Shared.Show(this, null, progress, MaskType.Clear)); 74 | break; 75 | case "Progress and Text": 76 | ShowProgressDemo(progress => AndHUD.Shared.Show(this, "Loading... " + progress + "%", progress, MaskType.Clear)); 77 | break; 78 | case "Success Image Only": 79 | AndHUD.Shared.ShowSuccessWithStatus(this, null, MaskType.Black, TimeSpan.FromSeconds(3)); 80 | break; 81 | case "Success Image and Text": 82 | AndHUD.Shared.ShowSuccessWithStatus(this, "It Worked!", MaskType.Clear, TimeSpan.FromSeconds(3)); 83 | break; 84 | case "Error Image Only": 85 | AndHUD.Shared.ShowErrorWithStatus(this, null, MaskType.Clear, TimeSpan.FromSeconds(3)); 86 | break; 87 | case "Error Image and Text": 88 | AndHUD.Shared.ShowErrorWithStatus(this, "It no worked :(", MaskType.Black, TimeSpan.FromSeconds(3)); 89 | break; 90 | case "Toast": 91 | AndHUD.Shared.ShowToast(this, "This is a toast... Cheers!", MaskType.Black, TimeSpan.FromSeconds(3), true); 92 | break; 93 | case "Toast Non-Centered": 94 | AndHUD.Shared.ShowToast(this, "This is a non-centered Toast...", MaskType.Clear, TimeSpan.FromSeconds(3), false); 95 | break; 96 | case "Custom Image": 97 | AndHUD.Shared.ShowImage(this, Sample.Resource.Drawable.ic_questionstatus, "Custom Image...", MaskType.Black, TimeSpan.FromSeconds(3)); 98 | break; 99 | case "Click Callback": 100 | AndHUD.Shared.ShowToast(this, "Click this toast to close it!", MaskType.Clear, null, true, () => AndHUD.Shared.Dismiss()); 101 | break; 102 | case "Cancellable Callback": 103 | AndHUD.Shared.ShowToast(this, "Click back button to cancel/close it!", MaskType.None, null, true, null, () => AndHUD.Shared.Dismiss()); 104 | break; 105 | case "Long Message": 106 | AndHUD.Shared.Show(this, "This is a longer message to display!", -1, MaskType.Black, TimeSpan.FromSeconds(3)); 107 | break; 108 | case "Really Long Message": 109 | AndHUD.Shared.Show(this, "This is a really really long message to display as a status indicator, so you should shorten it!", -1, MaskType.Black, TimeSpan.FromSeconds(3)); 110 | break; 111 | case "Deadlock": 112 | DeadlockScenario(); 113 | break; 114 | } 115 | } 116 | 117 | private async void DeadlockScenario() 118 | { 119 | AndHUD.Shared.ShowToast(this, "Deadlocking!", MaskType.None, null, true, null, () => AndHUD.Shared.Dismiss()); 120 | 121 | StartActivity(new Intent(this, typeof(SecondActivity))); 122 | 123 | await Task.WhenAll([ 124 | Task.Run(() => AndHUD.Shared.Dismiss()), 125 | Task.Run(() => AndHUD.Shared.Dismiss()), 126 | Task.Run(() => AndHUD.Shared.Dismiss()), 127 | Task.Run(() => AndHUD.Shared.Dismiss()), 128 | Task.Run(() => AndHUD.Shared.Dismiss()), 129 | Task.Run(() => AndHUD.Shared.Dismiss()), 130 | Task.Run(() => AndHUD.Shared.Dismiss()), 131 | Task.Run(() => AndHUD.Shared.Dismiss()), 132 | Task.Run(() => AndHUD.Shared.Dismiss()), 133 | Task.Run(() => AndHUD.Shared.Dismiss()), 134 | Task.Run(() => AndHUD.Shared.Dismiss()), 135 | Task.Run(() => AndHUD.Shared.Dismiss()), 136 | Task.Run(() => AndHUD.Shared.Dismiss()), 137 | Task.Run(() => AndHUD.Shared.Dismiss()), 138 | Task.Run(() => AndHUD.Shared.Dismiss()), 139 | ]); 140 | 141 | Task.Run(() => AndHUD.Shared.Dismiss()); 142 | await Task.Delay(1); 143 | AndHUD.Shared.Dismiss(); 144 | } 145 | 146 | void ShowProgressDemo(Action action) 147 | { 148 | Task.Run(() => { 149 | int progress = 0; 150 | 151 | while (progress <= 100) 152 | { 153 | action(progress); 154 | 155 | new ManualResetEvent(false).WaitOne(500); 156 | progress += 10; 157 | } 158 | 159 | AndHUD.Shared.Dismiss(); 160 | }); 161 | } 162 | 163 | void ShowDemo(Action action) 164 | { 165 | Task.Run(() => { 166 | 167 | action(); 168 | 169 | new ManualResetEvent(false).WaitOne(3000); 170 | 171 | AndHUD.Shared.Dismiss(); 172 | }); 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /Sample/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/ 12 | icon.png 13 | 14 | layout/ 15 | main.xml 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 "Resource" 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 Resource class would expose: 26 | 27 | public class Resource { 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 Resource.Drawable.icon to reference the drawable/icon.png file, or 43 | Resource.Layout.main to reference the layout/main.xml file, or Resource.Strings.first_string 44 | to reference the first string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /Sample/Resources/drawable-hdpi/ic_questionstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/drawable-hdpi/ic_questionstatus.png -------------------------------------------------------------------------------- /Sample/Resources/drawable-mdpi/ic_questionstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/drawable-mdpi/ic_questionstatus.png -------------------------------------------------------------------------------- /Sample/Resources/drawable-xhdpi/ic_questionstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/drawable-xhdpi/ic_questionstatus.png -------------------------------------------------------------------------------- /Sample/Resources/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Sample/Resources/layout/activity_second.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /Sample/Resources/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Sample/Resources/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sample/Resources/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sample/Resources/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Resources/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redth-org/AndHUD/4e779bd18df084652d3f73313148644999e3f0c4/Sample/Resources/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Sample/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2c3e50 4 | #1B3147 5 | #3498db 6 | 7 | -------------------------------------------------------------------------------- /Sample/Resources/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /Sample/Resources/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2C3E50 4 | -------------------------------------------------------------------------------- /Sample/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AndHUD 3 | 4 | -------------------------------------------------------------------------------- /Sample/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 |