[
  {
    "path": ".github/FUNDING.yml",
    "content": "# Funding links\n\ngithub: pranavpandey\nopen_collective: pranavpandeydev\nko_fi: pranavpandey\nbuy_me_a_coffee: pranavpandey\npatreon: pranavpandey\ncustom: ['paypal.me/pranavpandeydev']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/issue_template.md",
    "content": "---\nname: Issue\nabout: Create a issue to help us improve\ntitle: \"Short description of the issue\"\n---\n\n**Description:** Full description of the issue.\n\n**Expected behavior:** Screenshots and/or description of the expected behavior.\n\n**Source code:** [OPTIONAL] The code snippet which is causing this issue.\n\n**Sample app and/or repro:** [OPTIONAL] A sample app or steps to reproduce the issue. You may attach a `zip` or `APK` file of the sample app or a link to the GitHub repository.\n\n**Android API version:** Android API version. `API 19`\n\n**Library version:** The Library version you are using. `1.0.0`\n\n**Device:** Device on which the bug was encountered. `Emulator or Brand Model`\n\n*Please make sure that you are using the [latest version](https://github.com/pranavpandey/dynamic-toasts/releases) of the library and we also accept [pull requests](https://github.com/pranavpandey/dynamic-toasts/pulls).*\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "### Thanks for starting a pull request!\n\n## Changes\n\n  -\n  -\n\n## Testing\n\nDescribe how you tested your changes.\n\n## Issues\n\n[OPTIONAL] Link to GitHub issues it solves. `Resolve #1234`\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Build\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    timeout-minutes: 60\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: Setup JDK 17\n        uses: actions/setup-java@v3\n        with:\n          distribution: 'zulu'\n          java-version: 17\n\n      - name: Setup Gradle\n        uses: gradle/gradle-build-action@v2\n\n      - name: Build with Gradle\n        run: |\n          chmod +x gradlew\n          ./gradlew build\n\n      - name: Generate Javadoc\n        if: github.ref_type == 'tag'\n        run: ./gradlew generateJavadoc\n"
  },
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\n\n# Gradle files\n.gradle/\nbuild/\nrelease/\n\n# IntelliJ project files\n**.iml\n.idea\n\n# Android Studio captures folder\ncaptures/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Misc\n.DS_Store"
  },
  {
    "path": ".travis.yml",
    "content": "language: android\njdk: oraclejdk17\n\nbefore_install:\n  - mkdir \"$ANDROID_HOME/licenses\" || true\n  - echo -e \"\\n24333f8a63b6825ea9c5514f83c2829b004d1fee\" > \"$ANDROID_HOME/licenses/android-sdk-license\"\n  - echo -e \"\\n84831b9409646a918e30573bab4c9c91346d8abd\" > \"$ANDROID_HOME/licenses/android-sdk-preview-license\"\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n    - build-tools-35.0.0\n    - android-35\n    - extra-android-support\n    - extra-android-m2repository\n    - extra-google-m2repository\nbefore_script:\n  - chmod +x gradlew\nscript:\n  - ./gradlew build\n\nafter_success:\n  - ./gradlew generateJavadoc\n\ndeploy:\n  provider: pages\n  token: $GITHUB_TOKEN\n  edge: true\n  keep_history: true\n  local_dir: dynamic-toasts/build/docs/javadoc/release\n  on:\n    branch: master\n    tags: true\n"
  },
  {
    "path": "CNAME",
    "content": "pranavpandey.org"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the overall\n  community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or advances of\n  any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email address,\n  without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\nsupport@pranavpandey.com.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][Mozilla CoC].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[Mozilla CoC]: https://github.com/mozilla/diversity\n[FAQ]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n"
  },
  {
    "path": "LICENSE",
    "content": "\n                                 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 2017-2024 Pranav Pandey\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": "<img src=\"./graphics/icon.png\" height=\"160\">\n\n# Dynamic Toasts\n\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://travis-ci.org/pranavpandey/dynamic-toasts.svg?branch=master)](https://travis-ci.org/pranavpandey/dynamic-toasts)\n[![Release](https://img.shields.io/maven-central/v/com.pranavpandey.android/dynamic-toasts)](https://search.maven.org/artifact/com.pranavpandey.android/dynamic-toasts)\n\n**A simple library to display themed toasts with icon and text on Android 2.3 (API 9) and above.**\n\n> [!IMPORTANT]\n> Since v0.4.0, it uses [26.x.x support libraries][android-support] so, minimum SDK will be \nAndroid 4.0 (API 14).\n<br/>Since v2.0.0, it uses [AndroidX][androidx] so, first [migrate][androidx-migrate] your \nproject to AndroidX.\n<br/>Since v4.1.0, it is dependent on Java 8 due to the dependency on\n[Dynamic Utils][dynamic-utils].\n<br/>Since v4.2.0, it is targeting Java 17 to provide maximum compatibility.\n<br/>Since v4.3.0, the minimum SDK is Android 4.4 (API 19) to comply with the latest policies.\n\n<img src=\"./graphics/preview.png\">\n\n---\n\n## Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Configuration](#configuration)\n    - [Default toast](#default-toast)\n    - [Default toast with duration](#default-toast-with-duration)\n    - [Default toast with icon](#default-toast-with-icon)\n    - [Default toast with icon and duration](#default-toast-with-icon-and-duration)\n    - [Error toast](#error-toast)\n    - [Error toast with duration](#error-toast-with-duration)\n    - [Success toast](#success-toast)\n    - [Success toast with duration](#success-toast-with-duration)\n    - [Warning toast](#warning-toast)\n    - [Warning toast with duration](#warning-toast-with-duration)\n    - [Custom toast](#custom-toast)\n    - [Custom toast with duration](#custom-toast-with-duration)\n    - [Custom toast with icon](#custom-toast-with-icon)\n    - [Custom toast with icon and duration](#custom-toast-with-icon-and-duration)\n    - [Cheat sheets](#cheat-sheets)\n    - [Dependency](#dependency)\n- [License](#license)\n\n---\n\n## Installation\n\nIt can be installed by adding the following dependency to your `build.gradle` file:\n\n```groovy\ndependencies {\n    // For AndroidX enabled projects.\n    implementation 'com.pranavpandey.android:dynamic-toasts:4.3.0'\n\n    // For legacy projects.\n    implementation 'com.pranavpandey.android:dynamic-toasts:1.3.0'\n}\n```\n\n---\n\n## Usage\n\nIt has several method to display toasts based on the requirement. Each method returns a `Toast`\nobject which can be customised further.\n\nPlease call `show()` method to display the toast.\n\n> For a complete reference, please read the [documentation][documentation].\n\n### Configuration\n\nOptional configuration to customise the toasts further like custom background color or drawable, \ncustom text size, typeface or icon size, etc.\n\nVarious methods can be called anywhere in the app to do customisations.\n\n```java\nDynamicToast.Config.getInstance()\n    // Background color for default toast.\n    .setDefaultBackgroundColor(@ColorInt int defaultBackgroundColor)\n    // Tint color for default toast.\n    .setDefaultTintColor(@ColorInt int defaultTintColor)\n    // Background color for error toast.\n    .setErrorBackgroundColor(@ColorInt int errorBackgroundColor)\n    // Background color for success toast.\n    .setSuccessBackgroundColor(@ColorInt int successBackgroundColor)\n    // Background color for warning toast.\n    .setWarningBackgroundColor(@ColorInt int warningBackgroundColor)\n    // Custom icon for error toast. Pass `null` to use default icon.\n    .setErrorIcon(@Nullable Drawable errorIcon)\n    // Custom icon for success toast. Pass `null` to use default icon.\n    .setSuccessIcon(@Nullable Drawable successIcon)\n    // Custom icon for warning toast. Pass `null` to use default icon.\n    .setWarningIcon(@Nullable Drawable warningIcon)\n    // Disable icon for all the toasts.\n    .setDisableIcon(boolean disableIcon)\n    // Custom icon size in `pixels` for all the toasts.\n    .setIconSize(int iconSize)\n    // Custom text size in `SP` for all the toasts.\n    .setTextSize(int textSize)\n    // Custom text typeface for all the toasts. Pass `null` to use system typeface.\n    .setTextTypeface(@Nullable Typeface textTypeface)\n    // Custom background drawable for all the toasts. Pass `null` to use default background.\n    .setToastBackground(@Nullable Drawable toastBackground)\n    // Apply customisations.\n    .apply();\n```\n\nCall `reset()` method to reset all the customisations.\n\n```java\n// Reset customisations.\nDynamicToast.Config.getInstance().reset();\n```\n\n### Default toast\n\nSimple toast based on the vanilla Android theme for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.make(context, \"Default toast\").show();\n```\n\n### Default toast with duration\n\nSimple toast based on the vanilla Android theme for supplied duration.\n\n```java\nDynamicToast.make(context, \"Default toast with duration\", duration).show();\n```\n\n### Default toast with icon\n\nSimple toast based on the vanilla Android theme with a icon for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.make(context, \"Default toast with icon\", drawable).show();\n```\n\n### Default toast with icon and duration\n\nSimple toast based on the vanilla Android theme with a icon for supplied duration.\n\n```java\nDynamicToast.make(context, \"Default toast with icon and duration\", drawable, duration).show();\n```\n\n### Error toast\n\nError toast with `#F44336` background for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.makeError(context, \"Error toast\").show();\n```\n\n### Error toast with duration\n\nError toast with `#F44336` background for supplied duration.\n\n```java\nDynamicToast.makeError(context, \"Error toast with duration\", duration).show();\n```\n\n### Success toast\n\nSuccess toast with `#4CAF50` background for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.makeSuccess(context, \"Success toast\").show();\n```\n\n### Success toast with duration\n\nSuccess toast with `#4CAF50` background for supplied duration.\n\n```java\nDynamicToast.makeSuccess(context, \"Success toast with duration\", duration).show();\n```\n\n### Warning toast\n\nWarning toast with `#FFEB3B` background for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.makeWarning(context, \"Warning toast\").show();\n```\n\n### Warning toast with duration\n\nWarning toast with `#FFEB3B` background for supplied duration.\n\n```java\nDynamicToast.makeWarning(context, \"Warning toast with duration\", duration).show();\n```\n\n### Custom toast\n\nCustom toast based on the supplied background and tint color for `Toast.LENGTH_SHORT` duration.\n\n```java\nDynamicToast.make(context, \"Custom toast\", tintColor, backgroundColor).show();\n```\n\n### Custom toast with duration\n\nCustom toast based on the supplied background and tint color for supplied duration.\n\n```java\nDynamicToast.make(context, \"Custom toast with duration\", tintColor, backgroundColor, duration).show();\n```\n\n### Custom toast with icon\n\nCustom toast based on the supplied icon, background and tint color theme for `Toast.LENGTH_SHORT` \nduration.\n\n```java\nDynamicToast.make(context, \"Custom toast with icon\", drawable, tintColor, backgroundColor).show();\n```\n\n### Custom toast with icon and duration\n\nCustom toast based on the supplied icon, background and tint color theme for supplied duration.\n\n```java\nDynamicToast.make(context, \"Custom toast with icon and duration\", drawable, \n        tintColor, backgroundColor, duration).show();\n```\n\n### Cheat sheets\n\nUse dynamic hint to display cheat sheets for any `view`. All the methods are same as explained \nabove, just replace `DynamicToast` with `DynamicHint` to create a cheat sheet.\n\n> Use `DynamicHint.show(view, toast)` method to display it according to the anchor view position.\n\n### Dependency\n\nIt depends on the [dynamic-utils][dynamic-utils] to perform various internal operations. \nSo, its functions can also be used to perform other useful operations.\n\n---\n\n## Author\n\nPranav Pandey\n\n[![GitHub](https://img.shields.io/github/followers/pranavpandey?label=GitHub&style=social)](https://github.com/pranavpandey)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/pranavpandeydev?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=pranavpandeydev)\n[![Donate via PayPal](https://img.shields.io/static/v1?label=Donate&message=PayPal&color=blue)](https://paypal.me/pranavpandeydev)\n\n---\n\n## License\n\n    Copyright 2017-2024 Pranav Pandey\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\n[android-support]: https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0\n[androidx]: https://developer.android.com/jetpack/androidx\n[androidx core]: https://developer.android.com/jetpack/androidx/releases/core\n[androidx-migrate]: https://developer.android.com/jetpack/androidx/migrate\n[documentation]: https://pranavpandey.github.io/dynamic-toasts\n[dynamic-utils]: https://github.com/pranavpandey/dynamic-utils\n"
  },
  {
    "path": "build.gradle",
    "content": "/*\n * Copyright 2017-2025 Pranav Pandey\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\nbuildscript {\n    ext.versions = [\n            'compileSdk'      : 35,\n            'minSdk'          : 21,\n            'targetSdk'       : 35,\n            'buildTools'      : '35.0.0',\n            'constraintlayout': '2.1.4',\n            'dynamic'         : '4.6.1',\n            'dialogs'         : '4.5.0',\n            'flexbox'         : '3.0.0',\n            'kotlin'          : '1.9.24'\n    ]\n\n    repositories {\n        mavenCentral()\n        google()\n    }\n\n    dependencies {\n        classpath 'com.android.tools.build:gradle:8.7.3'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}\"\n    }\n}\n\nplugins {\n    id(\"io.github.gradle-nexus.publish-plugin\") version \"2.0.0\"\n}\n\nallprojects {\n    repositories {\n        mavenCentral()\n        google()\n    }\n}\n\ntasks.register('clean', Delete) {\n    delete rootProject.layout.buildDirectory\n}\n\next {\n    projectName = 'dynamic-toasts'\n    projectDesc = 'A simple library to display themed toasts with icon and text on Android.'\n    versionDesc = 'A simple library to display themed toasts with icon and text on Android 4.0 ' +\n            '(API 14) and above.'\n    referenceTitle = 'Dynamic Toasts API reference'\n\n    siteUrl = 'https://github.com/pranavpandey/dynamic-toasts'\n    gitUrl = 'https://github.com/pranavpandey/dynamic-toasts'\n    issueUrl = 'https://github.com/pranavpandey/dynamic-toasts/issues'\n    githubUrl = 'pranavpandey/dynamic-toasts'\n\n    mavenRepo = 'android'\n    mavenGroup = 'com.pranavpandey.android'\n    mavenDir = 'com/pranavpandey/android'\n    mavenArtifactId = 'dynamic-toasts'\n    mavenInceptionYear = '2017'\n    mavenVersion = '4.3.0'\n    mavenVersionCode = 34\n    sampleVersionCode = 35\n\n    developerId = 'pranavpandey'\n    developerName = 'Pranav Pandey'\n    developerEmail = 'dynamic@pranavpandey.com'\n\n    licenseName = 'The Apache Software License, Version 2.0'\n    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'\n    licenseDistribution = 'repo'\n    allLicenses = [\"Apache-2.0\"]\n\n    publication = 'local.properties'\n\n    ext[\"signing.keyId\"] = ''\n    ext[\"signing.password\"] = ''\n    ext[\"signing.secretKeyRingFile\"] = ''\n\n    ossrhUsername = ''\n    ossrhPassword = ''\n    sonatypeStagingProfileId = ''\n}\n\napply plugin: 'io.github.gradle-nexus.publish-plugin'\n\nFile publish = project.rootProject.file(\"${publication}\")\nif (publish.exists()) {\n    Properties properties = new Properties()\n    new FileInputStream(publish).withCloseable { is -> properties.load(is) }\n    properties.each { name, value -> ext[name] = value }\n}\n\nnexusPublishing {\n    repositories {\n        sonatype {\n            username = ossrhUsername\n            password = ossrhPassword\n            stagingProfileId = sonatypeStagingProfileId\n        }\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/build.gradle",
    "content": "/*\n * Copyright 2017-2024 Pranav Pandey\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'\n\nandroid {\n    compileSdkVersion versions.compileSdk\n    buildToolsVersion versions.buildTools\n    namespace 'com.pranavpandey.android.dynamic.toasts'\n\n    defaultConfig {\n        minSdkVersion versions.minSdk\n        targetSdkVersion versions.targetSdk\n    }\n\n    sourceSets {\n        main.res.srcDirs 'res'\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n}\n\ndependencies {\n    implementation(platform(\"org.jetbrains.kotlin:kotlin-bom:${versions.kotlin}\"))\n\n    api \"com.pranavpandey.android:dynamic-utils:${versions.dynamic}\"\n}\n\nif (project.rootProject.file(\"${publication}\").exists()) {\n    apply from: 'maven.gradle'\n}\n\ntasks.register('generateJavadoc') {\n    description \"Generates Javadoc.\"\n}\n\nproject.afterEvaluate {\n    android.libraryVariants.configureEach { variant ->\n        def task = project.tasks.create(\n                \"generate${variant.name.capitalize()}Javadoc\", Javadoc) {\n            title \"${referenceTitle}<h4>${versionDesc}</h4><h5>${mavenVersion}</h5>\"\n            description \"Generates Javadoc for $variant.name.\"\n            destinationDir = new File(destinationDir, variant.baseName)\n\n            source = variant.sourceSets.collect {\n                it.java.sourceFiles\n            }.inject {\n                m, i -> m + i\n            }\n            doFirst {\n                classpath = project.files(variant.javaCompileProvider.get().classpath.files,\n                        project.android.getBootClasspath())\n            }\n\n            if (JavaVersion.current().isJava8Compatible()) {\n                options.addStringOption('Xdoclint:none', '-quiet')\n            }\n\n            options.memberLevel = JavadocMemberLevel.PROTECTED\n            exclude \"**/R\", \"**/R.**\", \"**/R\\$**\", \"**/BuildConfig*\"\n\n            options.windowTitle = \"${referenceTitle}\"\n            options.links('http://docs.oracle.com/javase/8/docs/api',\n                    'http://docs.oracle.com/javase/17/docs/api')\n            options.links('https://developer.android.com/reference')\n            options.linksOffline('https://developer.android.com/reference',\n                    'https://developer.android.com/reference/androidx')\n            options.links('https://pranavpandey.org/dynamic-utils')\n\n            failOnError false\n        }\n\n        task.dependsOn \"assemble${variant.name.capitalize()}\"\n        generateJavadoc.dependsOn task\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/maven.gradle",
    "content": "/*\n * Copyright 2017-2024 Pranav Pandey\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: 'maven-publish'\napply plugin: 'signing'\n\ngroup = mavenGroup\nversion = mavenVersion\n\n// Android libraries\nif (project.hasProperty(\"android\")) {\n    tasks.register('sourcesJar', Jar) {\n        archiveClassifier.set(\"sources\")\n        from android.sourceSets.main.java.srcDirs\n    }\n\n    tasks.register('javadoc', Javadoc) {\n        dependsOn \"generateReleaseRFile\"\n        title \"${referenceTitle}<h4>${versionDesc}</h4><h5>${mavenVersion}</h5>\"\n        failOnError = false\n\n        source = android.sourceSets.main.java.sourceFiles\n        doNotTrackState(\"Javadoc needs to be generated every time.\")\n\n        if (JavaVersion.current().isJava8Compatible()) {\n            options.addStringOption('Xdoclint:none', '-quiet')\n        }\n\n        options.memberLevel = JavadocMemberLevel.PROTECTED\n        exclude \"**/R\", \"**/R.**\", \"**/R\\$**\", \"**/BuildConfig*\"\n\n        options.windowTitle = \"${referenceTitle}\"\n        options.links('http://docs.oracle.com/javase/8/docs/api',\n                'http://docs.oracle.com/javase/17/docs/api')\n        options.links('https://developer.android.com/reference')\n        options.linksOffline('https://developer.android.com/reference',\n                'https://developer.android.com/reference/androidx')\n        options.links('https://pranavpandey.org/dynamic-utils')\n    }\n} else { // Java libraries\n    tasks.register('sourcesJar', Jar) {\n        dependsOn classes\n\n        archiveClassifier.set(\"sources\")\n        from sourceSets.main.allSource\n    }\n}\n\ntasks.register('javadocJar', Jar) {\n    dependsOn javadoc\n\n    archiveClassifier.set(\"javadoc\")\n    from javadoc.destinationDir\n}\n\nartifacts {\n    archives javadocJar\n    archives sourcesJar\n}\n\n// Maven\npublishing {\n    publications {\n        library(MavenPublication) {\n            groupId mavenGroup\n            artifactId mavenArtifactId\n            version mavenVersion\n\n            artifact \"$buildDir/outputs/aar/$mavenArtifactId-release.aar\"\n            artifact javadocJar\n            artifact sourcesJar\n\n            pom.withXml {\n                // Project\n                asNode().appendNode('name', projectName)\n                asNode().appendNode('description', projectDesc)\n                asNode().appendNode('url', siteUrl)\n                asNode().appendNode('inceptionYear', mavenInceptionYear)\n\n                // Licenses\n                def license = asNode().appendNode('licenses').appendNode('license')\n                license.appendNode('name', licenseName)\n                license.appendNode('url', licenseUrl)\n                license.appendNode('distribution', licenseDistribution)\n\n                // Developers\n                def developer = asNode().appendNode('developers').appendNode('developer')\n                developer.appendNode('id', developerId)\n                developer.appendNode('name', developerName)\n                developer.appendNode('email', developerEmail)\n\n                // SCM\n                def scm = asNode().appendNode('scm')\n                scm.appendNode('connection', \"scm:git:${gitUrl}.git\")\n                scm.appendNode('developerConnection', gitUrl)\n                scm.appendNode('url', siteUrl)\n\n                // Dependencies\n                def dependenciesNode = asNode()['dependencies'][0]\n                if (dependenciesNode == null) {\n                    dependenciesNode = asNode().appendNode('dependencies')\n                }\n\n                // Add all that are 'compile' dependencies.\n                configurations.api.allDependencies.each {\n                    def dependencyNode = dependenciesNode.appendNode('dependency')\n                    dependencyNode.appendNode('groupId', it.group)\n                    dependencyNode.appendNode('artifactId', it.name)\n                    dependencyNode.appendNode('version', it.version)\n                }\n            }\n        }\n    }\n}\n\next[\"signing.keyId\"] = rootProject.ext[\"signing.keyId\"]\next[\"signing.password\"] = rootProject.ext[\"signing.password\"]\next[\"signing.secretKeyRingFile\"] = rootProject.ext[\"signing.secretKeyRingFile\"]\n\nsigning {\n    sign publishing.publications\n}\n\nafterEvaluate { project ->\n    // Fix javadoc generation.\n    javadoc.classpath += files(android.libraryVariants.collect { variant ->\n        variant.javaCompileProvider.get().classpath.files\n    })\n\n    def pomTask = \"generatePomFileForLibraryPublication\"\n    def dependencies = [javadocJar, sourcesJar, assembleRelease, pomTask]\n\n    // Convenience task to prepare everything we need for releases.\n    tasks.register('prepareArtifacts') {\n        dependsOn dependencies\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<manifest />\n"
  },
  {
    "path": "dynamic-toasts/src/main/java/com/pranavpandey/android/dynamic/toasts/DynamicHint.java",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.graphics.Color;\nimport android.graphics.PorterDuff;\nimport android.graphics.Rect;\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport android.util.DisplayMetrics;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport androidx.annotation.ColorInt;\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\nimport androidx.core.content.ContextCompat;\n\nimport com.pranavpandey.android.dynamic.toasts.internal.ToastCompat;\nimport com.pranavpandey.android.dynamic.util.DynamicColorUtils;\nimport com.pranavpandey.android.dynamic.util.DynamicDrawableUtils;\nimport com.pranavpandey.android.dynamic.util.DynamicUnitUtils;\n\n/**\n * Helper class to display themed cheat sheets with icon and text by using {@link Toast}.\n * <p>If no color is supplied, it will display default hint based on the Android support library.\n */\npublic class DynamicHint {\n\n    /**\n     * The minimum top inset to mimic status bar.\n     */\n    private static final int ADT_INSET_TOP = 32;\n\n    /**\n     * The minimum height for anchor, in dips (density-independent pixels).\n     * <p>It will be used to avoid overlapping for the smaller view height.\n     */\n    private static final int ADT_MIN_ANCHOR_HEIGHT = 48;\n\n    /**\n     * The toast offset, in dips (density-independent pixels).\n     * <p>It will be used to determine whether the toast should appear above or below the UI element.\n     */\n    private static final int ADT_TOAST_OFFSET = 4;\n\n    /**\n     * Default background color for the toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_BG_COLOR =\n            Color.parseColor(\"#454545\");\n\n    /**\n     * Default tint color for the toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_TINT_COLOR =\n            Color.parseColor(\"#FFFFFF\");\n\n    /**\n     * Default background color for the error toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_ERROR_BG_COLOR =\n            Color.parseColor(\"#F44336\");\n\n    /**\n     * Default background color for the success toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_SUCCESS_BG_COLOR =\n            Color.parseColor(\"#4CAF50\");\n\n    /**\n     * Default background color for the warning toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_WARNING_BG_COLOR =\n            Color.parseColor(\"#FFEB3B\");\n\n    /**\n     * Default value for the {@link #disableIcon}.\n     * <p>{@code false} to enable the toast icon.\n     */\n    private static final boolean ADT_DEFAULT_DISABLE_ICON = false;\n\n    /**\n     * Default value for the {@link #tintIcon}.\n     * <p>{@code true} to tint the toast icon.\n     */\n    private static final boolean ADT_DEFAULT_TINT_ICON = true;\n\n    /**\n     * Default icon size for the toast in pixels.\n     * <p>{@code -1} to use in-built icon size.\n     */\n    private static final @ColorInt int ADT_DEFAULT_ICON_SIZE = -1;\n\n    /**\n     * Default text size for the toast in SP.\n     * <p>{@code -1} to use system text size.\n     *\n     * @see TypedValue#COMPLEX_UNIT_SP;\n     */\n    private static final @ColorInt int ADT_DEFAULT_TEXT_SIZE = -1;\n\n    /**\n     * Background color for the default toast.\n     */\n    private static @Nullable @ColorInt Integer defaultBackgroundColor = ADT_DEFAULT_BG_COLOR;\n\n    /**\n     * Tint color for the default toast.\n     */\n    private static @Nullable @ColorInt Integer defaultTintColor = ADT_DEFAULT_TINT_COLOR;\n\n    /**\n     * Background color for the error toast.\n     */\n    private static @Nullable @ColorInt Integer errorBackgroundColor = ADT_DEFAULT_ERROR_BG_COLOR;\n\n    /**\n     * Background color for the success toast.\n     */\n    private static @Nullable @ColorInt Integer successBackgroundColor =\n            ADT_DEFAULT_SUCCESS_BG_COLOR;\n\n    /**\n     * Background color for the warning toast.\n     */\n    private static @Nullable @ColorInt Integer warningBackgroundColor =\n            ADT_DEFAULT_WARNING_BG_COLOR;\n\n    /**\n     * Custom icon for the error toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable errorIcon = null;\n\n    /**\n     * Custom icon for the success toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable successIcon = null;\n\n    /**\n     * Custom icon for the warning toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable warningIcon = null;\n\n    /**\n     * {@code true} to disable icon for all the toasts.\n     */\n    private static boolean disableIcon = ADT_DEFAULT_DISABLE_ICON;\n\n    /**\n     * {@code true} to tint icon for all the toasts.\n     */\n    private static boolean tintIcon = ADT_DEFAULT_TINT_ICON;\n\n    /**\n     * Icon size for the toast in pixels.\n     */\n    private static int iconSize = ADT_DEFAULT_ICON_SIZE;\n\n    /**\n     * Text size for the toast in SP.\n     *\n     * @see TypedValue#COMPLEX_UNIT_SP;\n     */\n    private static int textSize = ADT_DEFAULT_TEXT_SIZE;\n\n    /**\n     * Custom typeface used by the toast.\n     * <p>{@code null} to use the system typeface.\n     */\n    private static Typeface textTypeface = null;\n\n    /**\n     * Custom background used by the toast.\n     * <p>{@code null} to use the default background.\n     */\n    private static Drawable toastBackground = null;\n\n    /**\n     * Generate tint color according to the supplied color, otherwise return the default value.\n     *\n     * @param color The color to be used to generate the tint color.\n     * @param defaultColor The default value for the tint color.\n     *\n     * @return The generated tint color according to the supplied color, otherwise return the\n     *         default value.\n     */\n    private static @Nullable @ColorInt Integer generateTintColor(\n            @Nullable @ColorInt Integer color, @Nullable @ColorInt Integer defaultColor) {\n        if (color != null) {\n            return DynamicColorUtils.getTintColor(color);\n        }\n\n        return defaultColor;\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text) {\n        return make(context, text, null, defaultTintColor,\n                defaultBackgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, null, defaultTintColor,\n                defaultBackgroundColor, duration);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeError(@NonNull Context context, @Nullable CharSequence text) {\n        return make(context, text, errorIcon != null ? errorIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_error),\n                generateTintColor(errorBackgroundColor, defaultTintColor), errorBackgroundColor);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeError(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_error),\n                generateTintColor(errorBackgroundColor, defaultTintColor),\n                errorBackgroundColor, duration);\n    }\n\n    /**\n     * Make a success toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeSuccess(@NonNull Context context,\n            @Nullable CharSequence text) {\n        return make(context, text, successIcon != null ? successIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_success),\n                generateTintColor(successBackgroundColor, defaultTintColor), successBackgroundColor);\n    }\n\n    /**\n     * Make a success toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeSuccess(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_success),\n                generateTintColor(successBackgroundColor, defaultTintColor),\n                successBackgroundColor, duration);\n    }\n\n    /**\n     * Make a warning toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeWarning(@NonNull Context context,\n            @Nullable CharSequence text) {\n        return make(context, text, warningIcon != null ? warningIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_warning),\n                generateTintColor(warningBackgroundColor, defaultTintColor), warningBackgroundColor);\n    }\n\n    /**\n     * Make a warning toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeWarning(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_warning),\n                generateTintColor(warningBackgroundColor, defaultTintColor),\n                warningBackgroundColor, duration);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, @Nullable Drawable icon) {\n        return make(context, text, icon, defaultTintColor,\n                defaultBackgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, int duration) {\n        return make(context, text, icon, defaultTintColor, defaultBackgroundColor, duration);\n    }\n\n    /**\n     * Make a themed toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable @ColorInt Integer tintColor, @Nullable @ColorInt Integer backgroundColor) {\n        return make(context, text, null, tintColor, backgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with text, background and the tint color.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor, int duration) {\n        return make(context, text, null, tintColor, backgroundColor, duration);\n    }\n\n    /**\n     * Make a themed toast with text, icon, background and the tint color.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor) {\n        return make(context, text, icon, tintColor, backgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with text, icon, background and the tint color.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor, int duration) {\n        if (context instanceof Activity && ((Activity) context).isFinishing()) {\n            context = context.getApplicationContext();\n        }\n\n        @Nullable @ColorInt Integer toastTintColor = tintColor;\n        if (tintColor != null && backgroundColor != null) {\n            toastTintColor = DynamicColorUtils.getContrastColor(toastTintColor, backgroundColor);\n        }\n\n        ToastCompat toast = new ToastCompat(context, new Toast(context));\n        View toastLayout = LayoutInflater.from(context).inflate(\n                R.layout.adt_layout_hint, new LinearLayout(context), false);\n        ImageView toastIcon = toastLayout.findViewById(R.id.adt_hint_icon);\n        TextView toastText = toastLayout.findViewById(R.id.adt_hint_text);\n\n        if (!disableIcon && icon != null) {\n            if (iconSize != ADT_DEFAULT_ICON_SIZE) {\n                toastIcon.getLayoutParams().width = iconSize;\n                toastIcon.getLayoutParams().height = iconSize;\n                toastIcon.requestLayout();\n            }\n\n            if (tintIcon && toastTintColor != null) {\n                toastIcon.setColorFilter(toastTintColor);\n            } else {\n                toastIcon.clearColorFilter();\n            }\n            toastIcon.setImageDrawable(icon);\n        } else {\n            toastIcon.setVisibility(View.GONE);\n        }\n\n        if (textTypeface != null) {\n            toastText.setTypeface(textTypeface);\n        }\n        if (textSize != ADT_DEFAULT_TEXT_SIZE) {\n            toastText.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);\n        }\n\n        if (toastTintColor != null) {\n            toastText.setTextColor(toastTintColor);\n        }\n        toastText.setText(text);\n\n        if (toastBackground != null) {\n            DynamicDrawableUtils.setBackground(toastLayout, backgroundColor != null\n                    ? DynamicDrawableUtils.colorizeDrawable(toastBackground,\n                    backgroundColor, PorterDuff.Mode.MULTIPLY) : toastBackground);\n        } else {\n            DynamicDrawableUtils.setBackground(toastLayout, backgroundColor != null\n                    ? DynamicDrawableUtils.colorizeDrawable(ContextCompat.getDrawable(context,\n                    R.drawable.adt_hint_background), backgroundColor, PorterDuff.Mode.MULTIPLY)\n                    : ContextCompat.getDrawable(context, R.drawable.adt_hint_background));\n        }\n\n        toast.setDuration(duration);\n        toast.setView(toastLayout);\n\n        return toast;\n    }\n\n    /**\n     * Configuration class to customise the {@link DynamicHint} attributes.\n     */\n    public static class Config {\n\n        /**\n         * Singleton instance of {@link Config}.\n         */\n        private static Config sInstance;\n\n        /**\n         * Background color for the default toast.\n         */\n        private @ColorInt Integer defaultBackgroundColor = DynamicHint.defaultBackgroundColor;\n\n        /**\n         * Tint color for the default toast.\n         */\n        private @ColorInt Integer defaultTintColor = DynamicHint.defaultTintColor;\n\n        /**\n         * Background color for the error toast.\n         */\n        private @ColorInt Integer errorBackgroundColor = DynamicHint.errorBackgroundColor;\n\n        /**\n         * Background color for the success toast.\n         */\n        private @ColorInt Integer successBackgroundColor = DynamicHint.successBackgroundColor;\n\n        /**\n         * Background color for the warning toast.\n         */\n        private @ColorInt Integer warningBackgroundColor = DynamicHint.warningBackgroundColor;\n\n        /**\n         * Custom icon for the error toast.\n         */\n        private Drawable errorIcon = DynamicHint.errorIcon;\n\n        /**\n         * Custom icon for the success toast.\n         */\n        private Drawable successIcon = DynamicHint.successIcon;\n\n        /**\n         * Custom icon for the warning toast.\n         */\n        private Drawable warningIcon = DynamicHint.warningIcon;\n\n        /**\n         * {@code true} to disable icon for all the toasts.\n         */\n        private boolean disableIcon = DynamicHint.disableIcon;\n\n        /**\n         * {@code true} to tint icon for all the toasts.\n         */\n        private boolean tintIcon = DynamicHint.tintIcon;\n\n        /**\n         * Icon size for the toast in pixels.\n         */\n        private int iconSize = DynamicHint.iconSize;\n\n        /**\n         * Text size for the toast in SP.\n         *\n         * @see TypedValue#COMPLEX_UNIT_SP;\n         */\n        private @ColorInt int textSize = DynamicHint.textSize;\n\n        /**\n         * Custom text typeface used by the toast.\n         */\n        private Typeface textTypeface = null;\n\n        /**\n         * Custom background used by the toast.\n         */\n        private Drawable toastBackground = null;\n\n        /**\n         * Making default constructor private to avoid instantiation.\n         */\n        private Config() { }\n\n        /**\n         * Get instance to access public methods. Must be called before accessing methods.\n         *\n         * @return The singleton instance of this class.\n         */\n        public static @NonNull Config getInstance() {\n            if (sInstance == null) {\n                sInstance = new Config();\n            }\n\n            return sInstance;\n        }\n\n        /**\n         * Set the default background color.\n         *\n         * @param defaultBackgroundColor The background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDefaultBackgroundColor(\n                @Nullable @ColorInt Integer defaultBackgroundColor) {\n            this.defaultBackgroundColor = defaultBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the default tint color.\n         *\n         * @param defaultTintColor The tint color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDefaultTintColor(@Nullable @ColorInt Integer defaultTintColor) {\n            this.defaultTintColor = defaultTintColor;\n\n            return this;\n        }\n\n        /**\n         * Set the error background color.\n         *\n         * @param errorBackgroundColor The error background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setErrorBackgroundColor(\n                @Nullable @ColorInt Integer errorBackgroundColor) {\n            this.errorBackgroundColor = errorBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the success background color.\n         *\n         * @param successBackgroundColor The success background color\n         *         to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setSuccessBackgroundColor(\n                @Nullable @ColorInt Integer successBackgroundColor) {\n            this.successBackgroundColor = successBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the warning background color.\n         *\n         * @param warningBackgroundColor The warning background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setWarningBackgroundColor(\n                @Nullable @ColorInt Integer warningBackgroundColor) {\n            this.warningBackgroundColor = warningBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the error icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param errorIcon The error icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setErrorIcon(@Nullable Drawable errorIcon) {\n            this.errorIcon = errorIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the success icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param successIcon The success icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setSuccessIcon(@Nullable Drawable successIcon) {\n            this.successIcon = successIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the warning icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param warningIcon The warning icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setWarningIcon(@Nullable Drawable warningIcon) {\n            this.warningIcon = warningIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the icon visibility.\n         *\n         * @param disableIcon {@code true} to disable icon for all the toasts.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDisableIcon(boolean disableIcon) {\n            this.disableIcon = disableIcon;\n\n            return this;\n        }\n\n        /**\n         * Set whether to tint the icon.\n         *\n         * @param tintIcon {@code true} to tint icon for all the toasts.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTintIcon(boolean tintIcon) {\n            this.tintIcon = tintIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the icon size.\n         *\n         * @param iconSize The icon size to be set in {@code pixels}.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setIconSize(int iconSize) {\n            this.iconSize = iconSize;\n\n            return this;\n        }\n\n        /**\n         * Set the text size.\n         *\n         * @param textSize The text size to be set in {@code sp}.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTextSize(int textSize) {\n            this.textSize = textSize;\n\n            return this;\n        }\n\n        /**\n         * Set the text typeface.\n         * <p>Pass {@code null} to use the default typeface.\n         *\n         * @param textTypeface The text typeface to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTextTypeface(@Nullable Typeface textTypeface) {\n            this.textTypeface = textTypeface;\n\n            return this;\n        }\n\n        /**\n         * Set the toast background.\n         * <p>Pass {@code null} to use the default background.\n         *\n         * @param toastBackground The toast background to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setToastBackground(@Nullable Drawable toastBackground) {\n            this.toastBackground = toastBackground;\n\n            return this;\n        }\n\n        /**\n         * Apply customisations.\n         */\n        public void apply() {\n            DynamicHint.defaultBackgroundColor = defaultBackgroundColor;\n            DynamicHint.defaultTintColor = defaultTintColor;\n            DynamicHint.errorBackgroundColor = errorBackgroundColor;\n            DynamicHint.successBackgroundColor = successBackgroundColor;\n            DynamicHint.warningBackgroundColor = warningBackgroundColor;\n            DynamicHint.errorIcon = errorIcon;\n            DynamicHint.successIcon = successIcon;\n            DynamicHint.warningIcon = warningIcon;\n            DynamicHint.disableIcon = disableIcon;\n            DynamicHint.tintIcon = tintIcon;\n            DynamicHint.iconSize = iconSize;\n            DynamicHint.textSize = textSize;\n            DynamicHint.textTypeface = textTypeface;\n            DynamicHint.toastBackground = toastBackground;\n\n            sInstance = null;\n        }\n\n        /**\n         * Reset customisations.\n         */\n        public void reset() {\n            DynamicHint.defaultBackgroundColor = ADT_DEFAULT_BG_COLOR;\n            DynamicHint.defaultTintColor = ADT_DEFAULT_TINT_COLOR;\n            DynamicHint.errorBackgroundColor = ADT_DEFAULT_ERROR_BG_COLOR;\n            DynamicHint.successBackgroundColor = ADT_DEFAULT_SUCCESS_BG_COLOR;\n            DynamicHint.warningBackgroundColor = ADT_DEFAULT_WARNING_BG_COLOR;\n            DynamicHint.errorIcon = null;\n            DynamicHint.successIcon = null;\n            DynamicHint.warningIcon = null;\n            DynamicHint.disableIcon = ADT_DEFAULT_DISABLE_ICON;\n            DynamicHint.tintIcon = ADT_DEFAULT_TINT_ICON;\n            DynamicHint.iconSize = ADT_DEFAULT_ICON_SIZE;\n            DynamicHint.textSize = ADT_DEFAULT_TEXT_SIZE;\n            DynamicHint.textTypeface = null;\n            DynamicHint.toastBackground = null;\n\n            sInstance = null;\n        }\n    }\n\n    /**\n     * Show toast above or below according to the anchor view position.\n     *\n     * @param anchor The anchor view to show the toast.\n     * @param toast The toast to be displayed.\n     */\n    public static void show(@NonNull View anchor, @NonNull Toast toast) {\n        show(anchor, toast, ADT_TOAST_OFFSET);\n    }\n\n    /**\n     * Show toast above or below according to the anchor view position.\n     *\n     * @param anchor The anchor view to show the toast.\n     * @param toast The toast to be displayed.\n     * @param offset The toast vertical offset in dips.\n     */\n    @SuppressWarnings(\"deprecation\")\n    public static void show(@NonNull View anchor, @NonNull Toast toast, int offset) {\n        Rect displayFrame = new Rect();\n        int[] screenLocation = new int[2];\n        anchor.getWindowVisibleDisplayFrame(displayFrame);\n        anchor.getLocationOnScreen(screenLocation);\n        int anchorLeft = screenLocation[0];\n        int anchorTop = Math.max(0, screenLocation[1]\n                - DynamicUnitUtils.convertDpToPixels(ADT_INSET_TOP));\n        int minAnchorHeight = DynamicUnitUtils.convertDpToPixels(ADT_MIN_ANCHOR_HEIGHT);\n        int yOffset = DynamicUnitUtils.convertDpToPixels(offset);\n\n        DisplayMetrics metrics = anchor.getResources().getDisplayMetrics();\n        int widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(\n                metrics.widthPixels, View.MeasureSpec.UNSPECIFIED);\n        int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(\n                metrics.heightPixels, View.MeasureSpec.UNSPECIFIED);\n        int toastWidth = DynamicUnitUtils.convertDpToPixels(ADT_MIN_ANCHOR_HEIGHT);\n\n        if (toast.getView() != null) {\n            toast.getView().measure(widthMeasureSpec, heightMeasureSpec);\n            toastWidth = toast.getView().getMeasuredWidth();\n        }\n\n        if (anchorTop < displayFrame.top + yOffset) {\n            toast.setGravity(Gravity.START | Gravity.TOP,\n                    anchorLeft + (anchor.getWidth() - toastWidth) / 2,\n                    anchorTop + Math.max(minAnchorHeight, anchor.getHeight()) + yOffset);\n        } else {\n            toast.setGravity(Gravity.START | Gravity.TOP,\n                    anchorLeft + (anchor.getWidth() - toastWidth) / 2,\n                    anchorTop - Math.max(minAnchorHeight, anchor.getHeight()) - yOffset);\n        }\n\n        toast.show();\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/src/main/java/com/pranavpandey/android/dynamic/toasts/DynamicToast.java",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.graphics.Color;\nimport android.graphics.PorterDuff;\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport android.util.TypedValue;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport androidx.annotation.ColorInt;\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\nimport androidx.core.content.ContextCompat;\n\nimport com.pranavpandey.android.dynamic.toasts.internal.ToastCompat;\nimport com.pranavpandey.android.dynamic.util.DynamicColorUtils;\nimport com.pranavpandey.android.dynamic.util.DynamicDrawableUtils;\n\n/**\n * Helper class to display themed {@link Toast} with icon and text.\n * <p>If no color is supplied, it will display default toast based on the vanilla Android.\n */\npublic class DynamicToast {\n\n    /**\n     * Default background color for the toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_BG_COLOR =\n            Color.parseColor(\"#454545\");\n\n    /**\n     * Default tint color for the toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_TINT_COLOR =\n            Color.parseColor(\"#FFFFFF\");\n\n    /**\n     * Default background color for the error toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_ERROR_BG_COLOR =\n            Color.parseColor(\"#F44336\");\n\n    /**\n     * Default background color for the success toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_SUCCESS_BG_COLOR =\n            Color.parseColor(\"#4CAF50\");\n\n    /**\n     * Default background color for the warning toast.\n     */\n    private static final @ColorInt int ADT_DEFAULT_WARNING_BG_COLOR =\n            Color.parseColor(\"#FFEB3B\");\n\n    /**\n     * Default value for the {@link #disableIcon}.\n     * <p>{@code false} to enable the toast icon.\n     */\n    private static final boolean ADT_DEFAULT_DISABLE_ICON = false;\n\n    /**\n     * Default value for the {@link #tintIcon}.\n     * <p>{@code true} to tint the toast icon.\n     */\n    private static final boolean ADT_DEFAULT_TINT_ICON = true;\n\n    /**\n     * Default icon size for the toast in pixels.\n     * <p>{@code -1} to use in-built icon size.\n     */\n    private static final @ColorInt int ADT_DEFAULT_ICON_SIZE = -1;\n\n    /**\n     * Default text size for the toast in SP.\n     * <p>{@code -1} to use system text size.\n     *\n     * @see TypedValue#COMPLEX_UNIT_SP;\n     */\n    private static final @ColorInt int ADT_DEFAULT_TEXT_SIZE = -1;\n\n    /**\n     * Background color for the default toast.\n     */\n    private static @Nullable @ColorInt Integer defaultBackgroundColor = ADT_DEFAULT_BG_COLOR;\n\n    /**\n     * Tint color for the default toast.\n     */\n    private static @Nullable @ColorInt Integer defaultTintColor = ADT_DEFAULT_TINT_COLOR;\n\n    /**\n     * Background color for the error toast.\n     */\n    private static @Nullable @ColorInt Integer errorBackgroundColor = ADT_DEFAULT_ERROR_BG_COLOR;\n\n    /**\n     * Background color for the success toast.\n     */\n    private static @Nullable @ColorInt Integer successBackgroundColor =\n            ADT_DEFAULT_SUCCESS_BG_COLOR;\n\n    /**\n     * Background color for the warning toast.\n     */\n    private static @Nullable @ColorInt Integer warningBackgroundColor =\n            ADT_DEFAULT_WARNING_BG_COLOR;\n\n    /**\n     * Custom icon for the error toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable errorIcon = null;\n\n    /**\n     * Custom icon for the success toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable successIcon = null;\n\n    /**\n     * Custom icon for the warning toast.\n     * <p>{@code null} to use the default icon.\n     */\n    private static Drawable warningIcon = null;\n\n    /**\n     * {@code true} to disable icon for all the toasts.\n     */\n    private static boolean disableIcon = ADT_DEFAULT_DISABLE_ICON;\n\n    /**\n     * {@code true} to tint icon for all the toasts.\n     */\n    private static boolean tintIcon = ADT_DEFAULT_TINT_ICON;\n\n    /**\n     * Icon size for the toast in pixels.\n     */\n    private static int iconSize = ADT_DEFAULT_ICON_SIZE;\n\n    /**\n     * Text size for the toast in SP.\n     *\n     * @see TypedValue#COMPLEX_UNIT_SP;\n     */\n    private static int textSize = ADT_DEFAULT_TEXT_SIZE;\n\n    /**\n     * Custom typeface used by the toast.\n     * <p>{@code null} to use the system typeface.\n     */\n    private static Typeface textTypeface = null;\n\n    /**\n     * Custom background used by the toast.\n     * <p>{@code null} to use the default background.\n     */\n    private static Drawable toastBackground = null;\n\n    /**\n     * Generate tint color according to the supplied color, otherwise return the default value.\n     *\n     * @param color The color to be used to generate the tint color.\n     * @param defaultColor The default value for the tint color.\n     *\n     * @return The generated tint color according to the supplied color, otherwise return the\n     *         default value.\n     */\n    private static @Nullable @ColorInt Integer generateTintColor(\n            @Nullable @ColorInt Integer color, @Nullable @ColorInt Integer defaultColor) {\n        if (color != null) {\n            return DynamicColorUtils.getTintColor(color);\n        }\n\n        return defaultColor;\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text) {\n        return make(context, text, null, defaultTintColor,\n                defaultBackgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, null, defaultTintColor,\n                defaultBackgroundColor, duration);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeError(@NonNull Context context, @Nullable CharSequence text) {\n        return make(context, text, errorIcon != null ? errorIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_error),\n                generateTintColor(errorBackgroundColor, defaultTintColor), errorBackgroundColor);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeError(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_error),\n                generateTintColor(errorBackgroundColor, defaultTintColor),\n                errorBackgroundColor, duration);\n    }\n\n    /**\n     * Make a success toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeSuccess(@NonNull Context context,\n            @Nullable CharSequence text) {\n        return make(context, text, successIcon != null ? successIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_success),\n                generateTintColor(successBackgroundColor, defaultTintColor), successBackgroundColor);\n    }\n\n    /**\n     * Make a success toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeSuccess(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_success),\n                generateTintColor(successBackgroundColor, defaultTintColor),\n                successBackgroundColor, duration);\n    }\n\n    /**\n     * Make a warning toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeWarning(@NonNull Context context,\n            @Nullable CharSequence text) {\n        return make(context, text, warningIcon != null ? warningIcon\n                        : ContextCompat.getDrawable(context, R.drawable.adt_ic_warning),\n                generateTintColor(warningBackgroundColor, defaultTintColor), warningBackgroundColor);\n    }\n\n    /**\n     * Make a warning toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast makeWarning(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        return make(context, text, ContextCompat.getDrawable(context, R.drawable.adt_ic_warning),\n                generateTintColor(warningBackgroundColor, defaultTintColor),\n                warningBackgroundColor, duration);\n    }\n\n    /**\n     * Make a error toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, @Nullable Drawable icon) {\n        return make(context, text, icon, defaultTintColor,\n                defaultBackgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with icon and the text.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, int duration) {\n        return make(context, text, icon, defaultTintColor, defaultBackgroundColor, duration);\n    }\n\n    /**\n     * Make a themed toast with icon and the text.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable @ColorInt Integer tintColor, @Nullable @ColorInt Integer backgroundColor) {\n        return make(context, text, null, tintColor, backgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with text, background and the tint color.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context,\n            @Nullable CharSequence text, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor, int duration) {\n        return make(context, text, null, tintColor, backgroundColor, duration);\n    }\n\n    /**\n     * Make a themed toast with text, icon, background and the tint color.\n     * <p>The toast duration will be {@link Toast#LENGTH_SHORT}.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor) {\n        return make(context, text, icon, tintColor, backgroundColor, Toast.LENGTH_SHORT);\n    }\n\n    /**\n     * Make a themed toast with text, icon, background and the tint color.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param icon The toast icon to show.\n     * @param tintColor The toast tint color based on the toast background.\n     *                  <p>It will automatically check for the contrast to provide the\n     *                  best visibility.\n     * @param backgroundColor The toast background color.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The toast with the supplied parameters.\n     *         <p>Use {@link Toast#show()} to display the toast.\n     */\n    public static @NonNull Toast make(@NonNull Context context, @Nullable CharSequence text,\n            @Nullable Drawable icon, @Nullable @ColorInt Integer tintColor,\n            @Nullable @ColorInt Integer backgroundColor, int duration) {\n        if (context instanceof Activity && ((Activity) context).isFinishing()) {\n            context = context.getApplicationContext();\n        }\n\n        @Nullable @ColorInt Integer toastTintColor = tintColor;\n        if (tintColor != null && backgroundColor != null) {\n            toastTintColor = DynamicColorUtils.getContrastColor(toastTintColor, backgroundColor);\n        }\n\n        ToastCompat toast = new ToastCompat(context, new Toast(context));\n        View toastLayout = LayoutInflater.from(context).inflate(\n                R.layout.adt_layout_toast, new LinearLayout(context), false);\n        ImageView toastIcon = toastLayout.findViewById(R.id.adt_toast_icon);\n        TextView toastText = toastLayout.findViewById(R.id.adt_toast_text);\n\n        if (!disableIcon && icon != null) {\n            if (iconSize != ADT_DEFAULT_ICON_SIZE) {\n                toastIcon.getLayoutParams().width = iconSize;\n                toastIcon.getLayoutParams().height = iconSize;\n                toastIcon.requestLayout();\n            }\n\n            if (tintIcon && toastTintColor != null) {\n                toastIcon.setColorFilter(toastTintColor);\n            } else {\n                toastIcon.clearColorFilter();\n            }\n            toastIcon.setImageDrawable(icon);\n        } else {\n            toastIcon.setVisibility(View.GONE);\n        }\n\n        if (textTypeface != null) {\n            toastText.setTypeface(textTypeface);\n        }\n        if (textSize != ADT_DEFAULT_TEXT_SIZE) {\n            toastText.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);\n        }\n\n        if (toastTintColor != null) {\n            toastText.setTextColor(toastTintColor);\n        }\n        toastText.setText(text);\n\n        if (toastBackground != null) {\n            DynamicDrawableUtils.setBackground(toastLayout, backgroundColor != null\n                    ? DynamicDrawableUtils.colorizeDrawable(toastBackground,\n                    backgroundColor, PorterDuff.Mode.MULTIPLY) : toastBackground);\n        } else {\n            DynamicDrawableUtils.setBackground(toastLayout, backgroundColor != null\n                    ? DynamicDrawableUtils.colorizeDrawable(ContextCompat.getDrawable(context,\n                    R.drawable.adt_toast_background), backgroundColor, PorterDuff.Mode.MULTIPLY)\n                    : ContextCompat.getDrawable(context, R.drawable.adt_toast_background));\n        }\n\n        toast.setDuration(duration);\n        toast.setView(toastLayout);\n\n        return toast;\n    }\n\n    /**\n     * Configuration class to customise the {@link DynamicToast} attributes.\n     */\n    public static class Config {\n\n        /**\n         * Singleton instance of {@link Config}.\n         */\n        private static Config sInstance;\n\n        /**\n         * Background color for the default toast.\n         */\n        private @ColorInt Integer defaultBackgroundColor = DynamicToast.defaultBackgroundColor;\n\n        /**\n         * Tint color for the default toast.\n         */\n        private @ColorInt Integer defaultTintColor = DynamicToast.defaultTintColor;\n\n        /**\n         * Background color for the error toast.\n         */\n        private @ColorInt Integer errorBackgroundColor = DynamicToast.errorBackgroundColor;\n\n        /**\n         * Background color for the success toast.\n         */\n        private @ColorInt Integer successBackgroundColor = DynamicToast.successBackgroundColor;\n\n        /**\n         * Background color for the warning toast.\n         */\n        private @ColorInt Integer warningBackgroundColor = DynamicToast.warningBackgroundColor;\n\n        /**\n         * Custom icon for the error toast.\n         */\n        private Drawable errorIcon = DynamicToast.errorIcon;\n\n        /**\n         * Custom icon for the success toast.\n         */\n        private Drawable successIcon = DynamicToast.successIcon;\n\n        /**\n         * Custom icon for the warning toast.\n         */\n        private Drawable warningIcon = DynamicToast.warningIcon;\n\n        /**\n         * {@code true} to disable icon for all the toasts.\n         */\n        private boolean disableIcon = DynamicToast.disableIcon;\n\n        /**\n         * {@code true} to tint icon for all the toasts.\n         */\n        private boolean tintIcon = DynamicToast.tintIcon;\n\n        /**\n         * Icon size for the toast in pixels.\n         */\n        private int iconSize = DynamicToast.iconSize;\n\n        /**\n         * Text size for the toast in SP.\n         *\n         * @see TypedValue#COMPLEX_UNIT_SP;\n         */\n        private @ColorInt int textSize = DynamicToast.textSize;\n\n        /**\n         * Custom text typeface used by the toast.\n         */\n        private Typeface textTypeface = null;\n\n        /**\n         * Custom background used by the toast.\n         */\n        private Drawable toastBackground = null;\n\n        /**\n         * Making default constructor private to avoid instantiation.\n         */\n        private Config() { }\n\n        /**\n         * Get instance to access public methods. Must be called before accessing methods.\n         *\n         * @return The singleton instance of this class.\n         */\n        public static @NonNull Config getInstance() {\n            if (sInstance == null) {\n                sInstance = new Config();\n            }\n\n            return sInstance;\n        }\n\n        /**\n         * Set the default background color.\n         *\n         * @param defaultBackgroundColor The background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDefaultBackgroundColor(\n                @Nullable @ColorInt Integer defaultBackgroundColor) {\n            this.defaultBackgroundColor = defaultBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the default tint color.\n         *\n         * @param defaultTintColor The tint color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDefaultTintColor(@Nullable @ColorInt Integer defaultTintColor) {\n            this.defaultTintColor = defaultTintColor;\n\n            return this;\n        }\n\n        /**\n         * Set the error background color.\n         *\n         * @param errorBackgroundColor The error background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setErrorBackgroundColor(\n                @Nullable @ColorInt Integer errorBackgroundColor) {\n            this.errorBackgroundColor = errorBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the success background color.\n         *\n         * @param successBackgroundColor The success background color\n         *         to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setSuccessBackgroundColor(\n                @Nullable @ColorInt Integer successBackgroundColor) {\n            this.successBackgroundColor = successBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the warning background color.\n         *\n         * @param warningBackgroundColor The warning background color to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setWarningBackgroundColor(\n                @Nullable @ColorInt Integer warningBackgroundColor) {\n            this.warningBackgroundColor = warningBackgroundColor;\n\n            return this;\n        }\n\n        /**\n         * Set the error icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param errorIcon The error icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setErrorIcon(@Nullable Drawable errorIcon) {\n            this.errorIcon = errorIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the success icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param successIcon The success icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setSuccessIcon(@Nullable Drawable successIcon) {\n            this.successIcon = successIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the warning icon.\n         * <p>Pass {@code null} to use the default icon.\n         *\n         * @param warningIcon The warning icon to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setWarningIcon(@Nullable Drawable warningIcon) {\n            this.warningIcon = warningIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the icon visibility.\n         *\n         * @param disableIcon {@code true} to disable icon for all the toasts.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setDisableIcon(boolean disableIcon) {\n            this.disableIcon = disableIcon;\n\n            return this;\n        }\n\n        /**\n         * Set whether to tint the icon.\n         *\n         * @param tintIcon {@code true} to tint icon for all the toasts.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTintIcon(boolean tintIcon) {\n            this.tintIcon = tintIcon;\n\n            return this;\n        }\n\n        /**\n         * Set the icon size.\n         *\n         * @param iconSize The icon size to be set in {@code pixels}.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setIconSize(int iconSize) {\n            this.iconSize = iconSize;\n\n            return this;\n        }\n\n        /**\n         * Set the text size.\n         *\n         * @param textSize The text size to be set in {@code sp}.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTextSize(int textSize) {\n            this.textSize = textSize;\n\n            return this;\n        }\n\n        /**\n         * Set the text typeface.\n         * <p>Pass {@code null} to use the default typeface.\n         *\n         * @param textTypeface The text typeface to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setTextTypeface(@Nullable Typeface textTypeface) {\n            this.textTypeface = textTypeface;\n\n            return this;\n        }\n\n        /**\n         * Set the toast background.\n         * <p>Pass {@code null} to use the default background.\n         *\n         * @param toastBackground The toast background to be set.\n         *\n         * @return The {@link Config} object to allow for chaining of calls to set methods.\n         */\n        public @NonNull Config setToastBackground(@Nullable Drawable toastBackground) {\n            this.toastBackground = toastBackground;\n\n            return this;\n        }\n\n        /**\n         * Apply customisations.\n         */\n        public void apply() {\n            DynamicToast.defaultBackgroundColor = defaultBackgroundColor;\n            DynamicToast.defaultTintColor = defaultTintColor;\n            DynamicToast.errorBackgroundColor = errorBackgroundColor;\n            DynamicToast.successBackgroundColor = successBackgroundColor;\n            DynamicToast.warningBackgroundColor = warningBackgroundColor;\n            DynamicToast.errorIcon = errorIcon;\n            DynamicToast.successIcon = successIcon;\n            DynamicToast.warningIcon = warningIcon;\n            DynamicToast.disableIcon = disableIcon;\n            DynamicToast.tintIcon = tintIcon;\n            DynamicToast.iconSize = iconSize;\n            DynamicToast.textSize = textSize;\n            DynamicToast.textTypeface = textTypeface;\n            DynamicToast.toastBackground = toastBackground;\n\n            sInstance = null;\n        }\n\n        /**\n         * Reset customisations.\n         */\n        public void reset() {\n            DynamicToast.defaultBackgroundColor = ADT_DEFAULT_BG_COLOR;\n            DynamicToast.defaultTintColor = ADT_DEFAULT_TINT_COLOR;\n            DynamicToast.errorBackgroundColor = ADT_DEFAULT_ERROR_BG_COLOR;\n            DynamicToast.successBackgroundColor = ADT_DEFAULT_SUCCESS_BG_COLOR;\n            DynamicToast.warningBackgroundColor = ADT_DEFAULT_WARNING_BG_COLOR;\n            DynamicToast.errorIcon = null;\n            DynamicToast.successIcon = null;\n            DynamicToast.warningIcon = null;\n            DynamicToast.disableIcon = ADT_DEFAULT_DISABLE_ICON;\n            DynamicToast.tintIcon = ADT_DEFAULT_TINT_ICON;\n            DynamicToast.iconSize = ADT_DEFAULT_ICON_SIZE;\n            DynamicToast.textSize = ADT_DEFAULT_TEXT_SIZE;\n            DynamicToast.textTypeface = null;\n            DynamicToast.toastBackground = null;\n\n            sInstance = null;\n        }\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/src/main/java/com/pranavpandey/android/dynamic/toasts/internal/ToastCompat.java",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts.internal;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.content.res.Resources;\nimport android.view.View;\nimport android.widget.Toast;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\nimport androidx.annotation.StringRes;\n\nimport com.pranavpandey.android.dynamic.util.DynamicSdkUtils;\n\nimport java.lang.reflect.Field;\n\n/**\n * A Toast to fix the bad token exception on API 25.\n */\n@SuppressWarnings(\"deprecation\")\npublic final class ToastCompat extends Toast {\n\n    /**\n     * Base toast used by this toast compat.\n     */\n    private final @NonNull Toast mToast;\n\n    public ToastCompat(Context context, @NonNull Toast base) {\n        super(context);\n\n        this.mToast = base;\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     *\n     * @param context The context to use.\n     * @param text The text to show. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The standard toast that just contains a text view.\n     */\n    @SuppressLint(\"ShowToast\")\n    public static ToastCompat makeText(@NonNull Context context,\n            @Nullable CharSequence text, int duration) {\n        Toast toast = Toast.makeText(context, text, duration);\n        setToastContext(toast.getView(), new ToastContext(context, toast));\n        return new ToastCompat(context, toast);\n    }\n\n    /**\n     * Make a standard toast that just contains a text view.\n     *\n     * @param context The context to use.\n     * @param resId The resource id of the string resource to use. Can be formatted text.\n     * @param duration The duration for the toast, either {@link Toast#LENGTH_SHORT}\n     *                 or {@link Toast#LENGTH_LONG}.\n     *\n     * @return The standard toast that just contains a text view.\n     */\n    public static Toast makeText(@NonNull Context context, @StringRes int resId, int duration)\n            throws Resources.NotFoundException {\n        return makeText(context, context.getResources().getText(resId), duration);\n    }\n\n    /**\n     * Sets the toast context to fix bad token exception.\n     *\n     * @param view The view used by the toast\n     * @param context The context used by the toast.\n     */\n    @SuppressLint(\"DiscouragedPrivateApi\")\n    private static void setToastContext(@Nullable View view, @NonNull Context context) {\n        if (view != null && DynamicSdkUtils.is25()) {\n            try {\n                Field field = View.class.getDeclaredField(\"mContext\");\n                field.setAccessible(true);\n                field.set(view, context);\n            } catch (Throwable throwable) {\n                throwable.printStackTrace();\n            }\n        }\n    }\n\n    @Override\n    public void show() {\n        mToast.show();\n    }\n\n    @Override\n    public void setDuration(int duration) {\n        mToast.setDuration(duration);\n    }\n\n    @Override\n    public void setGravity(int gravity, int xOffset, int yOffset) {\n        mToast.setGravity(gravity, xOffset, yOffset);\n    }\n\n    @Override\n    public void setMargin(float horizontalMargin, float verticalMargin) {\n        mToast.setMargin(horizontalMargin, verticalMargin);\n    }\n\n    @Override\n    public void setText(int resId) {\n        mToast.setText(resId);\n    }\n\n    @Override\n    public void setText(CharSequence s) {\n        mToast.setText(s);\n    }\n\n    @Override\n    public void setView(View view) {\n        mToast.setView(view);\n        setToastContext(view, new ToastContext(view.getContext(), this));\n    }\n\n    @Override\n    public float getHorizontalMargin() {\n        return mToast.getHorizontalMargin();\n    }\n\n    @Override\n    public float getVerticalMargin() {\n        return mToast.getVerticalMargin();\n    }\n\n    @Override\n    public int getDuration() {\n        return mToast.getDuration();\n    }\n\n    @Override\n    public int getGravity() {\n        return mToast.getGravity();\n    }\n\n    @Override\n    public int getXOffset() {\n        return mToast.getXOffset();\n    }\n\n    @Override\n    public int getYOffset() {\n        return mToast.getYOffset();\n    }\n\n    @Override\n    public @Nullable View getView() {\n        return mToast.getView();\n    }\n\n    public @NonNull Toast getToast() {\n        return mToast;\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/src/main/java/com/pranavpandey/android/dynamic/toasts/internal/ToastContext.java",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts.internal;\n\nimport android.content.Context;\nimport android.content.ContextWrapper;\nimport android.view.Display;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.WindowManager;\nimport android.widget.Toast;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\n/**\n * A ContextWrapper to fix bad token exception.\n */\npublic final class ToastContext extends ContextWrapper {\n\n    /**\n     * Boast used by this context wrapper.\n     */\n    private @NonNull Toast toast;\n\n    /**\n     * Constructor to initialize an object of this class.\n     *\n     * @param base The base context for this wrapper.\n     * @param toast The toast for this wrapper.\n     */\n    public ToastContext(@NonNull Context base, @NonNull Toast toast) {\n        super(base);\n\n        this.toast = toast;\n    }\n\n    @Override\n    public Context getApplicationContext() {\n        return new ApplicationContextWrapper(getBaseContext().getApplicationContext());\n    }\n\n    /**\n     * A ContextWrapper to initialize window manager service.\n     */\n    static final class ApplicationContextWrapper extends ContextWrapper {\n\n        /**\n         * Constructor to initialize an object of this class.\n         *\n         * @param base The base context for this wrapper.\n         */\n        private ApplicationContextWrapper(@NonNull Context base) {\n            super(base);\n        }\n\n        @Override\n        public Object getSystemService(@NonNull String name) {\n            @Nullable Object service = null;\n            if (Context.WINDOW_SERVICE.equals(name)) {\n                service = getBaseContext().getSystemService(name);\n            }\n\n            if (service != null) {\n                return new WindowManagerWrapper((WindowManager) service);\n            }\n\n            return super.getSystemService(name);\n        }\n    }\n\n    /**\n     * A WindowManager to fix the bad token exception.\n     */\n    @SuppressWarnings(\"deprecation\")\n    static final class WindowManagerWrapper implements WindowManager {\n\n        /**\n         * The base window manager used by this wrapper.\n         */\n        private final @NonNull WindowManager base;\n\n        /**\n         * Constructor to initialize an object of this class.\n         *\n         * @param base The base window manager for this wrapper.\n         */\n        private WindowManagerWrapper(@NonNull WindowManager base) {\n            this.base = base;\n        }\n\n        @Override\n        public Display getDefaultDisplay() {\n            return base.getDefaultDisplay();\n        }\n\n        @Override\n        public void removeViewImmediate(View view) {\n            base.removeViewImmediate(view);\n        }\n\n        @Override\n        public void addView(View view, ViewGroup.LayoutParams params) {\n            try {\n                base.addView(view, params);\n            } catch (BadTokenException e) {\n                e.printStackTrace();\n            } catch (Throwable throwable) {\n                throwable.printStackTrace();\n            }\n        }\n\n        @Override\n        public void updateViewLayout(View view, ViewGroup.LayoutParams params) {\n            base.updateViewLayout(view, params);\n        }\n\n        @Override\n        public void removeView(View view) {\n            base.removeView(view);\n        }\n    }\n}\n"
  },
  {
    "path": "dynamic-toasts/src/main/res/drawable/adt_hint_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<layer-list\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item>\n\n        <shape android:dither=\"true\">\n\n            <corners android:radius=\"2dp\" />\n\n            <gradient\n                android:angle=\"90\"\n                android:endColor=\"#00000000\"\n                android:startColor=\"#10000000\" />\n\n        </shape>\n\n    </item>\n\n    <item\n        android:top=\"2dp\"\n        android:left=\"2dp\"\n        android:bottom=\"2dp\"\n        android:right=\"2dp\">\n\n        <shape>\n\n            <solid android:color=\"#EFFFFFFF\" />\n\n            <corners android:radius=\"2dp\" />\n\n        </shape>\n\n    </item>\n\n</layer-list>\n"
  },
  {
    "path": "dynamic-toasts/src/main/res/drawable/adt_toast_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<layer-list\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item>\n\n        <shape android:dither=\"true\">\n\n            <corners android:radius=\"32dp\" />\n\n            <gradient\n                android:angle=\"90\"\n                android:endColor=\"#00000000\"\n                android:startColor=\"#10000000\" />\n\n        </shape>\n\n    </item>\n\n    <item\n        android:top=\"2dp\"\n        android:left=\"2dp\"\n        android:bottom=\"2dp\"\n        android:right=\"2dp\">\n\n        <shape>\n\n            <solid android:color=\"#EFFFFFFF\" />\n\n            <corners android:radius=\"32dp\" />\n\n        </shape>\n\n    </item>\n\n</layer-list>\n"
  },
  {
    "path": "dynamic-toasts/src/main/res/layout/adt_layout_hint.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/adt_hint\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@android:color/transparent\">\n\n    <LinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:paddingTop=\"@dimen/adt_margin_hint_top_bottom\"\n        android:paddingBottom=\"@dimen/adt_margin_hint_top_bottom\"\n        android:paddingLeft=\"@dimen/adt_margin_hint_right_left\"\n        android:paddingRight=\"@dimen/adt_margin_hint_right_left\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        android:background=\"@android:color/transparent\">\n\n        <ImageView\n            android:id=\"@+id/adt_hint_icon\"\n            android:layout_width=\"@dimen/adt_icon_hint\"\n            android:layout_height=\"@dimen/adt_icon_hint\"\n            android:layout_marginRight=\"@dimen/adt_margin_hint_small\"\n            android:layout_marginEnd=\"@dimen/adt_margin_hint_small\"\n            android:contentDescription=\"@null\" />\n\n        <TextView\n            android:id=\"@+id/adt_hint_text\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textAlignment=\"viewStart\"\n            android:gravity=\"start\"\n            android:textSize=\"@dimen/adt_font_hint\" />\n\n    </LinearLayout>\n\n</FrameLayout>\n"
  },
  {
    "path": "dynamic-toasts/src/main/res/layout/adt_layout_toast.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/adt_hint\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@android:color/transparent\">\n\n    <LinearLayout\n        android:id=\"@+id/adt_toast\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:paddingTop=\"@dimen/adt_margin_toast_top_bottom\"\n        android:paddingBottom=\"@dimen/adt_margin_toast_top_bottom\"\n        android:paddingLeft=\"@dimen/adt_margin_toast_right_left\"\n        android:paddingRight=\"@dimen/adt_margin_toast_right_left\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        android:background=\"@android:color/transparent\">\n\n        <ImageView\n            android:id=\"@+id/adt_toast_icon\"\n            android:layout_width=\"@dimen/adt_icon_toast\"\n            android:layout_height=\"@dimen/adt_icon_toast\"\n            android:layout_marginRight=\"@dimen/adt_margin_toast_small\"\n            android:layout_marginEnd=\"@dimen/adt_margin_toast_small\"\n            android:contentDescription=\"@null\" />\n\n        <TextView\n            android:id=\"@+id/adt_toast_text\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textAlignment=\"viewStart\"\n            android:gravity=\"start\"\n            android:textSize=\"@dimen/adt_font_toast\" />\n\n    </LinearLayout>\n\n</FrameLayout>\n"
  },
  {
    "path": "dynamic-toasts/src/main/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<resources>\n\n    <!-- Toast dimensions -->\n    <dimen name=\"adt_font_toast\">15sp</dimen>\n    <dimen name=\"adt_icon_toast\">24dp</dimen>\n    <dimen name=\"adt_margin_toast_top_bottom\">12dp</dimen>\n    <dimen name=\"adt_margin_toast_right_left\">16dp</dimen>\n    <dimen name=\"adt_margin_toast_small\">8dp</dimen>\n\n    <!-- Hint dimensions -->\n    <dimen name=\"adt_font_hint\">13sp</dimen>\n    <dimen name=\"adt_icon_hint\">20dp</dimen>\n    <dimen name=\"adt_margin_hint_top_bottom\">8dp</dimen>\n    <dimen name=\"adt_margin_hint_right_left\">12dp</dimen>\n    <dimen name=\"adt_margin_hint_small\">4dp</dimen>\n\n</resources>\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Jan 28 10:36:42 IST 2021\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.9-bin.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\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# 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# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Automatically convert third-party libraries to use AndroidX\nandroid.enableJetifier=true\nandroid.nonTransitiveRClass=false\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": "sample/build.gradle",
    "content": "/*\n * Copyright 2017-2023 Pranav Pandey\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.application'\napply plugin: 'kotlin-android'\n\nandroid {\n    compileSdkVersion versions.compileSdk\n    buildToolsVersion versions.buildTools\n    namespace 'com.pranavpandey.android.dynamic.toasts.sample'\n\n    defaultConfig {\n        applicationId \"com.pranavpandey.android.dynamic.toasts.sample\"\n        minSdkVersion versions.minSdk\n        targetSdkVersion versions.targetSdk\n        versionCode sampleVersionCode\n        versionName mavenVersion\n\n        vectorDrawables.useSupportLibrary = true\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    lintOptions {\n        abortOnError false\n    }\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_17\n        targetCompatibility JavaVersion.VERSION_17\n    }\n}\n\ndependencies {\n    implementation(platform(\"org.jetbrains.kotlin:kotlin-bom:${versions.kotlin}\"))\n\n    implementation project(':dynamic-toasts')\n    implementation \"com.pranavpandey.android:dynamic-dialogs:${versions.dialogs}\"\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}\"\n    implementation \"androidx.constraintlayout:constraintlayout:${versions.constraintlayout}\"\n    implementation \"com.google.android.flexbox:flexbox:${versions.flexbox}\"\n}\n"
  },
  {
    "path": "sample/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 ANDROID_HOME/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\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "sample/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<manifest\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <queries>\n        <intent>\n            <action android:name=\"android.intent.action.VIEW\" />\n            <category android:name=\"android.intent.category.BROWSABLE\" />\n            <data android:scheme=\"https\" />\n        </intent>\n    </queries>\n\n    <application\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/AppTheme\"\n        android:supportsRtl=\"true\">\n\n        <meta-data android:name=\"android.max_aspect\" android:value=\"2.1\" />\n\n        <activity\n            android:name=\".DynamicToastsActivity\"\n            android:theme=\"@style/AppTheme.NoActionBar\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <action android:name=\"android.intent.action.VIEW\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "sample/src/main/java/com/pranavpandey/android/dynamic/toasts/sample/DynamicToastsActivity.kt",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts.sample\n\nimport android.content.res.Configuration\nimport android.graphics.Color\nimport android.graphics.Typeface\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.appcompat.content.res.AppCompatResources\nimport androidx.appcompat.widget.Toolbar\nimport androidx.core.content.ContextCompat\nimport com.google.android.material.floatingactionbutton.FloatingActionButton\nimport com.pranavpandey.android.dynamic.toasts.DynamicHint\nimport com.pranavpandey.android.dynamic.toasts.DynamicToast\nimport com.pranavpandey.android.dynamic.toasts.sample.dialog.AboutDialogFragment\nimport com.pranavpandey.android.dynamic.util.DynamicColorUtils\nimport com.pranavpandey.android.dynamic.util.DynamicLinkUtils\nimport com.pranavpandey.android.dynamic.util.DynamicPackageUtils\nimport com.pranavpandey.android.dynamic.util.DynamicUnitUtils\n\n/**\n * Main activity to show the implementation of [DynamicToast].\n */\nclass DynamicToastsActivity : AppCompatActivity(), View.OnClickListener {\n\n    companion object {\n\n        /**\n         * Open source repository url.\n         */\n        const val URL_GITHUB = \"https://github.com/pranavpandey/dynamic-toasts\"\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        setContentView(R.layout.activity_dynamic_toasts)\n        val toolbar = findViewById<Toolbar>(R.id.toolbar)\n        toolbar.setSubtitle(R.string.app_name_sample)\n        setSupportActionBar(toolbar)\n\n        val fab = findViewById<FloatingActionButton>(R.id.fab)\n        fab.setColorFilter(DynamicColorUtils.getTintColor(\n                ContextCompat.getColor(this, R.color.color_accent)))\n\n        (findViewById<View>(R.id.gradle) as TextView).text = String.format(\n                getString(R.string.format_version),\n                DynamicPackageUtils.getVersionName(this))\n\n        fab.setOnClickListener(this)\n        findViewById<View>(R.id.toast_default).setOnClickListener(this)\n        findViewById<View>(R.id.toast_default_icon).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success).setOnClickListener(this)\n        findViewById<View>(R.id.toast_error).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success).setOnClickListener(this)\n        findViewById<View>(R.id.toast_warning).setOnClickListener(this)\n        findViewById<View>(R.id.toast_custom_icon).setOnClickListener(this)\n        findViewById<View>(R.id.toast_custom).setOnClickListener(this)\n        findViewById<View>(R.id.toast_error_color).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success_color).setOnClickListener(this)\n        findViewById<View>(R.id.toast_warning_color).setOnClickListener(this)\n        findViewById<View>(R.id.toast_default_color).setOnClickListener(this)\n        findViewById<View>(R.id.toast_error_icon).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success_icon).setOnClickListener(this)\n        findViewById<View>(R.id.toast_warning_icon).setOnClickListener(this)\n        findViewById<View>(R.id.toast_error_icon_disable).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success_icon_disable).setOnClickListener(this)\n        findViewById<View>(R.id.toast_warning_icon_disable).setOnClickListener(this)\n        findViewById<View>(R.id.toast_error_icon_disable_tint).setOnClickListener(this)\n        findViewById<View>(R.id.toast_success_icon_disable_tint).setOnClickListener(this)\n        findViewById<View>(R.id.toast_warning_icon_disable_tint).setOnClickListener(this)\n        findViewById<View>(R.id.toast_config_text).setOnClickListener(this)\n        findViewById<View>(R.id.toast_config_background).setOnClickListener(this)\n        findViewById<View>(R.id.toast_config_icon_size).setOnClickListener(this)\n        findViewById<View>(R.id.hint_default).setOnClickListener(this)\n        findViewById<View>(R.id.hint_custom).setOnClickListener(this)\n    }\n\n    /**\n     * Fix for AppCompat 1.1.0.\n     *\n     * https://issuetracker.google.com/issues/140602653\n     */\n    override fun applyOverrideConfiguration(overrideConfiguration: Configuration?) {\n        if (overrideConfiguration != null) {\n            val uiMode = overrideConfiguration.uiMode\n            overrideConfiguration.setTo(baseContext.resources.configuration)\n            overrideConfiguration.uiMode = uiMode\n        }\n        super.applyOverrideConfiguration(resources.configuration)\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.main, menu)\n        return super.onCreateOptionsMenu(menu)\n\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        if (item.itemId == R.id.menu_about) {\n            AboutDialogFragment.newInstance().showDialog(this)\n\n            return true\n        }\n        return super.onOptionsItemSelected(item)\n    }\n\n    override fun onClick(v: View) {\n        when (v.id) {\n            R.id.fab -> DynamicLinkUtils.viewUrl(this@DynamicToastsActivity, URL_GITHUB)\n\n            // Default toast without icon.\n            R.id.toast_default -> DynamicToast.make(\n                    this, getString(R.string.without_icon_desc)).show()\n\n            // Default toast with icon.\n            R.id.toast_default_icon -> DynamicToast.make(\n                    this, getString(R.string.with_icon_desc),\n                    AppCompatResources.getDrawable(\n                            this, R.drawable.ic_toast_icon)).show()\n\n            // Error toast.\n            R.id.toast_error -> DynamicToast.makeError(\n                    this, getString(R.string.error_desc)).show()\n\n            // Success toast.\n            R.id.toast_success -> DynamicToast.makeSuccess(\n                    this, getString(R.string.success_desc)).show()\n\n            // Warning toast.\n            R.id.toast_warning -> DynamicToast.makeWarning(\n                    this, getString(R.string.warning_desc)).show()\n\n            // Custom toast without icon.\n            R.id.toast_custom -> DynamicToast.make(\n                    this, getString(R.string.custom_desc),\n                    Color.parseColor(\"#FFFFFF\"), Color.parseColor(\"#000000\"),\n                    Toast.LENGTH_LONG).show()\n\n            // Custom toast with icon.\n            R.id.toast_custom_icon -> DynamicToast.make(\n                    this, getString(R.string.custom_desc),\n                    AppCompatResources.getDrawable(this, R.drawable.ic_social_github),\n                    Color.parseColor(\"#FFFFFF\"), Color.parseColor(\"#000000\"),\n                    Toast.LENGTH_LONG).show()\n\n            // Error toast with custom color.\n            R.id.toast_error_color -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setErrorBackgroundColor(Color.parseColor(\"#673AB7\"))\n                        .apply()\n\n                DynamicToast.makeError(this, getString(R.string.error_color_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Success toast with custom color.\n            R.id.toast_success_color -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setSuccessBackgroundColor(Color.parseColor(\"#2196F3\"))\n                        .apply()\n\n                DynamicToast.makeSuccess(\n                        this, getString(R.string.success_color_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Warning toast with custom color.\n            R.id.toast_warning_color -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setWarningBackgroundColor(Color.parseColor(\"#8BC34A\"))\n                        .apply()\n\n                DynamicToast.makeWarning(\n                        this, getString(R.string.warning_color_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Default toast with custom color.\n            R.id.toast_default_color -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setDefaultBackgroundColor(Color.parseColor(\"#607d8b\"))\n                        .setDefaultTintColor(DynamicColorUtils.getTintColor(\n                                Color.parseColor(\"#607d8b\")))\n                        .apply()\n\n                DynamicToast.make(\n                        this, getString(R.string.default_color_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Error toast with custom icon.\n            R.id.toast_error_icon -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setErrorIcon(AppCompatResources.getDrawable(\n                                this, R.drawable.ic_toast_icon))\n                        .apply()\n\n                DynamicToast.makeError(this,\n                        getString(R.string.error_icon_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Success toast with custom icon.\n            R.id.toast_success_icon -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setSuccessIcon(AppCompatResources.getDrawable(\n                                this, R.drawable.ic_toast_icon))\n                        .apply()\n\n                DynamicToast.makeSuccess(this,\n                        getString(R.string.success_icon_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Warning toast with custom icon.\n            R.id.toast_warning_icon -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setWarningIcon(AppCompatResources.getDrawable(\n                                this, R.drawable.ic_toast_icon))\n                        .apply()\n\n                DynamicToast.makeWarning(this,\n                        getString(R.string.warning_icon_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Error toast without icon.\n            R.id.toast_error_icon_disable -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setDisableIcon(true)\n                        .apply()\n\n                DynamicToast.makeError(this,\n                        getString(R.string.error_icon_disable_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Success toast without icon.\n            R.id.toast_success_icon_disable -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setDisableIcon(true)\n                        .apply()\n\n                DynamicToast.makeSuccess(this,\n                        getString(R.string.success_icon_disable_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Warning toast without icon.\n            R.id.toast_warning_icon_disable -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setDisableIcon(true)\n                        .apply()\n\n                DynamicToast.makeWarning(this, getString(\n                        R.string.warning_icon_disable_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Error toast without icon tint.\n            R.id.toast_error_icon_disable_tint -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setErrorIcon(AppCompatResources.getDrawable(\n                                this, R.mipmap.ic_launcher))\n                        .setTintIcon(false)\n                        .apply()\n\n                DynamicToast.makeError(this,\n                        getString(R.string.error_icon_disable_tint_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Success toast without icon tint.\n            R.id.toast_success_icon_disable_tint -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setSuccessIcon(AppCompatResources.getDrawable(\n                                this, R.mipmap.ic_launcher))\n                        .setTintIcon(false)\n                        .apply()\n\n                DynamicToast.makeSuccess(this,\n                        getString(R.string.success_icon_disable_tint_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Warning toast without icon tint.\n            R.id.toast_warning_icon_disable_tint -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setWarningIcon(AppCompatResources.getDrawable(\n                                this, R.mipmap.ic_launcher))\n                        .setTintIcon(false)\n                        .apply()\n\n                DynamicToast.makeWarning(this, getString(\n                        R.string.warning_icon_disable_tint_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Toast with custom text size and typeface.\n            R.id.toast_config_text -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setTextSize(18)\n                        .setErrorIcon(AppCompatResources.getDrawable(\n                                this, R.drawable.ic_toast_icon))\n                        .setTextTypeface(Typeface.create(\n                                Typeface.SERIF, Typeface.BOLD_ITALIC))\n                        .setErrorBackgroundColor(Color.parseColor(\"#2196F3\"))\n                        .apply()\n\n                DynamicToast.makeError(this, getString(R.string.text_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Toast with custom background.\n            R.id.toast_config_background -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setToastBackground(AppCompatResources.getDrawable(\n                                this, R.drawable.bg_custom_toast))\n                        .apply()\n\n                DynamicToast.makeSuccess(this, getString(R.string.background_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Toast with custom icon size.\n            R.id.toast_config_icon_size -> {\n                // Customise toast.\n                DynamicToast.Config.getInstance()\n                        .setIconSize(DynamicUnitUtils.convertDpToPixels(48f))\n                        .apply()\n\n                DynamicToast.makeWarning(this, getString(R.string.icon_size_desc)).show()\n\n                // Reset customisations.\n                DynamicToast.Config.getInstance().reset()\n            }\n\n            // Default hint without icon.\n            R.id.hint_default -> DynamicHint.show(v,\n                    DynamicHint.make(this, getString(R.string.default_hint)))\n\n            // Custom hint with icon.\n            R.id.hint_custom -> {\n                // Customise hint.\n                DynamicHint.Config.getInstance()\n                        .setDefaultBackgroundColor(Color.parseColor(\"#607d8b\"))\n                        .setDefaultTintColor(DynamicColorUtils.getTintColor(\n                                Color.parseColor(\"#607d8b\")))\n                        .apply()\n\n                DynamicHint.show(v, DynamicHint.make(this, getString(R.string.custom_hint),\n                        AppCompatResources.getDrawable(this, R.drawable.adt_ic_warning)))\n\n                // Reset customisations.\n                DynamicHint.Config.getInstance().reset()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/pranavpandey/android/dynamic/toasts/sample/dialog/AboutDialogFragment.kt",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\npackage com.pranavpandey.android.dynamic.toasts.sample.dialog\n\nimport android.os.Build\nimport android.os.Bundle\nimport android.text.Html\nimport android.text.Spanned\nimport android.text.method.LinkMovementMethod\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.core.content.ContextCompat\nimport com.pranavpandey.android.dynamic.dialogs.DynamicDialog\nimport com.pranavpandey.android.dynamic.dialogs.fragment.DynamicDialogFragment\nimport com.pranavpandey.android.dynamic.toasts.sample.R\nimport com.pranavpandey.android.dynamic.util.DynamicLinkUtils\n\n/**\n * About dialog to show library info.\n */\nclass AboutDialogFragment : DynamicDialogFragment() {\n\n    companion object {\n\n        /**\n         * Url for other apps on Google Play.\n         */\n        const val URL_PLAY_STORE =\n                \"https://play.google.com/store/apps/dev?id=6608630615059087491\"\n\n        /**\n         * Initialize the new instance of this fragment.\n         *\n         * @return An instance of [AboutDialogFragment].\n         */\n        fun newInstance(): AboutDialogFragment {\n            return AboutDialogFragment()\n        }\n\n        /**\n         * Method to handle [Html.fromHtml] deprecation.\n         */\n        @Suppress(\"DEPRECATION\")\n        private fun fromHtml(html: String): Spanned {\n            return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n                Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY)\n            } else {\n                Html.fromHtml(html)\n            }\n        }\n    }\n\n    /**\n     * Customise [DynamicDialog.Builder] by overriding this method.\n     */\n    override fun onCustomiseBuilder(\n        alertDialogBuilder: DynamicDialog.Builder,\n        savedInstanceState: Bundle?\n    ): DynamicDialog.Builder {\n        // Customise dialog builder to add neutral, positive and negative buttons.\n        // Also, set a view root to add top and bottom scroll indicators.\n        return alertDialogBuilder.setTitle(R.string.about)\n            .setPositiveButton(R.string.more_apps) { _, _ ->\n                DynamicLinkUtils.viewUrl(requireContext(), URL_PLAY_STORE)\n            }\n            .setNegativeButton(android.R.string.cancel, null)\n            // Set custom view for the dialog.\n            .setView(\n                LayoutInflater.from(context).inflate(\n                    R.layout.dialog_about,\n                    LinearLayout(context), false\n                )\n            )\n            // Set view root to automatically add scroll dividers.\n            .setViewRoot(R.id.dialog_about_root)\n    }\n\n    /**\n     * Customise [DynamicDialog] by overriding this method.\n     */\n    override fun onCustomiseDialog(\n        alertDialog: DynamicDialog,\n        view: View?, savedInstanceState: Bundle?\n    ) {\n        super.onCustomiseDialog(alertDialog, view, savedInstanceState)\n\n        // Customise the custom view.\n        val message = view?.findViewById<TextView>(R.id.dialog_about_text)\n\n        message?.text = fromHtml(getString(R.string.about_content))\n        message?.setLineSpacing(0f, 1.2f)\n        message?.movementMethod = LinkMovementMethod.getInstance()\n        message?.setLinkTextColor(ContextCompat.getColor(requireContext(), R.color.color_primary))\n    }\n}\n"
  },
  {
    "path": "sample/src/main/res/drawable/app_bar_shadow.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<shape\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n\n    <gradient\n        android:startColor=\"#05000000\"\n        android:centerColor=\"#20000000\"\n        android:endColor=\"#35000000\"\n        android:angle=\"90\" />\n\n</shape>\n"
  },
  {
    "path": "sample/src/main/res/drawable/bg_custom_toast.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<layer-list\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item>\n\n        <shape\n            android:dither=\"true\">\n\n            <gradient\n                android:angle=\"90\"\n                android:endColor=\"#00000000\"\n                android:startColor=\"#10000000\" />\n\n        </shape>\n\n    </item>\n\n    <item\n        android:top=\"2dp\"\n        android:left=\"2dp\"\n        android:bottom=\"2dp\"\n        android:right=\"2dp\">\n\n        <shape>\n\n            <solid android:color=\"#EFFFFFFF\" />\n\n        </shape>\n\n    </item>\n\n</layer-list>\n"
  },
  {
    "path": "sample/src/main/res/drawable/ic_info.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright Google Inc.\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:width=\"24dp\"\n    android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\">\n\n    <path\n        android:fillColor=\"#FFFFFFFF\"\n        android:pathData=\"M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z\" />\n\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n\n    <path\n        android:fillColor=\"@color/color_primary\"\n        android:pathData=\"m93.06 5.13h-78.47c-5.4 0 -9.76 4.41 -9.76 9.81l-0.05 88.28l19.62 -19.62h68.66c5.39 0 9.81 -4.42 9.81 -9.81v-58.85c0 -5.4 -4.42 -9.81 -9.81 -9.81zm-34.33 44.14h-9.81v-29.43h9.81v29.43zm0 19.62h-9.81v-9.81h9.81v9.81z\" />\n\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/drawable/ic_social_github.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:height=\"24dp\"\n    android:width=\"24dp\"\n    android:viewportHeight=\"512\"\n    android:viewportWidth=\"512\">\n\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M256 70.7c-102.6 0-185.9 83.2-185.9 185.9 0 82.1 53.3 151.8 127.1 176.4 9.3 1.7 12.3-4 12.3-8.9V389.4c-51.7 11.3-62.5-21.9-62.5-21.9 -8.4-21.5-20.6-27.2-20.6-27.2 -16.9-11.5 1.3-11.3 1.3-11.3 18.7 1.3 28.5 19.2 28.5 19.2 16.6 28.4 43.5 20.2 54.1 15.4 1.7-12 6.5-20.2 11.8-24.9 -41.3-4.7-84.7-20.6-84.7-91.9 0-20.3 7.3-36.9 19.2-49.9 -1.9-4.7-8.3-23.6 1.8-49.2 0 0 15.6-5 51.1 19.1 14.8-4.1 30.7-6.2 46.5-6.3 15.8 0.1 31.7 2.1 46.6 6.3 35.5-24 51.1-19.1 51.1-19.1 10.1 25.6 3.8 44.5 1.8 49.2 11.9 13 19.1 29.6 19.1 49.9 0 71.4-43.5 87.1-84.9 91.7 6.7 5.8 12.8 17.1 12.8 34.4 0 24.9 0 44.9 0 51 0 4.9 3 10.7 12.4 8.9 73.8-24.6 127-94.3 127-176.4C441.9 153.9 358.6 70.7 256 70.7z\" />\n\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/drawable/ic_toast_icon.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright Google Inc.\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:height=\"24dp\"\n    android:width=\"24dp\"\n    android:viewportHeight=\"24\"\n    android:viewportWidth=\"24\"\n    android:autoMirrored=\"true\"\n    tools:targetApi=\"kitkat\">\n\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM13,11h-2L11,5h2v6zM13,15h-2v-2h2v2z\" />\n\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_dynamic_toasts.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<androidx.coordinatorlayout.widget.CoordinatorLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\"com.pranavpandey.android.dynamic.toasts.sample.DynamicToastsActivity\">\n\n    <com.google.android.material.appbar.AppBarLayout\n        android:layout_height=\"wrap_content\"\n        android:layout_width=\"match_parent\"\n        android:theme=\"@style/AppTheme.AppBarOverlay\"\n        app:elevation=\"0dp\">\n\n        <androidx.appcompat.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?attr/actionBarSize\"\n            android:background=\"?attr/colorPrimary\"\n            app:popupTheme=\"@style/AppTheme.PopupOverlay\" />\n\n    </com.google.android.material.appbar.AppBarLayout>\n\n    <include layout=\"@layout/content_dynamic_toasts\" />\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n        android:id=\"@+id/fab\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"bottom|end\"\n        android:layout_margin=\"@dimen/fab_margin\"\n        android:contentDescription=\"@string/about\"\n        app:srcCompat=\"@drawable/ic_social_github\" />\n\n</androidx.coordinatorlayout.widget.CoordinatorLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/content_dynamic_toasts.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<FrameLayout\n    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    app:layout_behavior=\"@string/appbar_scrolling_view_behavior\">\n\n    <androidx.core.widget.NestedScrollView\n        android:id=\"@+id/scroll_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scrollbars=\"vertical\"\n        android:scrollbarStyle=\"outsideOverlay\"\n        android:clipToPadding=\"false\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingTop=\"@dimen/activity_margin\"\n            android:paddingLeft=\"@dimen/activity_margin\"\n            android:paddingRight=\"@dimen/activity_margin\"\n            android:paddingBottom=\"@dimen/activity_margin_fab\"\n            android:orientation=\"vertical\">\n\n            <androidx.constraintlayout.widget.ConstraintLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/gradle_title\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"@string/gradle\"\n                    app:layout_constraintTop_toTopOf=\"parent\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/gradle\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:textSize=\"16sp\"\n                    app:layout_constraintTop_toBottomOf=\"@id/gradle_title\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_default\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/default_toasts\"\n                    app:layout_constraintTop_toBottomOf=\"@id/gradle\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_default_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_default\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_default\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/without_icon\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_default_icon\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/with_icon\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_inbuilt\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/inbuilt_toasts\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_default_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_inbuilt_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_inbuilt\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_error\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/error\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_success\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/success\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_warning\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/warning\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_custom\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/custom_toasts\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_inbuilt_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_custom_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_custom\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_custom\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/without_icon\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_custom_icon\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/with_icon\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_colors\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/custom_colors\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_custom_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_colors_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_colors\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_error_color\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/error\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_success_color\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/success\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_warning_color\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/warning\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_default_color\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/default_custom\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_icons\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/custom_icons\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_colors_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_icons_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icons\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_error_icon\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/error\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_success_icon\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/success\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_warning_icon\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/warning\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_icon_disable\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/disable_icon\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icons_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_icon_disable_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icon_disable\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_error_icon_disable\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/error\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_success_icon_disable\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/success\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_warning_icon_disable\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/warning\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_icon_disable_tint\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/disable_icon_tint\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icon_disable_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_icon_disable_tint_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icon_disable_tint\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_error_icon_disable_tint\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/error\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_success_icon_disable_tint\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/success\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_warning_icon_disable_tint\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/warning\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_config\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/config\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_icon_disable_tint_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_config_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_config\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_config_text\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/text\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_config_background\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/background\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/toast_config_icon_size\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/icon_size\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n                <androidx.appcompat.widget.AppCompatTextView\n                    android:id=\"@+id/toasts_hint\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"@dimen/activity_margin\"\n                    android:text=\"@string/cheat_sheets\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_config_content\"\n                    app:layout_constraintStart_toStartOf=\"parent\" />\n\n                <com.google.android.flexbox.FlexboxLayout\n                    android:id=\"@+id/toasts_hint_content\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    app:layout_constraintTop_toBottomOf=\"@id/toasts_hint\"\n                    app:layout_constraintStart_toStartOf=\"parent\"\n                    app:flexWrap=\"wrap\"\n                    app:alignItems=\"stretch\"\n                    app:alignContent=\"stretch\">\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/hint_default\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/default_custom\" />\n\n                    <androidx.appcompat.widget.AppCompatButton\n                        android:id=\"@+id/hint_custom\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:text=\"@string/custom\" />\n\n                </com.google.android.flexbox.FlexboxLayout>\n\n            </androidx.constraintlayout.widget.ConstraintLayout>\n\n        </LinearLayout>\n\n    </androidx.core.widget.NestedScrollView>\n\n    <View\n        android:id=\"@+id/ads_app_bar_shadow\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"4dp\"\n        android:background=\"@drawable/app_bar_shadow\" />\n\n</FrameLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/dialog_about.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<androidx.core.widget.NestedScrollView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/dialog_about_root\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <TextView\n        android:id=\"@+id/dialog_about_text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingLeft=\"@dimen/dialog_margin_horizontal\"\n        android:paddingRight=\"@dimen/dialog_margin_horizontal\"\n        android:layout_gravity=\"start\"\n        android:textAlignment=\"viewStart\" />\n\n</androidx.core.widget.NestedScrollView>\n"
  },
  {
    "path": "sample/src/main/res/menu/main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<menu\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <item\n        android:id=\"@+id/menu_about\"\n        android:title=\"@string/about\"\n        android:icon=\"@drawable/ic_info\"\n        android:orderInCategory=\"1\"\n        app:showAsAction=\"always\" />\n\n</menu>\n"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<adaptive-icon\n    xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <background android:drawable=\"@android:color/white\" />\n\n    <foreground>\n\n        <inset\n            android:drawable=\"@drawable/ic_launcher_foreground\"\n            android:inset=\"27.92%\" />\n\n    </foreground>\n\n</adaptive-icon>\n"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<resources>\n\n    <!-- App color palette. -->\n    <color name=\"color_primary\">#F44336</color>\n    <color name=\"color_primary_dark\">#D32F2F</color>\n    <color name=\"color_accent\">#673AB7</color>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<resources>\n\n    <!-- Default margins -->\n    <dimen name=\"activity_margin\">16dp</dimen>\n    <dimen name=\"activity_margin_fab\">64dp</dimen>\n    <dimen name=\"fab_margin\">16dp</dimen>\n\n    <!-- Dialog margin -->\n    <dimen name=\"dialog_margin_horizontal\">24dp</dimen>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<resources>\n\n    <string name=\"app_name\">Dynamic Toasts</string>\n    <string name=\"app_name_sample\">Sample</string>\n    <string name=\"gradle\">Gradle dependency</string>\n    <string name=\"format_version\">com.pranavpandey.android:dynamic-toasts:%1$s</string>\n\n    <string name=\"sources\">Sources</string>\n    <string name=\"about\">About</string>\n    <string name=\"about_content\"><![CDATA[\n        <b>dynamic-toasts</b><br/>\n        A simple library to display themed toasts with icon and text on Android.<br/><br/>\n        <b>&#169; Pranav Pandey</b><br/><br/>\n        <a href=\\'https://pranavpandey.com\\'>Website</a>&nbsp;&nbsp;\n        <a href=\\'https://github.com/pranavpandey\\'>GitHub</a>&nbsp;&nbsp;\n        <a href=\\'https://www.linkedin.com/in/pranav-pandey-09032974\\'>LinkedIn</a><br/><br/>\n        Please download my other apps via Google Play to support the development.\n    ]]></string>\n    <string name=\"donate\">Donate</string>\n    <string name=\"more_apps\">Google Play</string>\n\n    <string name=\"default_toasts\">Default toasts</string>\n    <string name=\"without_icon\">Without icon</string>\n    <string name=\"without_icon_desc\">Default toast without icon</string>\n    <string name=\"with_icon\">With icon</string>\n    <string name=\"with_icon_desc\">Default toast with icon</string>\n    <string name=\"inbuilt_toasts\">In-built toasts</string>\n    <string name=\"default_custom\">Default</string>\n    <string name=\"custom\">Custom</string>\n    <string name=\"default_color_desc\">Default toast with custom color</string>\n    <string name=\"error\">Error</string>\n    <string name=\"error_desc\">An error has occurred</string>\n    <string name=\"error_color_desc\">Error toast with custom color</string>\n    <string name=\"error_icon_desc\">Error toast with custom icon</string>\n    <string name=\"error_icon_disable_desc\">Error toast without icon</string>\n    <string name=\"error_icon_disable_tint_desc\">Error toast without icon tint</string>\n    <string name=\"success\">Success</string>\n    <string name=\"success_desc\">Task has been completed successfully</string>\n    <string name=\"success_color_desc\">Success toast with custom color</string>\n    <string name=\"success_icon_desc\">Success toast with custom icon</string>\n    <string name=\"success_icon_disable_desc\">Success toast without icon</string>\n    <string name=\"success_icon_disable_tint_desc\">Success toast without icon tint</string>\n    <string name=\"warning\">Warning</string>\n    <string name=\"warning_desc\">This is a warning!</string>\n    <string name=\"warning_color_desc\">Warning toast with custom color</string>\n    <string name=\"warning_icon_desc\">Warning toast with custom icon</string>\n    <string name=\"warning_icon_disable_desc\">Warning toast without icon</string>\n    <string name=\"warning_icon_disable_tint_desc\">Warning toast without icon tint</string>\n    <string name=\"custom_toasts\">Custom toasts</string>\n    <string name=\"custom_desc\">Sources are available on GitHub</string>\n    <string name=\"custom_colors\">Custom colors</string>\n    <string name=\"custom_icons\">Custom icons</string>\n    <string name=\"disable_icon\">Disable icon</string>\n    <string name=\"disable_icon_tint\">Disable icon tint</string>\n    <string name=\"config\">Other customisations</string>\n    <string name=\"cheat_sheets\">Cheat sheets</string>\n    <string name=\"default_hint\">Default hint</string>\n    <string name=\"custom_hint\">Custom hint</string>\n    <string name=\"text\">text</string>\n    <string name=\"text_desc\">Toast with custom text size and typeface</string>\n    <string name=\"background\">background</string>\n    <string name=\"background_desc\">Toast with custom background</string>\n    <string name=\"icon_size\">Icon size</string>\n    <string name=\"icon_size_desc\">Toast with custom icon size</string>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tCopyright 2017-2022 Pranav Pandey\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n-->\n\n<resources>\n\n    <!-- Application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light\">\n        <!-- Customise your theme here. -->\n        <item name=\"colorPrimary\">@color/color_primary</item>\n        <item name=\"colorPrimaryDark\">@color/color_primary_dark</item>\n        <item name=\"colorAccent\">@color/color_accent</item>\n        <!-- Add dynamic dialogs style in the base app theme. -->\n        <item name=\"add_alertDialogStyle\">@style/DynamicDialog</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    <style name=\"AppTheme.PopupOverlay\" parent=\"ThemeOverlay.AppCompat.Light\" />\n\n</resources>\n"
  },
  {
    "path": "settings.gradle",
    "content": "/*\n * Copyright 2017-2022 Pranav Pandey\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\ninclude ':sample', 'dynamic-toasts'\n"
  }
]