[
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n.DS_Store\n/build\n/captures\n/.idea"
  },
  {
    "path": "LICENSE.txt",
    "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 {2016} {Basil Miller}\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\nMIT License (MIT)\n\n    Copyright (c) 2016 Basil Miller\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE."
  },
  {
    "path": "README.md",
    "content": "<br/>\n<p align=\"center\">\n  <a href=\"http://devlight.io\">\n      <img src =\"https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScLVBKck51Z1Rzb0E\" alt=\"Devlight\"/>\n  </a>\n</p>\n<br/>\n\nPulseView\n=========\n\nWidget that generates pulsation relative to your icons.\n\n[![Android Arsenal](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScTm9HT0JzcmpHOVE)](http://android-arsenal.com/details/1/3537)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n[![Android](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wSccEZaclNGN0R5OWc)](https://github.com/DevLight-Mobile-Agency)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n[![Download](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScaDl2U0QtWUx3emM)](https://bintray.com/gigamole/maven/pulseview/_latestVersion)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n[![License](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScU0tmeFpGMHVWNWs)](https://github.com/DevLight-Mobile-Agency/PulseView/blob/master/LICENSE.txt)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n[![Codacy](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScSHhmckZyeGJDcXc)](https://www.codacy.com/app/gigamole53/PulseView?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=DevLight-Mobile-Agency/PulseView&amp;utm_campaign=Badge_Grade)\n\n<br/>\n\n<p align=\"center\">\n    <img src=\"https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScN1lmb19QZklFTEk\"/>\n</p>\n\nYou can check the sample app [here](https://github.com/DevLight-Mobile-Agency/PulseView/tree/master/app).\n\nWarn\n====\n```\nThis library is not more supported. \nIf you want to add new feature or fix a bug, grab source code and do it. \nIf you think your fix or feature would be useful to other developers, \nI can add link of your repository to this README file. \nThank you for using our libraries.\n```\n\nDownload\n========\n\nYou can download an `.aar` from GitHub's [releases page](https://github.com/DevLight-Mobile-Agency/PulseView/releases).\n\nOr alternatively use Gradle jCenter:\n\n```groovy\ndependencies {\n    repositories {\n        mavenCentral()\n        maven {\n            url  'http://dl.bintray.com/gigamole/maven/'\n        }\n    }\n    compile 'com.github.devlight.pulseview:library:+'\n}\n```\n\nGradle Maven Central:\n\n```groovy\ncompile 'com.github.devlight.pulseview:library:1.0.2'\n```\n\nMaven:\n\n```groovy\n<dependency>\n    <groupId>com.github.devlight.pulseview</groupId>\n    <artifactId>library</artifactId>\n    <version>1.0.2</version>\n    <type>aar</type>\n</dependency>\n```\n\nAndroid SDK Version\n=========\n\n`PulseView` requires a minimum SDK version of 11. \n\nSample\n======\n\n<b>Parameters</b>\n        \nFor `PulseView` you can set such parameters as:\n \n - icon:  \n    at first you need to set icon for `PulseView`.\n    \n - icon width and height:  \n    allows you to set size of the icon.\n        \n - pulse side measure:  \n    allows you to set pulse side measure. Width or height of `PulseView`.\n    \n - pulse count:  \n    allows you to set pulse count.\n    \n - pulse spawn period:  \n    allows you to set pulse spawn period.\n     \n - pulse alpha:  \n    allows you to set alpha to pulse.\n    \n - pulse color:  \n    allows you to set pulse color.\n\n - interpolator:  \n    allows you to set an interpolator for the pulse.\n\n - listener:  \n    allows you to set pulse listener. `onStartPulse()` and `onFinishPulse()` listeners.\n\n<b>Tips</b>\n\nThe icon to pulse can be a normal bitmap or a `SVG` file.  \nIn preview mode `PulseView` renders incorrectly because the `Canvas` can`t scale in this mode.\n\n<b>Init</b>\n\nCheck out in code init:\n\n```java\nfinal PulseView pulseView = (PulseView) findViewById(R.id.pv);\npulseView.setPulseColor(Color.BLACK);\npulseView.setPulseCount(5);\npulseView.setPulseMeasure(PulseView.PulseMeasure.WIDTH);\npulseView.setIconHeight(200);\npulseView.setIconWidth(200);\npulseView.setIconRes(R.drawable.icon);\npulseView.setPulseAlpha(70);\npulseView.setInterpolator(new LinearInterpolator());\npulseView.setPulseListener(new PulseView.PulseListener(...));\n```\n\nTo start or finish pulse you need to call methods:\n\n```java\npulseView.startPulse();\npulseView.finishPulse();\n```\n            \nOther methods can be seen within the sample application.\n\nAnd `XML` init:\n\n```xml\n<com.gigamole.library.PulseView\n    android:id=\"@+id/pv\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    app:pv_icon=\"@drawable/icon\"\n    app:pv_alpha=\"70\"\n    app:pv_color=\"#eae761\"\n    app:pv_count=\"8\"\n    app:pv_measure=\"height\"\n    app:pv_icon_width=\"168dp\"\n    app:pv_icon_height=\"194dp\"\n    app:pv_spawn_period=\"700\"\n    app:pv_interpolator=\"@android:anim/linear_interpolator\"/>\n```\n\nGetting Help\n============\n\nTo report a specific problem or feature request, [open a new issue on Github](https://github.com/DevLight-Mobile-Agency/PulseView/issues/new).\n\nCredits\n=======\n\n|[Greg Wilkinson](https://dribbble.com/gregrwilkinson)|[Thomas Budiman](https://dribbble.com/thebuddyman)|\n|:---------------------------------------------------:|:------------------------------------------------:|\n|[![](https://d13yacurqjgara.cloudfront.net/users/7851/screenshots/2259256/cel-fianimation-2.gif)](https://dribbble.com/shots/2259256-Cel-Fi-Search-Animation)|[![](https://d13yacurqjgara.cloudfront.net/users/153277/screenshots/2242921/open-uri20150914-3-1sa3649)](https://dribbble.com/shots/2242921-Find-Nearby-Users-Concept)|\n\nAuthor\n======\n\nCreated by [Basil Miller](https://github.com/GIGAMOLE) - [@gigamole](mailto:http://gigamole53@gmail.com)\n\nCompany\n=======\n\n[![Facebook](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScaGhGVFNKU0VxMnc)](https://www.facebook.com/devlightagency)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![Twitter](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wScZ1ExQWh5cHF5cVE)](https://twitter.com/DevLightIO)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![LinkedIn](https://drive.google.com/uc?export=download&id=0BxPO_UeS7wSccGZINzEycE1nVFE)](https://www.linkedin.com/company/devlight)\n\n[Here](https://github.com/DevLight-Mobile-Agency) you can see open source work developed by Devlight LLC.  \nThis and another works is an exclusive property of Devlight LLC. \n\nIf you want to use this library in applications which will be available on Google Play, please report us or author of the library about it.\n\nWhether you're searching for a new partner or trusted team for creating your new great product we are always ready to start work with you. \n\nYou can contact us: info@devlight.io or opensource@devlight.io.  \nThanks in advance.\n\nDevlight LLC, 2016  \n[devlight.io](http://devlight.io) \n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.3\"\n\n    defaultConfig {\n        applicationId \"com.gigamole.pulseview\"\n        minSdkVersion 11\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    compile project(':library')\n    compile 'com.android.support:appcompat-v7:23.3.0'\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 D:\\Programs\\Programming\\AndroidStudio\\AS_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/gigamole/pulseview/ApplicationTest.java",
    "content": "package com.gigamole.pulseview;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest package=\"com.gigamole.pulseview\"\n          xmlns:android=\"http://schemas.android.com/apk/res/android\">\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\">\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/gigamole/pulseview/MainActivity.java",
    "content": "package com.gigamole.pulseview;\n\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.widget.Toast;\n\nimport com.gigamole.library.PulseView;\n\npublic class MainActivity extends Activity implements\n        View.OnClickListener,\n        PulseView.PulseListener {\n\n    private PulseView mPulseView;\n\n    private int mCounter;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        initUI();\n    }\n\n    private void initUI() {\n        mPulseView = (PulseView) findViewById(R.id.pv);\n        mPulseView.setPulseListener(this);\n        mPulseView.setOnClickListener(this);\n\n//        mPulseView.setPulseColor(Color.BLACK);\n//        mPulseView.setPulseCount(5);\n//        mPulseView.setPulseMeasure(PulseView.PulseMeasure.WIDTH);\n//        mPulseView.setIconHeight(200);\n//        mPulseView.setIconWidth(200);\n//        mPulseView.setIconRes(R.drawable.icon);\n//        mPulseView.setPulseAlpha(70);\n//        mPulseView.setInterpolator(new LinearInterpolator());\n    }\n\n    @Override\n    public void onClick(final View v) {\n        if (mCounter++ % 2 == 0) mPulseView.startPulse();\n        else mPulseView.finishPulse();\n    }\n\n    @Override\n    public void onStartPulse() {\n//        Toast.makeText(MainActivity.this, \"Start pulse\", Toast.LENGTH_SHORT).show();\n    }\n\n    @Override\n    public void onFinishPulse() {\n//        Toast.makeText(MainActivity.this, \"Finish pulse\", Toast.LENGTH_SHORT).show();\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <com.gigamole.library.PulseView\n        android:id=\"@+id/pv\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:pv_icon=\"@drawable/ic_logo\"\n        app:pv_alpha=\"70\"\n        app:pv_color=\"#000\"\n        app:pv_count=\"8\"\n        app:pv_measure=\"width\"\n        app:pv_spawn_period=\"700\"\n        app:pv_interpolator=\"@android:anim/decelerate_interpolator\"/>\n\n</FrameLayout>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">PulseView</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\"/>\n\n</resources>\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        jcenter()\n    }\n    dependencies {\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'\n        classpath \"com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1\"\n        classpath 'com.android.tools.build:gradle:2.1.3'\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Sep 15 13:36:01 EEST 2016\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.14.1-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.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\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"
  },
  {
    "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": "library/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "library/build.gradle",
    "content": "/*\n * Copyright (C) 2015 Basil Miller\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\napply plugin: 'com.android.library'\napply plugin: \"com.jfrog.bintray\"\napply plugin: 'com.github.dcendents.android-maven'\napply plugin: 'maven'\n\nversion = \"1.0.2\"\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.3\"\n\n    defaultConfig {\n        minSdkVersion 11\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0.2\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    compile 'com.android.support:appcompat-v7:23.3.0'\n    compile 'org.jsoup:jsoup:+'\n}\n\ndef siteUrl = 'https://github.com/DevLight-Mobile-Agency/PulseView'\ndef gitUrl = 'https://github.com/DevLight-Mobile-Agency/PulseView.git'\ngroup = \"com.github.devlight.pulseview\"\n\ninstall {\n    repositories.mavenInstaller {\n        // This generates POM.xml with proper parameters\n        pom {\n            project {\n                packaging 'aar'\n\n                // Add your description here\n                name 'PulseView'\n                description = 'Widget that generates pulsation relative to your icons.'\n                url siteUrl\n\n                // Set your license\n                licenses {\n                    license {\n                        name 'The Apache Software License, Version 2.0'\n                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'\n                    }\n                }\n                developers {\n                    developer {\n                        id 'gigamole'\n                        name 'Basil Miller'\n                        email 'gigamole53@gmail.com'\n                    }\n                }\n                scm {\n                    connection gitUrl\n                    developerConnection gitUrl\n                    url siteUrl\n                }\n            }\n        }\n    }\n}\n\ntask sourcesJar(type: Jar) {\n    from android.sourceSets.main.java.srcDirs\n    classifier = 'sources'\n}\n\ntask javadoc(type: Javadoc) {\n    source = android.sourceSets.main.java.srcDirs\n    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))\n}\n\ntask javadocJar(type: Jar, dependsOn: javadoc) {\n    classifier = 'javadoc'\n    from javadoc.destinationDir\n}\nartifacts {\n    archives javadocJar\n    archives sourcesJar\n}\n\nProperties properties = new Properties()\nproperties.load(project.rootProject.file('local.properties').newDataInputStream())\n\nbintray {\n    user = properties.getProperty(\"bintray.user\")\n    key = properties.getProperty(\"bintray.apikey\")\n\n    configurations = ['archives']\n    pkg {\n        repo = \"maven\"\n        // it is the name that appears in bintray when logged\n        name = \"pulseview\"\n        websiteUrl = siteUrl\n        vcsUrl = gitUrl\n        licenses = [\"Apache-2.0\"]\n        publish = true\n        version {\n            gpg {\n                sign = true //Determines whether to GPG sign the files. The default is false\n                passphrase = properties.getProperty(\"bintray.gpg.password\") //Optional. The passphrase for GPG signing'\n            }\n//            mavenCentralSync {\n//                sync = true //Optional (true by default). Determines whether to sync the version to Maven Central.\n//                user = properties.getProperty(\"bintray.oss.user\") //OSS user token\n//                password = properties.getProperty(\"bintray.oss.password\") //OSS user password\n//                close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.\n//            }\n        }\n    }\n}"
  },
  {
    "path": "library/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 D:\\Programs\\Programming\\AndroidStudio\\AS_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": "library/src/androidTest/java/com/gigamole/library/ApplicationTest.java",
    "content": "package com.gigamole.library;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "library/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"com.gigamole.library\"\n          xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        >\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "library/src/main/java/com/gigamole/library/PulseView.java",
    "content": "package com.gigamole.library;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.content.res.Resources;\nimport android.content.res.TypedArray;\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.PorterDuff;\nimport android.graphics.PorterDuffColorFilter;\nimport android.graphics.RectF;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.graphics.drawable.Drawable;\nimport android.os.Parcel;\nimport android.os.Parcelable;\nimport android.support.annotation.FloatRange;\nimport android.support.annotation.NonNull;\nimport android.support.v4.content.ContextCompat;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.animation.AnimationUtils;\nimport android.view.animation.Interpolator;\nimport android.view.animation.LinearInterpolator;\n\nimport java.io.Serializable;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * Created by GIGAMOLE on 29.04.2016.\n */\n@SuppressWarnings(\"unused\")\npublic class PulseView extends View {\n\n    // Default pulse variables\n    private final static int DEFAULT_PULSE_COUNT = 5;\n    private final static int DEFAULT_PULSE_SPAWN_PERIOD = 700;\n    private final static int DEFAULT_PULSE_ALPHA = 70;\n    private final static int DEFAULT_PULSE_COLOR = Color.DKGRAY;\n    private final static int DEFAULT_PULSE_MEASURE = PulseMeasure.WIDTH_INDEX;\n\n    // Bounds values\n    private final static float MIN_SCALE = 1.0F;\n    private final static float MAX_FRACTION = 1.0F;\n\n    // Alpha range\n    private final static float MIN_ALPHA = 0.0F;\n    private final static float MAX_ALPHA = 255.0F;\n\n    // PulseView bounds\n    private final RectF mBounds = new RectF();\n\n    // Icon bitmap and resId\n    private Bitmap mIconBitmap;\n    private int mIconRes;\n\n    // Pulse models\n    private final List<PulseModel> mPulseModels = new ArrayList<>();\n    // Pulse measure side. This provide ability to measure pulse size relative to width or height\n    private PulseMeasure mPulseMeasure;\n\n    // Pulse variables\n    private int mPulseCount;\n    private long mPulseSpawnPeriod;\n    private float mPulseAlpha;\n    private int mPulseColor;\n\n    // Icon size variables\n    private int mIconWidth;\n    private int mIconHeight;\n\n    // Pulse total duration\n    private float mPulseDuration;\n    // Pulse destination scale relative to 1.0F fraction time\n    private float mPulseDestScale;\n\n    // Current time in millis\n    private long mCurrentTime;\n    // Last spawn time in millis\n    private long mLastTime;\n\n    // Detect whether pulse is started\n    private boolean mIsPulseStarted;\n    // Detect whether pulse is need to finish\n    private boolean mIsFinishPulse;\n\n    // Pulse listener\n    private PulseListener mPulseListener;\n    // Interpolator for pulse. Choose your favourite\n    private Interpolator mInterpolator;\n    // Pulse paint\n    private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG) {\n        {\n            setDither(true);\n            setFilterBitmap(true);\n            setStyle(Style.FILL);\n        }\n    };\n\n    public PulseView(final Context context) {\n        this(context, null);\n    }\n\n    public PulseView(final Context context, final AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public PulseView(final Context context, final AttributeSet attrs, final int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n\n        // Always draw and improve speed\n        setWillNotDraw(false);\n        setLayerType(LAYER_TYPE_HARDWARE, null);\n\n        // Get attrs\n        final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PulseView);\n        try {\n            setIconRes(typedArray.getResourceId(R.styleable.PulseView_pv_icon, 0));\n            setIconWidth((int) typedArray.getDimension(R.styleable.PulseView_pv_icon_width, 0));\n            setIconHeight((int) typedArray.getDimension(R.styleable.PulseView_pv_icon_height, 0));\n\n            setPulseCount(\n                    typedArray.getInteger(R.styleable.PulseView_pv_count, DEFAULT_PULSE_COUNT)\n            );\n            setPulseSpawnPeriod(\n                    typedArray.getInteger(\n                            R.styleable.PulseView_pv_spawn_period, DEFAULT_PULSE_SPAWN_PERIOD\n                    )\n            );\n            setPulseAlpha(typedArray.getInteger(R.styleable.PulseView_pv_alpha, DEFAULT_PULSE_ALPHA));\n            setPulseColor(typedArray.getColor(R.styleable.PulseView_pv_color, DEFAULT_PULSE_COLOR));\n            setPulseMeasure(\n                    typedArray.getInt(R.styleable.PulseView_pv_measure, DEFAULT_PULSE_MEASURE)\n            );\n\n            // Retrieve interpolator\n            Interpolator interpolator = null;\n            try {\n                final int interpolatorId = typedArray.getResourceId(\n                        R.styleable.PulseView_pv_interpolator, 0\n                );\n                interpolator = interpolatorId == 0 ? null :\n                        AnimationUtils.loadInterpolator(context, interpolatorId);\n            } catch (Resources.NotFoundException exception) {\n                interpolator = null;\n                exception.printStackTrace();\n            } finally {\n                setInterpolator(interpolator);\n            }\n        } finally {\n            typedArray.recycle();\n        }\n    }\n\n    public int getIconRes() {\n        return mIconRes;\n    }\n\n    public Bitmap getIconBitmap() {\n        return mIconBitmap;\n    }\n\n    // Set icon resId and get bitmap\n    public void setIconRes(final int iconRes) {\n        mIconRes = iconRes;\n        invalidateIcon();\n    }\n\n    public PulseMeasure getPulseMeasure() {\n        return mPulseMeasure;\n    }\n\n    private void setPulseMeasure(final int index) {\n        switch (index) {\n            case PulseMeasure.HEIGHT_INDEX:\n                setPulseMeasure(PulseMeasure.HEIGHT);\n                break;\n            case PulseMeasure.WIDTH_INDEX:\n            default:\n                setPulseMeasure(PulseMeasure.WIDTH);\n                break;\n        }\n    }\n\n    public void setPulseMeasure(final PulseMeasure pulseMeasure) {\n        mPulseMeasure = pulseMeasure;\n        requestLayout();\n    }\n\n    public int getPulseCount() {\n        return mPulseCount;\n    }\n\n    public void setPulseCount(final int pulseCount) {\n        mPulseCount = pulseCount;\n        invalidatePulse();\n    }\n\n    public long getPulseSpawnPeriod() {\n        return mPulseSpawnPeriod;\n    }\n\n    public void setPulseSpawnPeriod(final long pulseSpawnPeriod) {\n        mPulseSpawnPeriod = pulseSpawnPeriod;\n        invalidatePulse();\n    }\n\n    public float getPulseAlpha() {\n        return mPulseAlpha;\n    }\n\n    @FloatRange\n    public void setPulseAlpha(@FloatRange(from = MIN_ALPHA, to = MAX_ALPHA) final float pulseAlpha) {\n        mPulseAlpha = Math.max(MIN_ALPHA, Math.min(pulseAlpha, MAX_ALPHA));\n        postInvalidate();\n    }\n\n    public int getPulseColor() {\n        return mPulseColor;\n    }\n\n    public void setPulseColor(final int pulseColor) {\n        mPulseColor = pulseColor;\n\n        // Set color and color filter to fill our icon\n        mPaint.setColor(pulseColor);\n        mPaint.setColorFilter(\n                new PorterDuffColorFilter(pulseColor, PorterDuff.Mode.SRC_IN)\n        );\n        postInvalidate();\n    }\n\n    public int getIconWidth() {\n        return mIconWidth;\n    }\n\n    public void setIconWidth(final int iconWidth) {\n        mIconWidth = iconWidth;\n        invalidateIcon();\n    }\n\n    public int getIconHeight() {\n        return mIconHeight;\n    }\n\n    public void setIconHeight(final int iconHeight) {\n        mIconHeight = iconHeight;\n        invalidateIcon();\n    }\n\n    public Interpolator getInterpolator() {\n        return mInterpolator;\n    }\n\n    public void setInterpolator(final Interpolator interpolator) {\n        mInterpolator = interpolator == null ? new LinearInterpolator() : interpolator;\n    }\n\n    public PulseListener getPulseListener() {\n        return mPulseListener;\n    }\n\n    public void setPulseListener(final PulseListener pulseListener) {\n        mPulseListener = pulseListener;\n    }\n\n    // Start pulse\n    public void startPulse() {\n        mIsPulseStarted = true;\n        mIsFinishPulse = false;\n\n        if (mPulseListener != null) mPulseListener.onStartPulse();\n\n        postInvalidate();\n    }\n\n    // Finish pulse\n    public void finishPulse() {\n        mIsFinishPulse = true;\n        postInvalidate();\n    }\n\n    // Invalidate icon and get bitmap by icon resId\n    private void invalidateIcon() {\n        // You must to set icon resId\n        if (mIconRes == 0) throw new IllegalArgumentException(\n                \"Icon not found. Please select the icon and set to PulseView\"\n        );\n\n        final Drawable iconDrawable = ContextCompat.getDrawable(getContext(), mIconRes);\n        if (iconDrawable != null) {\n            // Get width and height of bitmap. If there are is some 0, get original size\n            final int width = mIconWidth == 0 ? iconDrawable.getIntrinsicWidth() : mIconWidth;\n            final int height = mIconHeight == 0 ? iconDrawable.getIntrinsicHeight() : mIconHeight;\n\n            if (iconDrawable instanceof BitmapDrawable) {\n                // Create scaled bitmap relative to size from normal image\n                mIconBitmap = Bitmap.createScaledBitmap(\n                        ((BitmapDrawable) iconDrawable).getBitmap(), width, height, true\n                );\n            } else {\n                // Create icon bitmap for other type of resources, especially SVG\n                mIconBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n                final Canvas canvas = new Canvas(mIconBitmap);\n                iconDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());\n                iconDrawable.draw(canvas);\n            }\n        } else // There is somethings wrong with your icon\n            mIconBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.RGB_565);\n    }\n\n    // Invalidate pulse. Need to recalculate dest scale relative to pulse measure and\n    // detect general pulse duration\n    private void invalidatePulse() {\n        mPulseDestScale = mPulseMeasure == PulseMeasure.HEIGHT ?\n                (mBounds.height() - (float) mIconBitmap.getHeight()) / (float) mIconBitmap.getHeight() :\n                (mBounds.width() - (float) mIconBitmap.getWidth()) / (float) mIconBitmap.getWidth();\n\n        mPulseDuration = mPulseCount * mPulseSpawnPeriod;\n        postInvalidate();\n    }\n\n    // Restore pulse state according to current time when config changes or view goes out and restore\n    private void restorePulseState() {\n        mCurrentTime = System.currentTimeMillis();\n        mLastTime = mCurrentTime - mPulseSpawnPeriod;\n\n        for (int i = 0; i < mPulseModels.size(); i++)\n            mPulseModels.get(i).setStartTime(mCurrentTime - mPulseSpawnPeriod * i);\n        postInvalidate();\n    }\n\n    @SuppressLint(\"DrawAllocation\")\n    @Override\n    protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {\n        super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\n        final int width = MeasureSpec.getSize(widthMeasureSpec);\n        final int height = MeasureSpec.getSize(heightMeasureSpec);\n\n        // Reset bounds and pulse\n        mBounds.set(0.0F, 0.0F, width, height);\n        invalidatePulse();\n\n        // Provide pulse preview\n        if (isInEditMode()) {\n            for (int i = 0; i < mPulseCount; i++) mPulseModels.add(new PulseModel(0));\n            restorePulseState();\n        }\n    }\n\n    @SuppressLint(\"DrawAllocation\")\n    @Override\n    protected void onDraw(final Canvas canvas) {\n        super.onDraw(canvas);\n\n        // Get center variables of icon\n        final float bitmapLeft = mBounds.centerX() - (mIconBitmap.getWidth() * 0.5F);\n        final float bitmapTop = mBounds.centerY() - (mIconBitmap.getHeight() * 0.5F);\n\n        // Detect if pulse is started for pulse drawing\n        if (mIsPulseStarted) {\n            // Get current time\n            if (hasWindowFocus()) mCurrentTime = System.currentTimeMillis();\n\n            // If view not going to finish, so add new pulse after spawn period\n            if (!mIsFinishPulse && mCurrentTime > (mLastTime + mPulseSpawnPeriod)) {\n                mLastTime = mCurrentTime;\n                // Limit pulse models size to pulse count\n                if (mPulseModels.size() < mPulseCount)\n                    // We need to set start time of pulse model. Its our start value where we\n                    // can calculate fraction of pulse according to pulse duration\n                    mPulseModels.add(0, new PulseModel(mCurrentTime));\n            }\n\n            // Draw pulse models\n            for (int i = 0; i < mPulseModels.size(); i++) {\n                // Get pulse model\n                final PulseModel pulseModel = mPulseModels.get(i);\n                // Set pulse fraction in range [0.0F, 1.0F]\n                pulseModel.setFraction(\n                        (float) (mCurrentTime - pulseModel.getStartTime()) / mPulseDuration\n                );\n\n                // Save canvas for scaling\n                canvas.save();\n                // Get pulse scale where min is 1.0F and max is mPulseDestScale\n                // Interpolator used for some special effects\n                final float pulseScale = MIN_SCALE +\n                        (mInterpolator.getInterpolation(pulseModel.getFraction()) * mPulseDestScale);\n                // Scale canvas. Its provide more speed unlike scale icon matrix\n                canvas.scale(pulseScale, pulseScale, mBounds.centerX(), mBounds.centerY());\n\n                // Set pulse alpha. We need alpha for better effect, cause we have pulse models\n                // like stack so alpha would also stack\n                mPaint.setAlpha((int) (mPulseAlpha - (pulseModel.getFraction() * mPulseAlpha)));\n\n                // Draw icon bitmap pulse and restore canvas to default scale\n                canvas.drawBitmap(mIconBitmap, bitmapLeft, bitmapTop, mPaint);\n                canvas.restore();\n            }\n\n            // Detect whether we have filled models and last pulse reached max fraction\n            if (!mPulseModels.isEmpty() && MAX_FRACTION ==\n                    (float) Math.floor(mPulseModels.get(mPulseModels.size() - 1).getFraction()))\n                // Remove finished pulse\n                mPulseModels.remove(mPulseModels.size() - 1);\n\n            // If pulses goes to finish and pulse models is empty - finish pulse\n            if (mIsFinishPulse && mPulseModels.isEmpty()) {\n                mIsFinishPulse = false;\n                mIsPulseStarted = false;\n\n                if (mPulseListener != null) mPulseListener.onFinishPulse();\n            }\n        }\n\n        // Draw icon bitmap\n        canvas.drawBitmap(mIconBitmap, bitmapLeft, bitmapTop, null);\n        // Invalidate draw for auto refresh\n        if (hasWindowFocus()) postInvalidate();\n    }\n\n    @Override\n    protected void onVisibilityChanged(@NonNull final View changedView, final int visibility) {\n        super.onVisibilityChanged(changedView, visibility);\n        restorePulseState();\n    }\n\n    @Override\n    public void onWindowFocusChanged(final boolean hasWindowFocus) {\n        super.onWindowFocusChanged(hasWindowFocus);\n        // Restore pulse after resume\n        if (hasWindowFocus) restorePulseState();\n    }\n\n    @Override\n    public void onRestoreInstanceState(Parcelable state) {\n        final SavedState savedState = (SavedState) state;\n        super.onRestoreInstanceState(savedState.getSuperState());\n\n        // Clear old models and add last restored\n        mPulseModels.clear();\n        mPulseModels.addAll(savedState.mPulseModels);\n        // Restore variables and pulse\n        mIsPulseStarted = savedState.mIsPulseStarted;\n        mIsFinishPulse = savedState.mIsFinishPulse;\n        restorePulseState();\n    }\n\n    @Override\n    public Parcelable onSaveInstanceState() {\n        final Parcelable superState = super.onSaveInstanceState();\n        final SavedState savedState = new SavedState(superState);\n\n        // Save current state of PulseView\n        savedState.mPulseModels = mPulseModels;\n        savedState.mIsPulseStarted = mIsPulseStarted;\n        savedState.mIsFinishPulse = mIsFinishPulse;\n        return savedState;\n    }\n\n    private static class SavedState extends BaseSavedState {\n\n        // SavedState variables\n        private List<PulseModel> mPulseModels;\n        private boolean mIsPulseStarted;\n        private boolean mIsFinishPulse;\n\n        public SavedState(Parcelable superState) {\n            super(superState);\n        }\n\n        @SuppressWarnings(\"unchecked\")\n        private SavedState(Parcel in) {\n            super(in);\n            mPulseModels = (List<PulseModel>) in.readSerializable();\n            mIsPulseStarted = in.readByte() != 0;\n            mIsFinishPulse = in.readByte() != 0;\n        }\n\n        @Override\n        public void writeToParcel(Parcel dest, int flags) {\n            super.writeToParcel(dest, flags);\n            dest.writeSerializable((Serializable) mPulseModels);\n            dest.writeByte((byte) (mIsPulseStarted ? 1 : 0));\n            dest.writeByte((byte) (mIsFinishPulse ? 1 : 0));\n        }\n\n        @SuppressWarnings(\"UnusedDeclaration\")\n        public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {\n            @Override\n            public SavedState createFromParcel(Parcel in) {\n                return new SavedState(in);\n            }\n\n            @Override\n            public SavedState[] newArray(int size) {\n                return new SavedState[size];\n            }\n        };\n    }\n\n    private static class PulseModel implements Serializable {\n\n        // Start time of pulse model\n        private long mStartTime;\n        // Current fraction of pulse model\n        private float mFraction;\n\n        public PulseModel(final long startTime) {\n            mStartTime = startTime;\n        }\n\n        public long getStartTime() {\n            return mStartTime;\n        }\n\n        public void setStartTime(final long startTime) {\n            mStartTime = startTime;\n        }\n\n        public float getFraction() {\n            return mFraction;\n        }\n\n        public void setFraction(final float fraction) {\n            mFraction = fraction;\n        }\n    }\n\n    // Pulse measure\n    public enum PulseMeasure {\n        WIDTH, HEIGHT;\n\n        private final static int WIDTH_INDEX = 0;\n        private final static int HEIGHT_INDEX = 1;\n    }\n\n    // Pulse listener. OnStart trigger when we start draw pulse. OnFinish trigger when all of\n    // pulse models reached their max fraction\n    public interface PulseListener {\n        void onStartPulse();\n\n        void onFinishPulse();\n    }\n}\n"
  },
  {
    "path": "library/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <declare-styleable name=\"PulseView\">\n        <attr name=\"pv_icon\" format=\"reference\"/>\n        <attr name=\"pv_icon_width\" format=\"dimension\"/>\n        <attr name=\"pv_icon_height\" format=\"dimension\"/>\n        <attr name=\"pv_count\" format=\"integer\"/>\n        <attr name=\"pv_spawn_period\" format=\"integer\"/>\n        <attr name=\"pv_alpha\" format=\"integer\"/>\n        <attr name=\"pv_color\" format=\"color\"/>\n        <attr name=\"pv_interpolator\" format=\"reference\"/>\n        <attr name=\"pv_measure\" format=\"enum\">\n            <enum name=\"width\" value=\"0\"/>\n            <enum name=\"height\" value=\"1\"/>\n        </attr>\n    </declare-styleable>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">PulseView</string>\n</resources>\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':library'\n"
  }
]