[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <resourceExtensions />\n    <wildcardResourcePatterns>\n      <entry name=\"!?*.java\" />\n      <entry name=\"!?*.form\" />\n      <entry name=\"!?*.class\" />\n      <entry name=\"!?*.groovy\" />\n      <entry name=\"!?*.scala\" />\n      <entry name=\"!?*.flex\" />\n      <entry name=\"!?*.kt\" />\n      <entry name=\"!?*.clj\" />\n      <entry name=\"!?*.aj\" />\n    </wildcardResourcePatterns>\n    <annotationProcessing>\n      <profile default=\"true\" name=\"Default\" enabled=\"false\">\n        <processorPath useClasspath=\"true\" />\n      </profile>\n    </annotationProcessing>\n  </component>\n</project>"
  },
  {
    "path": ".idea/copyright/profiles_settings.xml",
    "content": "<component name=\"CopyrightManager\">\n  <settings default=\"\" />\n</component>"
  },
  {
    "path": ".idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\">\n    <file url=\"PROJECT\" charset=\"UTF-8\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"LOCAL\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"gradleHome\" value=\"C:\\Program Files\\Android\\Android Studio\\gradle\\gradle-2.14.1\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n            <option value=\"$PROJECT_DIR$/windview\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/markdown-navigator/profiles_settings.xml",
    "content": "<component name=\"MarkdownNavigator.ProfileManager\">\n  <settings default=\"\" />\n</component>"
  },
  {
    "path": ".idea/markdown-navigator.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"MarkdownProjectSettings\">\n    <PreviewSettings splitEditorLayout=\"SPLIT\" splitEditorPreview=\"PREVIEW\" useGrayscaleRendering=\"false\" zoomFactor=\"1.0\" maxImageWidth=\"0\" showGitHubPageIfSynced=\"false\" allowBrowsingInPreview=\"false\" synchronizePreviewPosition=\"true\" highlightPreviewType=\"NONE\" highlightFadeOut=\"5\" highlightOnTyping=\"true\" synchronizeSourcePosition=\"true\">\n      <PanelProvider>\n        <provider providerId=\"com.vladsch.idea.multimarkdown.editor.swing.html.panel\" providerName=\"Default - Swing\" />\n      </PanelProvider>\n    </PreviewSettings>\n    <ParserSettings>\n      <PegdownExtensions>\n        <option name=\"ABBREVIATIONS\" value=\"false\" />\n        <option name=\"ANCHORLINKS\" value=\"true\" />\n        <option name=\"ATXHEADERSPACE\" value=\"true\" />\n        <option name=\"AUTOLINKS\" value=\"true\" />\n        <option name=\"DEFINITIONS\" value=\"false\" />\n        <option name=\"FENCED_CODE_BLOCKS\" value=\"true\" />\n        <option name=\"FOOTNOTES\" value=\"false\" />\n        <option name=\"FORCELISTITEMPARA\" value=\"false\" />\n        <option name=\"HARDWRAPS\" value=\"false\" />\n        <option name=\"QUOTES\" value=\"false\" />\n        <option name=\"RELAXEDHRULES\" value=\"true\" />\n        <option name=\"SMARTS\" value=\"false\" />\n        <option name=\"STRIKETHROUGH\" value=\"true\" />\n        <option name=\"SUPPRESS_HTML_BLOCKS\" value=\"false\" />\n        <option name=\"SUPPRESS_INLINE_HTML\" value=\"false\" />\n        <option name=\"TABLES\" value=\"true\" />\n        <option name=\"TASKLISTITEMS\" value=\"true\" />\n        <option name=\"TOC\" value=\"false\" />\n        <option name=\"TRACE_PARSER\" value=\"false\" />\n        <option name=\"WIKILINKS\" value=\"true\" />\n      </PegdownExtensions>\n      <ParserOptions>\n        <option name=\"COMMONMARK_LISTS\" value=\"false\" />\n        <option name=\"DUMMY\" value=\"false\" />\n        <option name=\"EMOJI_SHORTCUTS\" value=\"true\" />\n        <option name=\"FLEXMARK_FRONT_MATTER\" value=\"false\" />\n        <option name=\"GFM_TABLE_RENDERING\" value=\"true\" />\n        <option name=\"GITBOOK_URL_ENCODING\" value=\"false\" />\n        <option name=\"GITHUB_EMOJI_URL\" value=\"false\" />\n        <option name=\"GITHUB_LISTS\" value=\"true\" />\n        <option name=\"GITHUB_WIKI_LINKS\" value=\"true\" />\n        <option name=\"JEKYLL_FRONT_MATTER\" value=\"false\" />\n        <option name=\"SIM_TOC_BLANK_LINE_SPACER\" value=\"true\" />\n      </ParserOptions>\n    </ParserSettings>\n    <HtmlSettings headerTopEnabled=\"false\" headerBottomEnabled=\"false\" bodyTopEnabled=\"false\" bodyBottomEnabled=\"false\" embedUrlContent=\"false\" addPageHeader=\"true\">\n      <GeneratorProvider>\n        <provider providerId=\"com.vladsch.idea.multimarkdown.editor.swing.html.generator\" providerName=\"Default Swing HTML Generator\" />\n      </GeneratorProvider>\n      <headerTop />\n      <headerBottom />\n      <bodyTop />\n      <bodyBottom />\n    </HtmlSettings>\n    <CssSettings previewScheme=\"UI_SCHEME\" cssUri=\"\" isCssUriEnabled=\"false\" isCssTextEnabled=\"false\" isDynamicPageWidth=\"true\">\n      <StylesheetProvider>\n        <provider providerId=\"com.vladsch.idea.multimarkdown.editor.swing.html.css\" providerName=\"Default Swing Stylesheet\" />\n      </StylesheetProvider>\n      <ScriptProviders />\n      <cssText />\n    </CssSettings>\n    <HtmlExportSettings updateOnSave=\"false\" parentDir=\"$ProjectFileDir$\" targetDir=\"$ProjectFileDir$\" cssDir=\"\" scriptDir=\"\" plainHtml=\"false\" imageDir=\"\" copyLinkedImages=\"false\" imageUniquifyType=\"0\" targetExt=\"\" useTargetExt=\"false\" noCssNoScripts=\"false\" linkToExportedHtml=\"true\" exportOnSettingsChange=\"true\" regenerateOnProjectOpen=\"false\" />\n    <LinkMapSettings>\n      <textMaps />\n    </LinkMapSettings>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"EntryPointsManager\">\n    <entry_points version=\"2.0\" />\n  </component>\n  <component name=\"NullableNotNullManager\">\n    <option name=\"myDefaultNullable\" value=\"android.support.annotation.Nullable\" />\n    <option name=\"myDefaultNotNull\" value=\"android.support.annotation.NonNull\" />\n    <option name=\"myNullables\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.Nullable\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nullable\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.Nullable\" />\n        </list>\n      </value>\n    </option>\n    <option name=\"myNotNulls\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.NotNull\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nonnull\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.NonNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.NonNull\" />\n        </list>\n      </value>\n    </option>\n  </component>\n  <component name=\"ProjectLevelVcsManager\" settingsEditedManually=\"false\">\n    <OptionsSetting value=\"true\" id=\"Add\" />\n    <OptionsSetting value=\"true\" id=\"Remove\" />\n    <OptionsSetting value=\"true\" id=\"Checkout\" />\n    <OptionsSetting value=\"true\" id=\"Update\" />\n    <OptionsSetting value=\"true\" id=\"Status\" />\n    <OptionsSetting value=\"true\" id=\"Edit\" />\n    <ConfirmationsSetting value=\"0\" id=\"Add\" />\n    <ConfirmationsSetting value=\"0\" id=\"Remove\" />\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_7\" default=\"true\" assert-keyword=\"true\" jdk-15=\"true\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/WindView.iml\" filepath=\"$PROJECT_DIR$/WindView.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/app/app.iml\" filepath=\"$PROJECT_DIR$/app/app.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/windview/windview.iml\" filepath=\"$PROJECT_DIR$/windview/windview.iml\" />\n    </modules>\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "[![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=true)](http://www.apache.org/licenses/LICENSE-2.0)\n![minSdkVersion 14](https://img.shields.io/badge/minSdkVersion-14-red.svg?style=true)\n![compileSdkVersion 25](https://img.shields.io/badge/compileSdkVersion-25-yellow.svg?style=true)\n[![Release](https://img.shields.io/github/release/jitpack/android-example.svg?label=Jitpack)](https://jitpack.io/#jitpack/android-example)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-WindView-brightgreen.svg?style=flat)](https://android-arsenal.com)\n# WindView\nWindView is an Android Library to show Weather's Wind & pressure Status\n\n# Screenshot\n![alt tag](https://raw.githubusercontent.com/AhmadNemati/WindView/master/art/screen.gif)\n\n# Demo\n\n - [**demo.apk**](https://raw.githubusercontent.com/AhmadNemati/WindView/master/app/demo.apk)\n\n\n\n# Setup\n# Step 1: Add it as a Dependency in Your Root's `build.gradle` File\n\n\n\n```gradle\nallprojects {\n\trepositories {\n\t\tmaven { url \"https://jitpack.io\" }\n\t}\n}\n```\n  -  add this to your app `build.gradle`:\n\n```gradle\ndependencies {\n\tcompile 'com.github.AhmadNemati:WindView:1.1.1'\n}\n```\n\n# Step 2: Add it to your Layout\n```xml\n  <com.github.ahmadnemati.wind.WindView\n            android:id=\"@+id/windview\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"106dp\"\n            app:barometerTickSpacing=\"9dp\"\n            app:bigPoleX=\"38dp\"\n            app:labelFontSize=\"12sp\"\n            app:numericFontSize=\"25sp\"\n            app:poleBottomY=\"98dp\"\n            app:pressureLineY=\"73dp\"\n            app:pressureTextX=\"12dp\"\n            app:pressureTextY=\"4dp\"\n            app:smallPoleX=\"75dp\"\n            app:windTextX=\"10dp\"\n            app:windTextY=\"29dp\" />\n```\n\n# Step 3: Initialize WindView and Start it\n```java\n            WindView windView= (WindView) findViewById(R.id.windview);\n            windView.setPressure(20);\n            windView.setPressureUnit(\"in Hg\");\n            windView.setWindSpeed(1);\n            windView.setWindSpeedUnit(\" km/h\");\n            windView.setTrendType(TrendType.UP);\n            windView.start();\n```\n\n# Note\nGraphical implementations are based on Yahoo Weather Service\n# Developed By\n\n* Ahmad Nemati\n * [ahmadnemati.com](http://ahmadnemati.com) - <nematiprog@gmail.com>\n\n\n# License\n\n    Copyright 2016 Ahmad Nemati\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 27\n\n\n    defaultConfig {\n        applicationId \"com.example.windview\"\n        minSdkVersion 14\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(include: ['*.jar'], dir: 'libs')\n    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {\n        exclude group: 'com.android.support', module: 'support-annotations'\n    })\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    implementation 'com.android.support:design:27.1.1'\n    implementation 'com.android.support:cardview-v7:27.1.1'\n    implementation 'com.mikepenz:materialize:1.0.0@aar'\n    implementation 'com.jakewharton:butterknife:8.8.1'\n    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'\n    testImplementation 'junit:junit:4.12'\n    implementation project(':windview')\n\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:\\Android\\sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "app/src/androidTest/java/com/example/windview/ExampleInstrumentedTest.java",
    "content": "package com.example.windview;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumentation test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.example.windview\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.windview\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\" android:theme=\"@style/AppTheme.NoActionBar\" android:screenOrientation=\"portrait\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/java/com/example/windview/CustomRadioButton.java",
    "content": "package com.example.windview;\n\nimport android.content.Context;\nimport android.graphics.Color;\nimport android.os.Build;\nimport android.support.annotation.RequiresApi;\nimport android.util.AttributeSet;\nimport android.widget.RadioButton;\n\n/**\n * Created by Ahmad Nemati on 12/25/2016.\n */\n\npublic class CustomRadioButton extends android.support.v7.widget.AppCompatRadioButton {\n    public CustomRadioButton(Context context) {\n        super(context);\n    }\n\n    public CustomRadioButton(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    public CustomRadioButton(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n    }\n\n    @Override\n    public boolean isChecked() {\n        return super.isChecked();\n    }\n\n    @Override\n    public void setChecked(boolean checked) {\n        if (checked)\n            setTextColor(Color.WHITE);\n        else\n            setTextColor(Color.BLACK);\n        super.setChecked(checked);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/example/windview/MainActivity.java",
    "content": "package com.example.windview;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.AppCompatSpinner;\nimport android.util.Log;\nimport android.view.View;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.RadioGroup;\nimport android.widget.SeekBar;\n\nimport com.github.ahmadnemati.wind.WindView;\nimport com.github.ahmadnemati.wind.enums.TrendType;\nimport com.mikepenz.materialize.MaterializeBuilder;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport butterknife.BindView;\nimport butterknife.ButterKnife;\n\npublic class MainActivity extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener, RadioGroup.OnCheckedChangeListener, View.OnClickListener {\n    @BindView(R.id.windview)\n    WindView windView;\n    @BindView(R.id.wind_speed)\n    SeekBar windSpeed;\n    @BindView(R.id.pressure)\n    SeekBar pressureSpeed;\n    @BindView(R.id.barometr_size)\n    SeekBar barometreSize;\n    @BindView(R.id.wind_unit)\n    AppCompatSpinner windUnit;\n    @BindView(R.id.radio_group)\n    RadioGroup radioGroup;\n    @BindView(R.id.pressure_unit)\n    AppCompatSpinner pressureUnit;\n    @BindView(R.id.animate)\n    Button animateBaroMeter;\n    @BindView(R.id.linebar)\n    SeekBar line;\n\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        ButterKnife.bind(this);\n        materialize();\n        setupWindView();\n        initSpinner();\n        initSeekBars();\n        initRadioButton();\n\n\n    }\n\n    private void initRadioButton() {\n        radioGroup.setOnCheckedChangeListener(this);\n    }\n\n    private void setupWindView() {\n        animateBaroMeter.setOnClickListener(this);\n        windView.setPressure(20);\n        windView.setPressureUnit(\"in Hg\");\n        windView.setWindSpeed(1);\n        windView.setWindSpeedUnit(\" km/h\");\n        windView.setTrendType(TrendType.UP);\n        windView.start();\n\n\n    }\n\n    private void initSeekBars() {\n        windSpeed.setOnSeekBarChangeListener(this);\n        pressureSpeed.setOnSeekBarChangeListener(this);\n        barometreSize.setOnSeekBarChangeListener(this);\n        line.setOnSeekBarChangeListener(this);\n    }\n\n    private void materialize() {\n        new MaterializeBuilder()\n                .withActivity(this)\n                .withFullscreen(true)\n                .withTranslucentStatusBarProgrammatically(false)\n                .withTintedStatusBar(false).build();\n    }\n\n    private void initSpinner() {\n        List<String> windUnits = new ArrayList<>();\n        windUnits.add(\"km/h\");\n        windUnits.add(\"ft/s\");\n        windUnits.add(\"m/s\");\n        ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,\n                R.layout.dropdown_item, windUnits);\n        windUnit.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n                windView.setWindSpeedUnit(\"\" + adapterView.getAdapter().getItem(i).toString());\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> adapterView) {\n\n            }\n        });\n\n        windUnit.setAdapter(arrayAdapter);\n\n        List<String> pressureUnits = new ArrayList<>();\n        pressureUnits.add(\"Hg\");\n        pressureUnits.add(\"Pa\");\n        pressureUnits.add(\"hPa\");\n        ArrayAdapter<String> arrayAdapter2 = new ArrayAdapter<String>(this,\n                R.layout.dropdown_item, pressureUnits);\n        pressureUnit.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n                windView.setPressureUnit(\"in \" + adapterView.getAdapter().getItem(i).toString());\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> adapterView) {\n\n            }\n        });\n\n        pressureUnit.setAdapter(arrayAdapter2);\n\n\n    }\n\n    @Override\n    public void onProgressChanged(SeekBar seekBar, int i, boolean b) {\n        switch (seekBar.getId()) {\n            case R.id.wind_speed:\n                windView.setWindSpeed(i);\n                break;\n            case R.id.pressure:\n                windView.setPressure(i);\n                break;\n            case R.id.barometr_size:\n                windView.setBarometerStrokeWidth(i);\n                break;\n            case R.id.linebar:\n                windView.setLineStrokeWidth(i);\n                break;\n        }\n    }\n\n    @Override\n    public void onStartTrackingTouch(SeekBar seekBar) {\n\n    }\n\n    @Override\n    public void onStopTrackingTouch(SeekBar seekBar) {\n\n    }\n\n\n    @Override\n    public void onCheckedChanged(RadioGroup radioGroup, int i) {\n        switch (radioGroup.getCheckedRadioButtonId()) {\n            case R.id.rv_up:\n                windView.setTrendType(TrendType.UP);\n                windView.start();\n                break;\n            case R.id.rv_down:\n                windView.setTrendType(TrendType.DOWN);\n                windView.start();\n                break;\n            case R.id.rv_none:\n                windView.setTrendType(TrendType.NONE);\n                windView.start();\n                break;\n        }\n\n    }\n\n    @Override\n    public void onClick(View view) {\n        Log.e(\"Click\", \"Clicked\");\n        windView.animateBaroMeter();\n    }\n\n    @Override\n    protected void onPause() {\n        super.onPause();\n        windView.stop();\n    }\n\n    @Override\n    protected void onResume() {\n        super.onResume();\n        windView.start();\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@drawable/back\"\n    android:fitsSystemWindows=\"true\"\n    android:orientation=\"vertical\">\n\n    <android.support.v4.widget.Space\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"25dp\" />\n\n    <android.support.v7.widget.CardView\n        android:id=\"@+id/card_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"8dp\"\n        android:layout_marginTop=\"25dp\"\n        app:cardBackgroundColor=\"#11607d8b\"\n        app:cardCornerRadius=\"4dp\"\n        app:cardPreventCornerOverlap=\"true\"\n        app:cardUseCompatPadding=\"true\">\n\n        <com.github.ahmadnemati.wind.WindView\n            android:id=\"@+id/windview\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"106dp\"\n            app:barometerTickSpacing=\"9dp\"\n            app:bigPoleX=\"38dp\"\n            app:labelFontSize=\"12sp\"\n            app:numericFontSize=\"25sp\"\n            app:poleBottomY=\"98dp\"\n            app:pressureLineY=\"73dp\"\n            app:pressureTextX=\"12dp\"\n            app:pressureTextY=\"4dp\"\n            app:smallPoleX=\"75dp\"\n            app:windTextX=\"10dp\"\n            app:windTextY=\"29dp\" />\n\n\n    </android.support.v7.widget.CardView>\n\n    <android.support.v7.widget.CardView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"8dp\"\n        android:layout_marginBottom=\"50dp\"\n        android:layout_marginTop=\"25dp\"\n        app:cardBackgroundColor=\"#11607d8b\"\n        app:cardCornerRadius=\"4dp\"\n        app:cardPreventCornerOverlap=\"true\"\n        app:cardUseCompatPadding=\"true\">\n\n        <ScrollView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:fillViewport=\"true\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_margin=\"8dp\"\n                android:orientation=\"vertical\">\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"5dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_weather_windy_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <SeekBar\n                        android:id=\"@+id/wind_speed\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:max=\"35\"\n                        android:progress=\"1\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_chart_areaspline_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <android.support.v7.widget.AppCompatSpinner\n                        android:id=\"@+id/wind_unit\"\n                        style=\"@style/Widget.AppCompat.DropDownItem.Spinner\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:layout_marginLeft=\"8dp\"\n                        android:layout_marginRight=\"8dp\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_weather_windy_variant_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <SeekBar\n                        android:id=\"@+id/barometr_size\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:max=\"20\"\n                        android:progress=\"1\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_animation_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <Button\n                        android:id=\"@+id/animate\"\n                        style=\"@style/AppTheme\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:layout_marginLeft=\"8dp\"\n                        android:layout_marginRight=\"8dp\"\n                        android:text=\"Animate Barometer\"\n                        android:textColor=\"#000000\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_trending_down_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <RadioGroup\n                        android:id=\"@+id/radio_group\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:layout_marginLeft=\"8dp\"\n                        android:layout_marginRight=\"8dp\"\n                        android:orientation=\"horizontal\">\n\n                        <com.example.windview.CustomRadioButton\n                            android:id=\"@+id/rv_up\"\n                            style=\"@style/Widget.AppCompat.CompoundButton.RadioButton\"\n                            android:layout_width=\"match_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_weight=\"1\"\n                            android:checked=\"true\"\n                            android:gravity=\"center_vertical\"\n                            android:text=\"UP\"\n                            android:textColor=\"#424242\" />\n\n                        <com.example.windview.CustomRadioButton\n                            android:id=\"@+id/rv_down\"\n                            style=\"@style/Widget.AppCompat.CompoundButton.RadioButton\"\n                            android:layout_width=\"match_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_gravity=\"center\"\n                            android:layout_weight=\"1\"\n                            android:gravity=\"center_vertical\"\n                            android:text=\"DOWN\"\n                            android:textColor=\"#424242\" />\n\n                        <com.example.windview.CustomRadioButton\n                            android:id=\"@+id/rv_none\"\n                            style=\"@style/Base.Widget.AppCompat.CompoundButton.RadioButton\"\n                            android:layout_width=\"match_parent\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_weight=\"1\"\n                            android:gravity=\"center_vertical\"\n                            android:text=\"NONE\"\n                            android:textColor=\"#424242\" />\n\n                    </RadioGroup>\n\n                </LinearLayout>\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_arrow_compress_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <SeekBar\n                        android:id=\"@+id/pressure\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:max=\"100\"\n                        android:progress=\"20\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n                        android:layout_height=\"match_parent\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_arrow_compress_all_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <android.support.v7.widget.AppCompatSpinner\n                        android:id=\"@+id/pressure_unit\"\n                        style=\"@style/Widget.AppCompat.DropDownItem.Spinner\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:layout_marginLeft=\"8dp\"\n                        android:layout_marginRight=\"8dp\" />\n\n                </LinearLayout>\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <ImageView\n                        android:layout_width=\"25dp\"\n\n                        android:layout_height=\"25dp\"\n                        android:layout_gravity=\"center\"\n                        android:src=\"@drawable/ic_dots_horizontal_black_36dp\"\n                        android:tint=\"#ffffff\" />\n\n                    <SeekBar\n                        android:id=\"@+id/linebar\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_gravity=\"center\"\n                        android:max=\"15\"\n                        android:progress=\"1\" />\n\n                </LinearLayout>\n\n\n\n\n\n\n\n\n\n\n\n\n\n            </LinearLayout>\n\n        </ScrollView>\n\n\n    </android.support.v7.widget.CardView>\n\n\n</LinearLayout>\n\n"
  },
  {
    "path": "app/src/main/res/layout/dropdown_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@android:id/text1\"\n    style=\"?android:attr/dropDownItemStyle\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"?android:attr/listPreferredItemHeight\"\n    android:ellipsize=\"marquee\"\n    android:maxLines=\"1\"\n    android:textAppearance=\"?android:attr/textAppearanceLargePopupMenu\"\n    android:textColor=\"#000000\" />\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#ffffff</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">WindView</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">#ffffff</item>\n        <item name=\"colorButtonNormal\">#ffffff</item>\n        <item name=\"colorControlHighlight\">#9E9E9E</item>\n    </style>\n\n    <style name=\"AppTheme.NoActionBar\">\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n    </style>\n\n    <style name=\"AppTheme.AppBarOverlay\" parent=\"ThemeOverlay.AppCompat.Dark.ActionBar\" />\n\n    <style name=\"AppTheme.PopupOverlay\" parent=\"ThemeOverlay.AppCompat.Light\" />\n\n\n\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-v21/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <style name=\"AppTheme.NoActionBar\">\n        <item name=\"windowActionBar\">false</item>\n        <item name=\"windowNoTitle\">true</item>\n        <item name=\"android:windowDrawsSystemBarBackgrounds\">true</item>\n        <item name=\"android:statusBarColor\">@android:color/transparent</item>\n    </style>\n</resources>"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n</resources>\n"
  },
  {
    "path": "app/src/test/java/com/example/windview/ExampleUnitTest.java",
    "content": "package com.example.windview;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        google()\n        jcenter()\n        maven {\n            url 'https://maven.google.com/'\n            name 'Google'\n        }\n\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.1.4'\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        maven {\n            url 'https://maven.google.com/'\n            name 'Google'\n        }\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sat Aug 11 10:03:44 IRDT 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':windview'\n"
  },
  {
    "path": "windview/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "windview/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'com.github.dcendents.android-maven'\n\nandroid {\n    compileSdkVersion 27\n\n\n    defaultConfig {\n        minSdkVersion 14\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n\n    }\n    group = 'com.github.AhmadNemati'\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {\n        exclude group: 'com.android.support', module: 'support-annotations'\n    })\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    testImplementation 'junit:junit:4.12'\n}\n\n\n\n\n"
  },
  {
    "path": "windview/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:\\Android\\sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "windview/src/androidTest/java/com/github/ahmadnemati/wind/ExampleInstrumentedTest.java",
    "content": "package com.github.ahmadnemati.wind;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumentation test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.github.ahmadnemati.wind.test\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "windview/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.github.ahmadnemati.wind\">\n\n    <application android:allowBackup=\"true\" android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\">\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "windview/src/main/java/com/github/ahmadnemati/wind/WindView.java",
    "content": "package com.github.ahmadnemati.wind;\n\nimport android.content.Context;\nimport android.content.res.Resources;\nimport android.content.res.TypedArray;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.DashPathEffect;\nimport android.graphics.Matrix;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.PathEffect;\nimport android.graphics.Rect;\nimport android.graphics.Typeface;\nimport android.os.Build;\nimport android.support.annotation.RequiresApi;\nimport android.text.TextUtils;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.view.View;\n\nimport com.github.ahmadnemati.wind.enums.TrendType;\n\nimport java.math.BigDecimal;\nimport java.text.NumberFormat;\n\n/**\n * Created by َAhmad Nemati on 12/19/2016.\n */\n\npublic class WindView extends View {\n    private static final String TAG = WindView.class.getSimpleName();\n    private Rect rect = new Rect();\n    private Path path;\n    private Matrix matrix;\n    private Paint paint;\n    private int textColor;\n    private String WindDirectionText;\n    private long startTime = 0;\n    private PathEffect pathEffect;\n    private Bitmap smallPoleBitmap;\n    private Bitmap bigPoleBitmap;\n    private Bitmap smallBladeBitmap;\n    private Bitmap bigBladeBitmap;\n    private Bitmap trendBitmap;\n    private float rotation;\n    private int bigPoleX;\n    private int smallPoleX;\n    private String windText = \"Wind\";\n    private String windName;\n    private String windSpeedText;\n    private String barometerText = \"Barometer\";\n    private int poleBottomY;\n    private int windTextX;\n    private int windTextY;\n    private float windSpeed;\n    private String windSpeedUnit;\n    private boolean animationEnable = true;\n    private boolean animationBaroMeterEnable = false;\n    private float pressurePaddingTop;\n    private double senterOfPressureLine;\n    private double pressureLineSize;\n    private int scale;\n    private float barometerTickSpacing;\n    private double lineSpace;\n    private float pressure;\n    private String pressureText;\n    private float lineSize;\n    private float curSize;\n    private int pressureTextY;\n    private String pressureUnit;\n    private int labelFontSize;\n    private int numericFontSize;\n    private Typeface typeface;\n    private String empty = \"--\";\n    private TrendType trendType = TrendType.UP;\n    private int lineColor = Color.WHITE;\n    private float lineStrokeWidth = 1f;\n    private int barometerColor = Color.WHITE;\n    private float barometerStrokeWidth = 2f;\n\n\n    public WindView(Context context) {\n        super(context);\n        setupView();\n    }\n\n    public WindView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        init(attrs);\n    }\n\n    public WindView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        init(attrs);\n    }\n\n    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n    public WindView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n        super(context, attrs, defStyleAttr, defStyleRes);\n        init(attrs);\n    }\n\n    public static String getTAG() {\n        return TAG;\n    }\n\n    private void init(AttributeSet attrs) {\n        TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attrs, R.styleable.WindView);\n        pressure = obtainStyledAttributes.getFloat(R.styleable.WindView_pressure, -1.0f);\n        windTextX = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_windTextX, 242);\n        windTextY = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_windTextY, 44);\n        pressureTextY = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_pressureTextY, 8);\n        labelFontSize = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_labelFontSize, 18);\n        numericFontSize = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_numericFontSize, 14);\n        barometerTickSpacing = (float) obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_barometerTickSpacing, 9);\n        bigPoleX = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_bigPoleX, 48);\n        smallPoleX = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_smallPoleX, 98);\n        poleBottomY = obtainStyledAttributes.getDimensionPixelSize(R.styleable.WindView_poleBottomY, 118);\n        scale = getScaleInPixel(20);\n        obtainStyledAttributes.recycle();\n        setupView();\n    }\n\n    private void setupView() {\n\n        Resources resources = getContext().getResources();\n        textColor = resources.getColor(R.color.text_color);\n        paint = new Paint();\n        paint.setAntiAlias(true);\n        paint.setTypeface(getTypeface());\n        paint.setStyle(Paint.Style.FILL);\n        smallPoleBitmap = BitmapFactory.decodeResource(resources, R.drawable.smallpole);\n        bigPoleBitmap = BitmapFactory.decodeResource(resources, R.drawable.bigpole);\n        smallBladeBitmap = BitmapFactory.decodeResource(resources, R.drawable.smallblade);\n        bigBladeBitmap = BitmapFactory.decodeResource(resources, R.drawable.bigblade);\n        matrix = new Matrix();\n        WindDirectionText = \"\";\n        lineColor = Color.parseColor(\"#8bece8e8\");\n        rotation = 0.0f;\n        lineSpace = toPixel(1d);\n        pressureLineSize = lineSpace + (barometerTickSpacing);\n        senterOfPressureLine = (9d * pressureLineSize) + lineSpace;\n        pressurePaddingTop = getPaddingTop();\n        pathEffect = new DashPathEffect(new float[]{4f, 4f}, 0f);\n\n    }\n\n    public void start() {\n        animationEnable = true;\n        invalidate();\n    }\n\n    public void stop() {\n        animationEnable = false;\n    }\n\n    public void setWindSpeed(float f) {\n        windSpeed = f;\n        if (windSpeed >= 36.0f && animationEnable) {\n            if (smallBladeBitmap != null) {\n                smallBladeBitmap.recycle();\n            }\n            if (bigBladeBitmap != null) {\n                bigBladeBitmap.recycle();\n            }\n            smallBladeBitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.blade_s_blur);\n            bigBladeBitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.blade_big_blur);\n        }\n        windSpeedText = formatFloat(windSpeed);\n        initSpeedUnit();\n        invalidate();\n    }\n\n    public void setWindDirection(String str) {\n        WindDirectionText = str;\n        initSpeedUnit();\n    }\n\n    private void initSpeedUnit() {\n        StringBuilder stringBuilder = new StringBuilder();\n        if (windSpeed < 0.0f || windSpeedUnit == null) {\n            stringBuilder.append(empty);\n        } else {\n            stringBuilder.append(\" \").append(windSpeedUnit).append(\" \").append(WindDirectionText);\n        }\n        windName = stringBuilder.toString();\n    }\n\n    @Override\n    protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n        super.onSizeChanged(w, h, oldw, oldh);\n        setupPressureLine(false);\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        initCanvas(canvas);\n    }\n\n    private void initCanvas(Canvas canvas) {\n        boolean enable = false;\n        if (bigPoleBitmap != null && smallBladeBitmap != null && bigBladeBitmap != null) {\n            paint.setColor(textColor);\n            paint.setTypeface(typeface);\n            canvas.drawBitmap(bigPoleBitmap, bigPoleX, (poleBottomY - bigPoleBitmap.getHeight()), paint);\n            canvas.drawBitmap(smallPoleBitmap, smallPoleX, (poleBottomY - smallPoleBitmap.getHeight()), paint);\n            if (animationEnable) {\n                startTimes();\n            }\n            int width = bigPoleX + (bigPoleBitmap.getWidth() / 2);\n            int height = (poleBottomY - bigPoleBitmap.getHeight()) - 4;\n            rect.left = width - (bigBladeBitmap.getWidth() / 2);\n            rect.top = height - (bigBladeBitmap.getHeight() / 2);\n            rect.bottom = (bigBladeBitmap.getHeight() / 2) + height;\n            matrix.reset();\n            matrix.setRotate(rotation, (bigBladeBitmap.getWidth()) / 2.0f, (bigBladeBitmap.getHeight()) / 2.0f);\n            matrix.postTranslate((width - (bigBladeBitmap.getWidth() / 2)), (height - (bigBladeBitmap.getHeight() / 2)));\n            canvas.drawBitmap(bigBladeBitmap, matrix, paint);\n            width = smallPoleX + (smallPoleBitmap.getWidth() / 2);\n            int height2 = (poleBottomY - smallPoleBitmap.getHeight()) - 4;\n            rect.right = (smallBladeBitmap.getWidth() / 2) + width;\n            rect.bottom = Math.max(rect.bottom, height + (smallBladeBitmap.getHeight() / 2));\n            matrix.reset();\n            matrix.setRotate(rotation, (smallBladeBitmap.getWidth()) / 2.0f, (smallBladeBitmap.getHeight()) / 2.0f);\n            matrix.postTranslate((width - (smallBladeBitmap.getWidth() / 2)), (height2 - (smallBladeBitmap.getHeight() / 2)));\n            canvas.drawBitmap(smallBladeBitmap, matrix, paint);\n            drawWind(canvas);\n            drawBarometer(canvas);\n            if (!animationEnable) {\n                curSize = lineSize;\n            }\n            drawLine(canvas);\n            drawPressure(canvas);\n            if (trendType == TrendType.DOWN && curSize < lineSize && animationBaroMeterEnable) {\n                curSize += 1.0f;\n                enable = true;\n            } else if (trendType == TrendType.UP && curSize > lineSize && animationBaroMeterEnable) {\n                curSize -= 1.0f;\n                enable = true;\n            } else {\n                animationBaroMeterEnable = false;\n            }\n            if ((animationEnable && windSpeed > 0.0f) || enable) {\n                invalidate();\n            }\n        }\n    }\n\n    private void drawLine(Canvas canvas) {\n        paint.setColor(lineColor);\n        paint.setStrokeWidth(lineStrokeWidth);\n        paint.setStyle(Paint.Style.STROKE);\n        paint.setPathEffect(pathEffect);\n        float width = (float) getWidth();\n        if (path == null) {\n            path = new Path();\n        } else {\n            path.reset();\n        }\n        path.moveTo(10.0f, curSize);\n        path.quadTo(width / 2.0f, curSize, width - 20.0f, curSize);\n        canvas.drawPath(path, paint);\n        paint.setStyle(Paint.Style.FILL);\n        paint.setPathEffect(null);\n        paint.setColor(textColor);\n    }\n\n    private void setupPressureLine(boolean z) {\n        int height = getHeight();\n        if (height > 0) {\n            if ((senterOfPressureLine + (getPaddingTop())) + (getPaddingBottom()) >= (height)) {\n                senterOfPressureLine = ((height - getPaddingTop()) - getPaddingBottom());\n                pressureLineSize = senterOfPressureLine / 10.0d;\n            }\n            pressurePaddingTop = (float) ((((height - getPaddingTop()) / 2)) - (senterOfPressureLine / 2.0d));\n            float f = (float) (((pressurePaddingTop) + (pressureLineSize * 5.0d)) + lineSpace);\n            if (z) {\n                lineSize = f;\n                curSize = lineSize;\n            } else if (trendType == TrendType.DOWN) {\n                lineSize = (float) (((pressurePaddingTop) + (pressureLineSize * 5.0d)) + lineSpace);\n                if (animationBaroMeterEnable) {\n                    curSize = (float) (((pressurePaddingTop) + (pressureLineSize * 7.0d)) + lineSpace);\n                } else {\n                    curSize = lineSize;\n                }\n                trendBitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.trend_falling);\n            } else if (trendType == TrendType.UP) {\n                lineSize = (float) (((pressurePaddingTop) + (pressureLineSize * 5.0d)) + lineSpace);\n                if (animationBaroMeterEnable) {\n                    curSize = (float) (((pressurePaddingTop) + (pressureLineSize * 7.0d)) + lineSpace);\n                } else {\n                    curSize = lineSize;\n                }\n                trendBitmap = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.trend_rising);\n            } else {\n                lineSize = f;\n                curSize = lineSize;\n                if (trendBitmap != null) {\n                    trendBitmap.recycle();\n                    trendBitmap = null;\n                }\n            }\n        }\n    }\n\n    private void drawWind(Canvas canvas) {\n        paint.setTextSize(labelFontSize);\n        paint.setStyle(Paint.Style.FILL);\n        paint.setPathEffect(null);\n        float width = (((smallPoleX) + ((smallBladeBitmap.getWidth()) / 2.0f)) + windTextX);\n        canvas.drawText(windText, width, windTextY, paint);\n        if (windSpeed < 0.0f) {\n            paint.setTextSize(labelFontSize);\n            canvas.drawText(windName, width, (windTextY + labelFontSize), paint);\n        } else if (!stringValid(windSpeedText)) {\n            paint.setTextSize(numericFontSize);\n            canvas.drawText(windSpeedText, width, (windTextY + numericFontSize), paint);\n            if (!stringValid(windName)) {\n                paint.setTextSize(labelFontSize);\n                canvas.drawText(windName, width + (((windSpeedText.length() * numericFontSize)) / 2.0f), (windTextY + numericFontSize), paint);\n            }\n        }\n    }\n\n    private void drawPressure(Canvas canvas) {\n        float f = curSize + (pressureTextY);\n        int width = (getWidth() - 14) - scale;\n        paint.setTextSize(labelFontSize);\n        float measureText = (width - (paint.measureText(barometerText)));\n        f += labelFontSize;\n        canvas.drawText(barometerText, measureText, f, paint);\n        if (trendBitmap != null) {\n            canvas.drawBitmap(trendBitmap, (measureText - (trendBitmap.getWidth())) - 4.0f, f - ((labelFontSize / 2)), paint);\n        }\n        if (!TextUtils.isEmpty(pressureUnit)) {\n            paint.setTextSize((float) labelFontSize);\n            measureText = (float) (width - ((int) paint.measureText(pressureUnit)));\n            f += (float) numericFontSize;\n            canvas.drawText(pressureUnit, measureText, f, paint);\n        }\n        if (!TextUtils.isEmpty(pressureText)) {\n            paint.setTextSize((float) numericFontSize);\n            canvas.drawText(pressureText, measureText - ((((paint.measureText(pressureText)) + 4)) + ((paint.measureText(\" \")))), f, paint);\n        }\n    }\n\n    private void startTimes() {\n        long nanoTime = System.nanoTime();\n        float f = ((float) (nanoTime - startTime)) / 1000000.0f;\n        startTime = nanoTime;\n        rotation = ((float) ((Math.sqrt((double) windSpeed) * (f)) / 20.0d)) + rotation;\n        rotation %= 360.0f;\n    }\n\n    private void drawBarometer(Canvas canvas) {\n        paint.setStrokeWidth(barometerStrokeWidth);\n        paint.setColor(barometerColor);\n        paint.setStyle(Paint.Style.FILL);\n        int width = getWidth();\n        float f = pressurePaddingTop;\n        for (int i = 0; i < 10; i++) {\n            canvas.drawLine((float) ((width) - toPixel(5d)), f, width, f, paint);\n            f = (float) ((f) + (lineSpace + (barometerTickSpacing)));\n        }\n        paint.setColor(textColor);\n    }\n\n    public void animateBaroMeter() {\n        if (!animationBaroMeterEnable) {\n            animationBaroMeterEnable = true;\n            setupPressureLine(false);\n            invalidate();\n        }\n    }\n\n    private int getScaleInPixel(int i) {\n        return (int) ((getContext().getResources().getDisplayMetrics().density * (i)) + 0.5f);\n    }\n\n    private int dpToPx(int dp) {\n        Resources r = getResources();\n        return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics());\n    }\n\n    private double toPixel(double d) {\n        return (getContext().getResources().getDisplayMetrics().density) * d;\n    }\n\n    private String formatFloat(float f) {\n        try {\n            return NumberFormat.getInstance().format(f);\n        } catch (Exception e) {\n            return empty;\n        }\n    }\n\n    private float getscale(float f, int i) {\n        return new BigDecimal(Float.toString(f)).setScale(i, 4).floatValue();\n    }\n\n    private boolean stringValid(String str) {\n        return str == null || str.trim().length() == 0 || str.trim().equalsIgnoreCase(\"null\");\n    }\n\n    public TrendType getTrendType() {\n        return trendType;\n    }\n\n    public void setTrendType(TrendType trendType) {\n        this.trendType = trendType;\n        setupPressureLine(false);\n\n    }\n\n    public Typeface getTypeface() {\n        if (typeface == null)\n            return Typeface.DEFAULT;\n        return typeface;\n    }\n\n    public void setTypeface(Typeface typeface) {\n        this.typeface = typeface;\n    }\n\n    public int getTextColor() {\n        return textColor;\n    }\n\n    public void setTextColor(int textColor) {\n        this.textColor = textColor;\n    }\n\n    public int getLineColor() {\n        return lineColor;\n    }\n\n    public void setLineColor(int lineColor) {\n        this.lineColor = lineColor;\n    }\n\n    public float getLineStrokeWidth() {\n        return lineStrokeWidth;\n    }\n\n    public void setLineStrokeWidth(float lineStrokeWidth) {\n        this.lineStrokeWidth = lineStrokeWidth;\n    }\n\n    public int getBarometerColor() {\n        return barometerColor;\n    }\n\n    public void setBarometerColor(int barometerColor) {\n        this.barometerColor = barometerColor;\n    }\n\n    public float getBarometerStrokeWidth() {\n        return barometerStrokeWidth;\n    }\n\n    public void setBarometerStrokeWidth(float barometerStrokeWidth) {\n        this.barometerStrokeWidth = barometerStrokeWidth;\n    }\n\n    public String getWindDirectionText() {\n        return WindDirectionText;\n    }\n\n    public void setWindDirectionText(String windDirectionText) {\n        WindDirectionText = windDirectionText;\n    }\n\n    public int getBigPoleX() {\n        return bigPoleX;\n    }\n\n    public void setBigPoleX(int bigPoleX) {\n        this.bigPoleX = bigPoleX;\n    }\n\n    public int getSmallPoleX() {\n        return smallPoleX;\n    }\n\n    public void setSmallPoleX(int smallPoleX) {\n        this.smallPoleX = smallPoleX;\n    }\n\n    public String getWindText() {\n        return windText;\n    }\n\n    public void setWindText(String windText) {\n        this.windText = windText;\n    }\n\n    public String getWindName() {\n        return windName;\n    }\n\n    public void setWindName(String windName) {\n        this.windName = windName;\n    }\n\n    public String getWindSpeedText() {\n        return windSpeedText;\n    }\n\n    public void setWindSpeedText(String windSpeedText) {\n        this.windSpeedText = windSpeedText;\n    }\n\n    public String getBarometerText() {\n        return barometerText;\n    }\n\n    public void setBarometerText(String barometerText) {\n        this.barometerText = barometerText;\n    }\n\n    public int getPoleBottomY() {\n        return poleBottomY;\n    }\n\n    public void setPoleBottomY(int poleBottomY) {\n        this.poleBottomY = poleBottomY;\n    }\n\n    public int getWindTextX() {\n        return windTextX;\n    }\n\n    public void setWindTextX(int windTextX) {\n        this.windTextX = windTextX;\n    }\n\n    public int getWindTextY() {\n        return windTextY;\n    }\n\n    public void setWindTextY(int windTextY) {\n        this.windTextY = windTextY;\n    }\n\n    public String getWindSpeedUnit() {\n        return windSpeedUnit;\n    }\n\n    public void setWindSpeedUnit(String str) {\n        windSpeedUnit = str;\n        initSpeedUnit();\n    }\n\n    public Rect getRect() {\n        return rect;\n    }\n\n    public void setRect(Rect rect) {\n        this.rect = rect;\n    }\n\n    public int getLabelFontSize() {\n        return labelFontSize;\n    }\n\n    public void setLabelFontSize(int labelFontSize) {\n        this.labelFontSize = labelFontSize;\n    }\n\n    public int getNumericFontSize() {\n        return numericFontSize;\n    }\n\n    public void setNumericFontSize(int numericFontSize) {\n        this.numericFontSize = numericFontSize;\n    }\n\n    public String getPressureUnit() {\n        return pressureUnit;\n    }\n\n    public void setPressureUnit(String str) {\n        pressureUnit = str;\n    }\n\n    public int getPressureTextY() {\n        return pressureTextY;\n    }\n\n    public void setPressureTextY(int pressureTextY) {\n        this.pressureTextY = pressureTextY;\n    }\n\n    public float getPressure() {\n        return pressure;\n    }\n\n    public void setPressure(float f) {\n        pressure = getscale(f, 2);\n        if (pressure < 0.0f) {\n            pressureText = empty;\n        } else {\n            pressureText = formatFloat(pressure);\n        }\n    }\n\n    public float getLineSize() {\n        return lineSize;\n    }\n\n    public void setLineSize(float lineSize) {\n        this.lineSize = lineSize;\n    }\n\n    public double getLineSpace() {\n        return lineSpace;\n    }\n\n    public void setLineSpace(double lineSpace) {\n        this.lineSpace = lineSpace;\n    }\n}\n"
  },
  {
    "path": "windview/src/main/java/com/github/ahmadnemati/wind/enums/TrendType.java",
    "content": "package com.github.ahmadnemati.wind.enums;\n\n/**\n * Created by Ahmad Nemati on 12/21/2016.\n */\n\npublic enum TrendType {\n    UP, DOWN, NONE\n}\n"
  },
  {
    "path": "windview/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"WindView\">\n        <attr name=\"windSpeed\" format=\"float\" />\n        <attr name=\"pressure\" format=\"float\" />\n        <attr name=\"numericFontSize\" format=\"dimension\" />\n        <attr name=\"barometerTickSpacing\" format=\"dimension\" />\n        <attr name=\"labelFontSize\" format=\"dimension\" />\n        <attr name=\"windTextX\" format=\"dimension\" />\n        <attr name=\"windTextY\" format=\"dimension\" />\n        <attr name=\"pressureTextX\" format=\"dimension\" />\n        <attr name=\"pressureTextY\" format=\"dimension\" />\n        <attr name=\"pressureLineY\" format=\"dimension\" />\n        <attr name=\"bigPoleX\" format=\"dimension\" />\n        <attr name=\"smallPoleX\" format=\"dimension\" />\n        <attr name=\"poleBottomY\" format=\"dimension\" />\n        <attr name=\"aspectRatio\" format=\"float\" />\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "windview/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"text_color\">#ffffff</color>\n</resources>"
  },
  {
    "path": "windview/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">WindView</string>\n</resources>\n"
  },
  {
    "path": "windview/src/test/java/com/github/ahmadnemati/wind/ExampleUnitTest.java",
    "content": "package com.github.ahmadnemati.wind;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  }
]