[
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\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# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# Intellij\n*.iml\n.idea/workspace.xml\n\n# Keystore files\n*.jks\n.idea\n"
  },
  {
    "path": "LICENSE",
    "content": "                   GNU LESSER GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n  This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n  0. Additional Definitions.\n\n  As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n  \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n  An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n  A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library.  The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n  The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n  The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n  1. Exception to Section 3 of the GNU GPL.\n\n  You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n  2. Conveying Modified Versions.\n\n  If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n   a) under this License, provided that you make a good faith effort to\n   ensure that, in the event an Application does not supply the\n   function or data, the facility still operates, and performs\n   whatever part of its purpose remains meaningful, or\n\n   b) under the GNU GPL, with none of the additional permissions of\n   this License applicable to that copy.\n\n  3. Object Code Incorporating Material from Library Header Files.\n\n  The object code form of an Application may incorporate material from\na header file that is part of the Library.  You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n   a) Give prominent notice with each copy of the object code that the\n   Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the object code with a copy of the GNU GPL and this license\n   document.\n\n  4. Combined Works.\n\n  You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n   a) Give prominent notice with each copy of the Combined Work that\n   the Library is used in it and that the Library and its use are\n   covered by this License.\n\n   b) Accompany the Combined Work with a copy of the GNU GPL and this license\n   document.\n\n   c) For a Combined Work that displays copyright notices during\n   execution, include the copyright notice for the Library among\n   these notices, as well as a reference directing the user to the\n   copies of the GNU GPL and this license document.\n\n   d) Do one of the following:\n\n       0) Convey the Minimal Corresponding Source under the terms of this\n       License, and the Corresponding Application Code in a form\n       suitable for, and under terms that permit, the user to\n       recombine or relink the Application with a modified version of\n       the Linked Version to produce a modified Combined Work, in the\n       manner specified by section 6 of the GNU GPL for conveying\n       Corresponding Source.\n\n       1) Use a suitable shared library mechanism for linking with the\n       Library.  A suitable mechanism is one that (a) uses at run time\n       a copy of the Library already present on the user's computer\n       system, and (b) will operate properly with a modified version\n       of the Library that is interface-compatible with the Linked\n       Version.\n\n   e) Provide Installation Information, but only if you would otherwise\n   be required to provide such information under section 6 of the\n   GNU GPL, and only to the extent that such information is\n   necessary to install and execute a modified version of the\n   Combined Work produced by recombining or relinking the\n   Application with a modified version of the Linked Version. (If\n   you use option 4d0, the Installation Information must accompany\n   the Minimal Corresponding Source and Corresponding Application\n   Code. If you use option 4d1, you must provide the Installation\n   Information in the manner specified by section 6 of the GNU GPL\n   for conveying Corresponding Source.)\n\n  5. Combined Libraries.\n\n  You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n   a) Accompany the combined library with a copy of the same work based\n   on the Library, uncombined with any other library facilities,\n   conveyed under the terms of this License.\n\n   b) Give prominent notice with the combined library that part of it\n   is a work based on the Library, and explaining where to find the\n   accompanying uncombined form of the same work.\n\n  6. Revised Versions of the GNU Lesser General Public License.\n\n  The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n  Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n  If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n"
  },
  {
    "path": "README.md",
    "content": "[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R21LO82)\n\n# Toasty\n[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14) [![](https://jitpack.io/v/GrenderG/Toasty.svg)](https://jitpack.io/#GrenderG/Toasty) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Toasty-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5102)\n\n<div align=\"center\">\n\t<img src=\"https://raw.githubusercontent.com/GrenderG/Toasty/master/art/web_hi_res_512.png\" width=\"128\">\n</div>\n\nThe usual Toast, but with steroids.\n\n## Prerequisites\n\nAdd this in your root `build.gradle` file (**not** your module `build.gradle` file):\n\n```gradle\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url \"https://jitpack.io\" }\n\t}\n}\n```\n\n## Dependency\n\nAdd this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):\n\n```gradle\ndependencies {\n\t...\n\timplementation 'com.github.GrenderG:Toasty:1.5.2'\n}\n```\n\n## Configuration\n\nThis step is optional, but if you want you can configure some Toasty parameters. Place this anywhere in your app:\n\n```java\nToasty.Config.getInstance()\n    .tintIcon(boolean tintIcon) // optional (apply textColor also to the icon)\n    .setToastTypeface(@NonNull Typeface typeface) // optional\n    .setTextSize(int sizeInSp) // optional\n    .allowQueue(boolean allowQueue) // optional (prevents several Toastys from queuing)\n    .setGravity(int gravity, int xOffset, int yOffset) // optional (set toast gravity, offsets are optional)\n    .supportDarkTheme(boolean supportDarkTheme) // optional (whether to support dark theme or not)\n    .setRTL(boolean isRTL) // optional (icon is on the right)\n    .apply(); // required\n```\n\nYou can reset the configuration by using `reset()` method:\n\n```java\nToasty.Config.reset();\n```\n\n## Usage\n\nEach method always returns a `Toast` object, so you can customize the Toast much more. **DON'T FORGET THE `show()` METHOD!**\n\nTo display an error Toast:\n\n``` java\nToasty.error(yourContext, \"This is an error toast.\", Toast.LENGTH_SHORT, true).show();\n```\nTo display a success Toast:\n\n``` java\nToasty.success(yourContext, \"Success!\", Toast.LENGTH_SHORT, true).show();\n```\nTo display an info Toast:\n\n``` java\nToasty.info(yourContext, \"Here is some info for you.\", Toast.LENGTH_SHORT, true).show();\n```\nTo display a warning Toast:\n\n``` java\nToasty.warning(yourContext, \"Beware of the dog.\", Toast.LENGTH_SHORT, true).show();\n```\nTo display the usual Toast:\n\n``` java\nToasty.normal(yourContext, \"Normal toast w/o icon\").show();\n```\nTo display the usual Toast with icon:\n\n``` java\nToasty.normal(yourContext, \"Normal toast w/ icon\", yourIconDrawable).show();\n```\n\nYou can also create your custom Toasts with the `custom()` method:\n``` java\nToasty.custom(yourContext, \"I'm a custom Toast\", yourIconDrawable, tintColor, duration, withIcon, \nshouldTint).show();\n```\n### Extra\n[You can pass formatted text to Toasty!](https://github.com/GrenderG/Toasty/blob/master/app/src/main/java/es/dmoral/toastysample/MainActivity.java#L98-L107)\n\n**There are variants of each method, feel free to explore this library.**\n\n## Screenshots\n\n**Please click the image below to enlarge.**\n\n<img src=\"https://raw.githubusercontent.com/GrenderG/Toasty/master/art/collage.png\">\n\n## Third Party Bindings\n\n### React Native\nYou may now use this library with [React Native](https://github.com/facebook/react-native) via this [module](https://github.com/prscX/react-native-toasty).\n\nApps using Toasty\n--\n\nWant to be here? Open an `issue` or make a `pull request`.\n\n<table>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=cheetatech.com.colorhub\"><img src=\"https://archive.org/download/ic_launcher_colorhub/ic_launcher_colorhub.png\" width=\"64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=cheetatech.com.colorhub\">ColorHub - Color Palette</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.fa.daily.free\"><img src=\"https://lh3.googleusercontent.com/rXB22UBHujsK2uYpN-kAkVFBjTcnAp6ltSZYf9-LdYvRkM-kF-xtwPwR8kEInhludA=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.fa.daily.free\">Daily – News flipped around</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=es.jmoral.ozreader\"><img src=\"https://lh3.googleusercontent.com/ISQPSPA__uWU4Csw4N0quI0IPi_WcWN0pY4PK86yljf39vaCObvohT9ak2ubQ7iLDQ=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=es.jmoral.ozreader\">Oz! Comic Reader</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.andreacioccarelli.impactor\"><img src=\"https://lh3.googleusercontent.com/KxzCiu-csleONAW9kfAYBCaCe4iAnhyO1ziuKjKK_yEDE0xPQMfy_-sYVYkj4RBE-Srt=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.andreacioccarelli.impactor\">Impactor Unroot</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.andreacioccarelli.fusemounter\"><img src=\"https://lh3.googleusercontent.com/7e0iTo60TJXz6U-zQl6pXcfgRCLifQaTp_DczwNA5ZSnrEssBwH6K0MU88gC9BzQlMY=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.andreacioccarelli.fusemounter\">Fusemounter</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.thesrb.bluewords&referrer=utm_source%3Dgithub%26utm_medium%3Dtoasty%26utm_content%3Dlogo%26utm_campaign%3Dreadme\"><img src=\"https://lh3.googleusercontent.com/gdGrQHkHsfRAY9ivf8wt9vgaX9KPxpFHdFq5AXY_zw2P8Wat3KNstvf-BkNaKrNX8Qg=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.thesrb.bluewords&referrer=utm_source%3Dgithub%26utm_medium%3Dtoasty%26utm_content%3Dname%26utm_campaign%3Dreadme\">BlueWords</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.levionsoftware.instagram_map\"><img src=\"https://lh3.googleusercontent.com/QL0QDLXBm9j2Y2An4MOZtlbI02yx_zuI7I3vMBM_mBO_BbimNKjBQeldQBBKo0P60Og=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.levionsoftware.instagram_map\">Photo Map - Photo and Video Gallery</a></td>\n\t</tr>\n\t<tr>\n        <td><a href=\"https://play.google.com/store/apps/details?id=com.sunshine.makilite\"><img src=\"https://lh3.googleusercontent.com/RL082J8D9AyVJdyoT8sN8Mb47LUJEn3ssvp8jgrke_K_sWAXgEl9F8tjudqDoL7y5A0=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.sunshine.makilite\">Maki for Facebook & Twitter</a></td>\n\t</tr>\n\t\t<tr>\n            <td><a href=\"https://play.google.com/store/apps/details?id=com.KillerBLS.modpeide\"><img src=\"https://lh3.googleusercontent.com/nyB12hF6cPHBrm532qQQslvj-X-klmPlKuQ4Z0MYKDpt4sPVZmWYRZ_SShEfVcTmhg=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.KillerBLS.modpeide\">ModPE IDE</a></td>\n\t</tr>\n\t\t<tr>\n            <td><a href=\"https://play.google.com/store/apps/details?id=stream.rocketnotes\"><img src=\"https://lh3.googleusercontent.com/tYGJBG8mc7lwC0ZxQUxif2FVMFI8L8xRkPON0ytkWVPTI67ggkrgDl3JpRu9jW0W3sLJ=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=stream.rocketnotes\">Rocket Notes</a></td>\n\t</tr>\n\t<tr>\n            <td><a href=\"https://play.google.com/store/apps/details?id=com.thirtydegreesray.openhub\"><img src=\"https://lh3.googleusercontent.com/XP-tvaGf-as9XMQ3kcUjohSZlSD7uyf_AcHsjq6jTI0chXWK1yQrnJJs2Y_Pvbe1FRQ=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=com.thirtydegreesray.openhub\">OpenHub for GitHub</a></td>\n\t</tr>\n\t<tr>\n            <td><a href=\"https://play.google.com/store/apps/details?id=org.openhab.habdroid\"><img src=\"https://lh3.googleusercontent.com/RhinsfPN8qFHQDyPKssmiPl4P_-JJpw7GaQO4K7TVixMjrkZsPh0NPXlL2nJRrR4PAbw=w64\"/></a></td>\n\t\t<td><a href=\"https://play.google.com/store/apps/details?id=org.openhab.habdroid\">openHAB</a></td>\n\t</tr>\n\t<tr>\n                <td><a href=\"https://play.google.com/store/apps/details?id=org.saarang.app\"><img src=\"https://lh3.googleusercontent.com/m683OsEgBAU15kdHOSsl-lckDPEa0bdsK2xvhq3Qs4vww-ueJnW8xY0xXfwfMV6dOyE=w64\"/></a></td>\n    \t\t<td><a href=\"https://play.google.com/store/apps/details?id=org.saarang.app\">Saarang</a></td>\n    \t</tr>\n    <tr>\n                <td><a href=\"https://play.google.com/store/apps/details?id=com.dizdarevic.kadcemibus\"><img src=\"https://lh3.googleusercontent.com/LFUKgzu8S1V8TSLg3aiFoA7dkfUYmQg6s8lVUSPJYEkv6564UKjaUKhYcqvFMyDbSas=w64\"/></a></td>\n            <td><a href=\"https://play.google.com/store/apps/details?id=com.dizdarevic.kadcemibus\">Kad ce mi bus - red voznje</a></td>\n    </tr>\n    <tr>\n            <td><a href=\"https://play.google.com/store/apps/details?id=com.katyayini.hidefiles\"><img src=\"https://lh3.googleusercontent.com/hq2dLHXjKoTonzE45uJKzkGfCUSSh0_IJZBnuRIyb8G_EbcpYT5_gPv942yrIKlyo12r=s64-rw\"/></a></td>\n        \t<td><a href=\"https://play.google.com/store/apps/details?id=com.katyayini.hidefiles\">Hide Files</a></td>\n        </tr>\n    \t<tr>\n            <td><a href=\"https://github.com/nikothegreek/logviewer-for-openhab-app\"><img src=\"https://i.imgur.com/a6RbPkJ.png\"/></a></td>\n        \t<td><a href=\"https://github.com/nikothegreek/logviewer-for-openhab-app\">LogViewer for openHAB</a></td>\n        </tr>\n</table>\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion rootProject.ext.compileSdkVersion\n\n    defaultConfig {\n        applicationId \"es.dmoral.toastysample\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(include: ['*.jar'], dir: 'libs')\n    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {\n        exclude group: 'com.android.support', module: 'support-annotations'\n    })\n    implementation \"androidx.appcompat:appcompat:$supportLibVersion\"\n    testImplementation 'junit:junit:4.12'\n    implementation project(':toasty')\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /home/grender/Android/Sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "app/src/androidTest/java/es/dmoral/toastysample/ExampleInstrumentedTest.java",
    "content": "package es.dmoral.toastysample;\n\nimport android.content.Context;\nimport androidx.test.InstrumentationRegistry;\nimport androidx.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * Instrumentation test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"es.dmoral.toastysample\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"es.dmoral.toastysample\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/java/es/dmoral/toastysample/MainActivity.java",
    "content": "package es.dmoral.toastysample;\n\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport android.os.Bundle;\nimport androidx.appcompat.app.AppCompatActivity;\nimport android.text.Spannable;\nimport android.text.SpannableStringBuilder;\nimport android.text.style.StyleSpan;\nimport android.view.View;\n\nimport es.dmoral.toasty.Toasty;\n\nimport static android.graphics.Typeface.BOLD_ITALIC;\n\n/**\n * This file is part of Toasty.\n *\n * Toasty is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Toasty is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Toasty.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npublic class MainActivity extends AppCompatActivity {\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        findViewById(R.id.button_error_toast).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.error(MainActivity.this, R.string.error_message, Toasty.LENGTH_SHORT, true).show();\n            }\n        });\n        findViewById(R.id.button_success_toast).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.success(MainActivity.this, R.string.success_message, Toasty.LENGTH_SHORT, true).show();\n            }\n        });\n        findViewById(R.id.button_info_toast).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.info(MainActivity.this, R.string.info_message, Toasty.LENGTH_SHORT, true).show();\n            }\n        });\n        findViewById(R.id.button_warning_toast).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.warning(MainActivity.this, R.string.warning_message, Toasty.LENGTH_SHORT, true).show();\n            }\n        });\n        findViewById(R.id.button_normal_toast_wo_icon).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.normal(MainActivity.this, R.string.normal_message_without_icon).show();\n            }\n        });\n        findViewById(R.id.button_normal_toast_w_icon).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Drawable icon = getResources().getDrawable(R.drawable.ic_pets_white_48dp);\n                Toasty.normal(MainActivity.this, R.string.normal_message_with_icon, icon).show();\n            }\n        });\n        findViewById(R.id.button_info_toast_with_formatting).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.info(MainActivity.this, getFormattedMessage()).show();\n            }\n        });\n        findViewById(R.id.button_custom_config).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View view) {\n                Toasty.Config.getInstance()\n                        .setToastTypeface(Typeface.createFromAsset(getAssets(), \"PCap Terminal.otf\"))\n                        .allowQueue(false)\n                        .apply();\n                Toasty.custom(MainActivity.this, R.string.custom_message, getResources().getDrawable(R.drawable.laptop512),\n                        android.R.color.black, android.R.color.holo_green_light, Toasty.LENGTH_SHORT, true, true).show();\n                Toasty.Config.reset(); // Use this if you want to use the configuration above only once\n            }\n        });\n    }\n\n    private CharSequence getFormattedMessage() {\n        final String prefix = \"Formatted \";\n        final String highlight = \"bold italic\";\n        final String suffix = \" text\";\n        SpannableStringBuilder ssb = new SpannableStringBuilder(prefix).append(highlight).append(suffix);\n        int prefixLen = prefix.length();\n        ssb.setSpan(new StyleSpan(BOLD_ITALIC),\n                prefixLen, prefixLen + highlight.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n        return ssb;\n    }\n}\n"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/activity_main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\"es.dmoral.toastysample.MainActivity\">\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:paddingBottom=\"@dimen/activity_vertical_margin\"\n        android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n        android:paddingRight=\"@dimen/activity_horizontal_margin\"\n        android:paddingTop=\"@dimen/activity_vertical_margin\">\n\n        <Button\n            android:text=\"@string/error_toast\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_error_toast\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/success_toast\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_error_toast\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_success_toast\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/info_toast\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_success_toast\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_info_toast\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/info_toast_with_formatting\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@id/button_info_toast\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_info_toast_with_formatting\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/warning_toast\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_info_toast_with_formatting\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\"\n            android:id=\"@+id/button_warning_toast\" />\n\n        <Button\n            android:text=\"@string/normal_toast_without_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_warning_toast\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_normal_toast_wo_icon\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/normal_toast_with_icon\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_normal_toast_wo_icon\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_normal_toast_w_icon\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n        <Button\n            android:text=\"@string/custom_configuration\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_below=\"@+id/button_normal_toast_w_icon\"\n            android:layout_alignParentLeft=\"true\"\n            android:layout_alignParentStart=\"true\"\n            android:id=\"@+id/button_custom_config\"\n            android:layout_alignParentRight=\"true\"\n            android:layout_alignParentEnd=\"true\" />\n\n    </RelativeLayout>\n</ScrollView>\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Toasty Sample</string>\n    <string name=\"normal_toast_with_icon\">NORMAL TOAST (WITH ICON)</string>\n    <string name=\"normal_toast_without_icon\">NORMAL TOAST (WITHOUT ICON)</string>\n    <string name=\"warning_toast\">WARNING TOAST</string>\n    <string name=\"info_toast\">INFO TOAST</string>\n    <string name=\"info_toast_with_formatting\">INFO TOAST WITH FORMATTING</string>\n    <string name=\"error_toast\">ERROR TOAST</string>\n    <string name=\"success_toast\">SUCCESS TOAST</string>\n    <string name=\"custom_configuration\">CUSTOM CONFIGURATION</string>\n\n    <string name=\"error_message\">This is an error toast.</string>\n    <string name=\"success_message\">Success!</string>\n    <string name=\"info_message\">Here is some info for you.</string>\n    <string name=\"warning_message\">Beware of the dog.</string>\n    <string name=\"normal_message_without_icon\">Normal toast w/o icon</string>\n    <string name=\"normal_message_with_icon\">Normal toast w/ icon</string>\n    <string name=\"custom_message\">sudo kill -9 everyone</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "app/src/test/java/es/dmoral/toastysample/ExampleUnitTest.java",
    "content": "package es.dmoral.toastysample;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:4.1.3'\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n        google()\n    }\n}\n\next {\n    compileSdkVersion = 31\n    minSdkVersion = 14\n    targetSdkVersion = compileSdkVersion\n\n    supportLibVersion = '1.3.1'\n\n    versionCode = 152\n    versionName = '1.5.2'\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sun Sep 05 22:23:56 CEST 2021\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-6.5-bin.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# POM\nPOM_URL=https://github.com/GrenderG/Toasty\n\nPOM_SCM_URL=https://github.com/GrenderG/Toasty\nPOM_SCM_CONNECTION=scm:git@github.com:GrenderG/Toasty.git\nPOM_SCM_DEV_CONNECTION=scm:git@github.com:GrenderG/Toasty.git\nPOM_SCM_URL_ISSUES=https://github.com/GrenderG/Toasty/issues\n\nPOM_GITHUB_REPO=GrenderG/Toasty\nPOM_GITHUB_README=README.md\n\nPOM_LICENCE_NAME=The GNU Lesser General Public License, Version 3.0\nPOM_LICENCE_URL=http://www.gnu.org/licenses/lgpl-3.0.html\nPOM_LICENCE_DIST=repo\nPOM_DEVELOPER_ID=GrenderG\nPOM_DEVELOPER_NAME=GrenderG\n\n# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\nandroid.enableJetifier=true\nandroid.useAndroidX=true\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\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%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':toasty'\n"
  },
  {
    "path": "toasty/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "toasty/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'com.github.dcendents.android-maven'\ngroup = 'com.github.GrenderG'\nversion = rootProject.ext.versionName\n\nandroid {\n    compileSdkVersion rootProject.ext.compileSdkVersion\n\n    defaultConfig {\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode rootProject.ext.versionCode\n        versionName rootProject.ext.versionName\n\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation \"androidx.appcompat:appcompat:$supportLibVersion\"\n}\n"
  },
  {
    "path": "toasty/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 /home/grender/Android/Sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "toasty/src/androidTest/java/es/dmoral/toasty/ExampleInstrumentedTest.java",
    "content": "package es.dmoral.toasty;\n\nimport android.content.Context;\nimport androidx.test.InstrumentationRegistry;\nimport androidx.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumentation test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"es.dmoral.toasty.test\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "toasty/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"es.dmoral.toasty\">\n\n</manifest>\n"
  },
  {
    "path": "toasty/src/main/java/es/dmoral/toasty/Toasty.java",
    "content": "package es.dmoral.toasty;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.content.res.Configuration;\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport androidx.annotation.CheckResult;\nimport androidx.annotation.ColorInt;\nimport androidx.annotation.ColorRes;\nimport androidx.annotation.DrawableRes;\nimport androidx.annotation.NonNull;\nimport androidx.annotation.StringRes;\nimport android.os.Build;\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\n/**\n * This file is part of Toasty.\n * <p>\n * Toasty is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * <p>\n * Toasty is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n * <p>\n * You should have received a copy of the GNU General Public License\n * along with Toasty.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n@SuppressLint(\"InflateParams\")\npublic class Toasty {\n    private static final Typeface LOADED_TOAST_TYPEFACE = Typeface.create(\"sans-serif-condensed\", Typeface.NORMAL);\n    private static Typeface currentTypeface = LOADED_TOAST_TYPEFACE;\n    private static int textSize = 16; // in SP\n\n    private static boolean tintIcon = true;\n    private static boolean allowQueue = true;\n    private static int toastGravity = -1;\n    private static int xOffset = -1;\n    private static int yOffset = -1;\n    private static boolean supportDarkTheme = true;\n    private static boolean isRTL = false;\n\n    private static Toast lastToast = null;\n\n    public static final int LENGTH_SHORT = Toast.LENGTH_SHORT;\n    public static final int LENGTH_LONG = Toast.LENGTH_LONG;\n\n    private Toasty() {\n        // avoiding instantiation\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @StringRes int message) {\n        return normal(context, context.getString(message), Toast.LENGTH_SHORT, null, false);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @NonNull CharSequence message) {\n        return normal(context, message, Toast.LENGTH_SHORT, null, false);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @StringRes int message, Drawable icon) {\n        return normal(context, context.getString(message), Toast.LENGTH_SHORT, icon, true);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @NonNull CharSequence message, Drawable icon) {\n        return normal(context, message, Toast.LENGTH_SHORT, icon, true);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @StringRes int message, int duration) {\n        return normal(context, context.getString(message), duration, null, false);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @NonNull CharSequence message, int duration) {\n        return normal(context, message, duration, null, false);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @StringRes int message, int duration,\n                               Drawable icon) {\n        return normal(context, context.getString(message), duration, icon, true);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @NonNull CharSequence message, int duration,\n                               Drawable icon) {\n        return normal(context, message, duration, icon, true);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @StringRes int message, int duration,\n                               Drawable icon, boolean withIcon) {\n        return normalWithDarkThemeSupport(context, context.getString(message), icon, duration, withIcon);\n    }\n\n    @CheckResult\n    public static Toast normal(@NonNull Context context, @NonNull CharSequence message, int duration,\n                               Drawable icon, boolean withIcon) {\n        return normalWithDarkThemeSupport(context, message, icon, duration, withIcon);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @StringRes int message) {\n        return warning(context, context.getString(message), Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @NonNull CharSequence message) {\n        return warning(context, message, Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @StringRes int message, int duration) {\n        return warning(context, context.getString(message), duration, true);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @NonNull CharSequence message, int duration) {\n        return warning(context, message, duration, true);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @StringRes int message, int duration, boolean withIcon) {\n        return custom(context, context.getString(message), ToastyUtils.getDrawable(context, R.drawable.ic_error_outline_white_24dp),\n                ToastyUtils.getColor(context, R.color.warningColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast warning(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) {\n        return custom(context, message, ToastyUtils.getDrawable(context, R.drawable.ic_error_outline_white_24dp),\n                ToastyUtils.getColor(context, R.color.warningColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @StringRes int message) {\n        return info(context, context.getString(message), Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @NonNull CharSequence message) {\n        return info(context, message, Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @StringRes int message, int duration) {\n        return info(context, context.getString(message), duration, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @NonNull CharSequence message, int duration) {\n        return info(context, message, duration, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @StringRes int message, int duration, boolean withIcon) {\n        return custom(context, context.getString(message), ToastyUtils.getDrawable(context, R.drawable.ic_info_outline_white_24dp),\n                ToastyUtils.getColor(context, R.color.infoColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast info(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) {\n        return custom(context, message, ToastyUtils.getDrawable(context, R.drawable.ic_info_outline_white_24dp),\n                ToastyUtils.getColor(context, R.color.infoColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @StringRes int message) {\n        return success(context, context.getString(message), Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @NonNull CharSequence message) {\n        return success(context, message, Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @StringRes int message, int duration) {\n        return success(context, context.getString(message), duration, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @NonNull CharSequence message, int duration) {\n        return success(context, message, duration, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @StringRes int message, int duration, boolean withIcon) {\n        return custom(context, context.getString(message), ToastyUtils.getDrawable(context, R.drawable.ic_check_white_24dp),\n                ToastyUtils.getColor(context, R.color.successColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast success(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) {\n        return custom(context, message, ToastyUtils.getDrawable(context, R.drawable.ic_check_white_24dp),\n                ToastyUtils.getColor(context, R.color.successColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @StringRes int message) {\n        return error(context, context.getString(message), Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @NonNull CharSequence message) {\n        return error(context, message, Toast.LENGTH_SHORT, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @StringRes int message, int duration) {\n        return error(context, context.getString(message), duration, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @NonNull CharSequence message, int duration) {\n        return error(context, message, duration, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @StringRes int message, int duration, boolean withIcon) {\n        return custom(context, context.getString(message), ToastyUtils.getDrawable(context, R.drawable.ic_clear_white_24dp),\n                ToastyUtils.getColor(context, R.color.errorColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast error(@NonNull Context context, @NonNull CharSequence message, int duration, boolean withIcon) {\n        return custom(context, message, ToastyUtils.getDrawable(context, R.drawable.ic_clear_white_24dp),\n                ToastyUtils.getColor(context, R.color.errorColor), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, true);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @StringRes int message, Drawable icon,\n                               int duration, boolean withIcon) {\n        return custom(context, context.getString(message), icon, -1, ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, false);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @NonNull CharSequence message, Drawable icon,\n                               int duration, boolean withIcon) {\n        return custom(context, message, icon, -1, ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, false);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @StringRes int message, @DrawableRes int iconRes,\n                               @ColorRes int tintColorRes, int duration,\n                               boolean withIcon, boolean shouldTint) {\n        return custom(context, context.getString(message), ToastyUtils.getDrawable(context, iconRes),\n                ToastyUtils.getColor(context, tintColorRes), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, shouldTint);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @NonNull CharSequence message, @DrawableRes int iconRes,\n                               @ColorRes int tintColorRes, int duration,\n                               boolean withIcon, boolean shouldTint) {\n        return custom(context, message, ToastyUtils.getDrawable(context, iconRes),\n                ToastyUtils.getColor(context, tintColorRes), ToastyUtils.getColor(context, R.color.defaultTextColor),\n                duration, withIcon, shouldTint);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @StringRes int message, Drawable icon,\n                               @ColorRes int tintColorRes, int duration,\n                               boolean withIcon, boolean shouldTint) {\n        return custom(context, context.getString(message), icon, ToastyUtils.getColor(context, tintColorRes),\n                ToastyUtils.getColor(context, R.color.defaultTextColor), duration, withIcon, shouldTint);\n    }\n\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @StringRes int message, Drawable icon,\n                               @ColorRes int tintColorRes, @ColorRes int textColorRes, int duration,\n                               boolean withIcon, boolean shouldTint) {\n        return custom(context, context.getString(message), icon, ToastyUtils.getColor(context, tintColorRes),\n                ToastyUtils.getColor(context, textColorRes), duration, withIcon, shouldTint);\n    }\n\n    @SuppressLint(\"ShowToast\")\n    @CheckResult\n    public static Toast custom(@NonNull Context context, @NonNull CharSequence message, Drawable icon,\n                               @ColorInt int tintColor, @ColorInt int textColor, int duration,\n                               boolean withIcon, boolean shouldTint) {\n        final Toast currentToast = Toast.makeText(context, \"\", duration);\n        final View toastLayout = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))\n                .inflate(R.layout.toast_layout, null);\n        final LinearLayout toastRoot = toastLayout.findViewById(R.id.toast_root);\n        final ImageView toastIcon = toastLayout.findViewById(R.id.toast_icon);\n        final TextView toastTextView = toastLayout.findViewById(R.id.toast_text);\n        Drawable drawableFrame;\n\n        if (shouldTint)\n            drawableFrame = ToastyUtils.tint9PatchDrawableFrame(context, tintColor);\n        else\n            drawableFrame = ToastyUtils.getDrawable(context, R.drawable.toast_frame);\n        ToastyUtils.setBackground(toastLayout, drawableFrame);\n\n        if (withIcon) {\n            if (icon == null)\n                throw new IllegalArgumentException(\"Avoid passing 'icon' as null if 'withIcon' is set to true\");\n            if (isRTL && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)\n                toastRoot.setLayoutDirection(View.LAYOUT_DIRECTION_RTL);\n            ToastyUtils.setBackground(toastIcon, tintIcon ? ToastyUtils.tintIcon(icon, textColor) : icon);\n        } else {\n            toastIcon.setVisibility(View.GONE);\n        }\n\n        toastTextView.setText(message);\n        toastTextView.setTextColor(textColor);\n        toastTextView.setTypeface(currentTypeface);\n        toastTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize);\n\n        currentToast.setView(toastLayout);\n\n        if (!allowQueue) {\n            if (lastToast != null)\n                lastToast.cancel();\n            lastToast = currentToast;\n        }\n\n        // Make sure to use default values for non-specified ones.\n        currentToast.setGravity(\n                toastGravity == -1 ? currentToast.getGravity() : toastGravity,\n                xOffset == -1 ? currentToast.getXOffset() : xOffset,\n                yOffset == -1 ? currentToast.getYOffset() : yOffset\n        );\n\n        return currentToast;\n    }\n\n    private static Toast normalWithDarkThemeSupport(@NonNull Context context, @NonNull CharSequence message, Drawable icon,\n                                                    int duration, boolean withIcon) {\n        if (supportDarkTheme && Build.VERSION.SDK_INT >= 29) {\n            int uiMode = context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;\n            if (uiMode == Configuration.UI_MODE_NIGHT_NO) {\n                return withLightTheme(context, message, icon, duration, withIcon);\n            }\n            return withDarkTheme(context, message, icon, duration, withIcon);\n        } else {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {\n                return withLightTheme(context, message, icon, duration, withIcon);\n            } else {\n                return withDarkTheme(context, message, icon, duration, withIcon);\n            }\n        }\n    }\n\n    private static Toast withLightTheme(@NonNull Context context, @NonNull CharSequence message, Drawable icon,\n                                        int duration, boolean withIcon) {\n        return custom(context, message, icon, ToastyUtils.getColor(context, R.color.defaultTextColor),\n                ToastyUtils.getColor(context, R.color.normalColor), duration, withIcon, true);\n    }\n\n    private static Toast withDarkTheme(@NonNull Context context, @NonNull CharSequence message, Drawable icon,\n                                       int duration, boolean withIcon) {\n        return custom(context, message, icon, ToastyUtils.getColor(context, R.color.normalColor),\n                ToastyUtils.getColor(context, R.color.defaultTextColor), duration, withIcon, true);\n    }\n\n    public static class Config {\n        private Typeface typeface = Toasty.currentTypeface;\n        private int textSize = Toasty.textSize;\n\n        private boolean tintIcon = Toasty.tintIcon;\n        private boolean allowQueue = true;\n        private int toastGravity = Toasty.toastGravity;\n        private int xOffset = Toasty.xOffset;\n        private int yOffset = Toasty.yOffset;\n        private boolean supportDarkTheme = true;\n        private boolean isRTL = false;\n\n        private Config() {\n            // avoiding instantiation\n        }\n\n        @CheckResult\n        public static Config getInstance() {\n            return new Config();\n        }\n\n        public static void reset() {\n            Toasty.currentTypeface = LOADED_TOAST_TYPEFACE;\n            Toasty.textSize = 16;\n            Toasty.tintIcon = true;\n            Toasty.allowQueue = true;\n            Toasty.toastGravity = -1;\n            Toasty.xOffset = -1;\n            Toasty.yOffset = -1;\n            Toasty.supportDarkTheme = true;\n            Toasty.isRTL = false;\n        }\n\n        @CheckResult\n        public Config setToastTypeface(@NonNull Typeface typeface) {\n            this.typeface = typeface;\n            return this;\n        }\n\n        @CheckResult\n        public Config setTextSize(int sizeInSp) {\n            this.textSize = sizeInSp;\n            return this;\n        }\n\n        @CheckResult\n        public Config tintIcon(boolean tintIcon) {\n            this.tintIcon = tintIcon;\n            return this;\n        }\n\n        @CheckResult\n        public Config allowQueue(boolean allowQueue) {\n            this.allowQueue = allowQueue;\n            return this;\n        }\n      \n        @CheckResult\n        public Config setGravity(int gravity, int xOffset, int yOffset) {\n            this.toastGravity = gravity;\n            this.xOffset = xOffset;\n            this.yOffset = yOffset;\n            return this;\n        }\n      \n        @CheckResult\n        public Config setGravity(int gravity) {\n            this.toastGravity = gravity;\n            return this;\n        }\n\n        @CheckResult\n        public Config supportDarkTheme(boolean supportDarkTheme) {\n            this.supportDarkTheme = supportDarkTheme;\n            return this;\n        }\n         \n        public Config setRTL(boolean isRTL) {\n            this.isRTL = isRTL;\n            return this;\n        }\n\n        public void apply() {\n            Toasty.currentTypeface = typeface;\n            Toasty.textSize = textSize;\n            Toasty.tintIcon = tintIcon;\n            Toasty.allowQueue = allowQueue;\n            Toasty.toastGravity = toastGravity;\n            Toasty.xOffset = xOffset;\n            Toasty.yOffset = yOffset;\n            Toasty.supportDarkTheme = supportDarkTheme;\n            Toasty.isRTL = isRTL;\n        }\n    }\n}\n"
  },
  {
    "path": "toasty/src/main/java/es/dmoral/toasty/ToastyUtils.java",
    "content": "package es.dmoral.toasty;\n\nimport android.content.Context;\nimport android.graphics.PorterDuff;\nimport android.graphics.drawable.Drawable;\nimport android.graphics.drawable.NinePatchDrawable;\nimport android.os.Build;\nimport androidx.annotation.ColorInt;\nimport androidx.annotation.ColorRes;\nimport androidx.annotation.DrawableRes;\nimport androidx.annotation.NonNull;\nimport androidx.core.content.ContextCompat;\nimport androidx.appcompat.content.res.AppCompatResources;\nimport android.view.View;\n\n/**\n * This file is part of Toasty.\n * \n * Toasty is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * \n * Toasty is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n * \n * You should have received a copy of the GNU General Public License\n * along with Toasty.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nfinal class ToastyUtils {\n    private ToastyUtils() {\n    }\n\n    static Drawable tintIcon(@NonNull Drawable drawable, @ColorInt int tintColor) {\n        drawable.setColorFilter(tintColor, PorterDuff.Mode.SRC_IN);\n        return drawable;\n    }\n\n    static Drawable tint9PatchDrawableFrame(@NonNull Context context, @ColorInt int tintColor) {\n        final NinePatchDrawable toastDrawable = (NinePatchDrawable) getDrawable(context, R.drawable.toast_frame);\n        return tintIcon(toastDrawable, tintColor);\n    }\n\n    static void setBackground(@NonNull View view, Drawable drawable) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)\n            view.setBackground(drawable);\n        else\n            view.setBackgroundDrawable(drawable);\n    }\n\n    static Drawable getDrawable(@NonNull Context context, @DrawableRes int id) {\n        return AppCompatResources.getDrawable(context, id);\n    }\n\n    static int getColor(@NonNull Context context, @ColorRes int color){\n        return ContextCompat.getColor(context, color);\n    }\n}\n"
  },
  {
    "path": "toasty/src/main/res/drawable/ic_check_white_24dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z\" />\n</vector>\n"
  },
  {
    "path": "toasty/src/main/res/drawable/ic_clear_white_24dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z\" />\n</vector>\n"
  },
  {
    "path": "toasty/src/main/res/drawable/ic_error_outline_white_24dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z\" />\n</vector>\n"
  },
  {
    "path": "toasty/src/main/res/drawable/ic_info_outline_white_24dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"24dp\"\n    android:height=\"24dp\"\n    android:tint=\"#FFFFFF\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z\" />\n</vector>\n"
  },
  {
    "path": "toasty/src/main/res/layout/toast_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/toast_root\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:fitsSystemWindows=\"false\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\"\n    tools:ignore=\"UseCompoundDrawables\">\n\n    <ImageView\n        android:id=\"@+id/toast_icon\"\n        android:layout_width=\"24dp\"\n        android:layout_height=\"24dp\"\n        android:layout_marginEnd=\"8dp\"\n        android:layout_marginRight=\"8dp\"\n        android:contentDescription=\"@string/toast_message\" />\n\n    <TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:id=\"@+id/toast_text\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n\n</LinearLayout>"
  },
  {
    "path": "toasty/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"defaultTextColor\">#FFFFFF</color>\n    <color name=\"errorColor\">#D50000</color>\n    <color name=\"infoColor\">#3F51B5</color>\n    <color name=\"successColor\">#388E3C</color>\n    <color name=\"warningColor\">#FFA900</color>\n    <color name=\"normalColor\">#353A3E</color>\n</resources>\n"
  },
  {
    "path": "toasty/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Toasty</string>\n    <string name=\"toast_message\">Toast message</string>\n</resources>\n"
  },
  {
    "path": "toasty/src/test/java/es/dmoral/toasty/ExampleUnitTest.java",
    "content": "package es.dmoral.toasty;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  }
]