[
  {
    "path": ".gitignore",
    "content": "### Android ###\n# Built application files\n*.apk\n*.ap_\n*.aab\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\n.gradle/\nbuild/\n/*/build/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log Files\n*.log\n\n# Android Studio captures folder\ncaptures/\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n#IntelliJ files\n*.iml\n.idea/\n/_misc\n/_sign\n\n# Keystore files\n*.jks\n*.keystore\n\n# External native build folder\n.externalNativeBuild\n\n# OS-specific files\n.DS_Store"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2023 Sergey Ivanov\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": "# MaterialBanner [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MaterialBanner-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/7605)\n> A banner displays a prominent message and related optional actions.\n\nMaterialBanner is a library that provides an implementation of the banner widget from the Material design.\n\n[Banners - Material Design](https://material.io/design/components/banners.html).\n\n![MaterialBanner animation](SCREENSHOTS/materialbanner_animation.gif)\n\n# Preview\n\n![MaterialBanner](SCREENSHOTS/screenshot.jpg)\n\nYou can download the sample app here.\n\n# Setup\n\n## Legacy (version 1.2.0): Add the gradle dependency\n\n```\njcenter {\n    content {\n        includeGroup \"com.sergivonavi\"\n    }\n}\n```\n\n```\nimplementation \"com.sergivonavi:materialbanner:1.2.0\"\n```\n\n## Latest (version 2.0.0)\n\nDownload sources and add the MaterialBanner library to your project.\n\n## Check your theme\n\nIn order to use this banner your app theme should inherit from a Material Components theme.\n\nMore about that: [Getting Started - Material Components for Android](https://material.io/develop/android/docs/getting-started/).\n\n## Create your banner\n\n### In your `layout.xml`:\n\n```\n<com.sergivonavi.materialbanner.Banner\n    android:id=\"@+id/banner\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:visibility=\"gone\" // don't hide if you want to show this banner everytime\n    app:buttonLeftText=\"Dismiss\"\n    app:buttonRightText=\"Turn on wifi\"\n    app:icon=\"@drawable/ic_signal_wifi_off_40dp\"\n    app:messageText=\"You have lost connection to the Internet.\" />\n```\n\nthen in your Activity/Fragment:\n\n```\nBanner banner = findViewById(R.id.banner);\nbanner.setLeftButtonListener(new BannerInterface.OnClickListener() {\n    @Override\n    public void onClick(BannerInterface banner) {\n        // do something\n    }\n});\nbanner.setRightButtonListener(new BannerInterface.OnClickListener() {\n    @Override\n    public void onClick(BannerInterface banner) {\n        // do something\n    }\n});\n// show when needed\nbanner.show();\n\n// and later on\nbanner.dismiss();\n```\n\n### From the code using [Builder](https://github.com/sergivonavi/MaterialBanner/blob/7b9c7776e90c18bdde33c94c78d4652442c078eb/library/src/main/java/com/sergivonavi/materialbanner/Banner.java#L1094):\n\n```\nBanner banner = new Banner.Builder(context).setParent(rootView)\n    .setIcon(R.drawable.ic_signal_wifi_off_40dp)\n    .setMessage(\"You have lost connection to the Internet. This app is offline.\")\n    .setLeftButton(\"Dismiss\", new BannerInterface.OnClickListener() {\n        @Override\n        public void onClick(BannerInterface banner) {\n            banner.dismiss();\n        }\n    })\n    .setRightButton(\"Turn on wifi\", new BannerInterface.OnClickListener() {\n        @Override\n        public void onClick(BannerInterface banner) {\n            // do something\n        }\n    })\n    .create(); // or show() if you want to show the Banner immediately\n    \n    ...\n    \n    banner.show();\n```\n\n__DO NOT forget__ to call _Builder#setParent(...)_.\nPass here a ViewGroup that will be a parent for your banner.\n\nOr you can use:\n* _setParent(ViewGroup, int)_ to specify the index of the banner in ViewGroup's hierarchy;\n* _setParent(ViewGroup, int, ViewGroup.LayoutParams)_ to change the default LayoutParams.\n\n### Note\n\nYou don't need to set both left and right buttons: you can set one of them (doesn't matter which one).\n\n# Additional setup\n\n## Add listeners\n\nIf you want to know when your banner was shown or dismissed you can set appropriate listeners from [BannerInterface](library/src/main/java/com/sergivonavi/materialbanner/BannerInterface.java):\n\n```\nbanner.setOnDismissListener(new BannerInterface.OnDismissListener() {\n    @Override\n    public void onDismiss() {\n        // do something\n    }\n})\nbanner.setOnShowListener(new BannerInterface.OnShowListener() {\n    @Override\n    public void onShow() {\n        // do something\n    }\n})\n```\n\nOr chain these calls to the Builder:\n\n```\nnew Banner.Builder(context)\n    ...\n    .setOnDismissListener(new BannerInterface.OnDismissListener() {\n        @Override\n        public void onDismiss() {\n            // do something\n        }\n    })\n    .setOnShowListener(new BannerInterface.OnShowListener() {\n        @Override\n        public void onShow() {\n            // do something\n        }\n    })\n    ...\n```\n\n# Styling\n\nFor the style guidelines read [Banners - theming](https://material.io/design/components/banners.html#theming).\n\n## Changing style of a single banner\n\n### In your `layout.xml`\n\nAvailable attributes:\n* backgroundColor\n* iconTint\n* messageTextAppearance\n* messageTextColor\n* buttonsTextAppearance\n* buttonsTextColor\n* buttonsRippleColor\n* lineColor\n* lineOpacity\n\nUsage:\n\n```\n<com.sergivonavi.materialbanner.Banner\n    ...\n    app:backgroundColor=\"@color/custom_background\"\n    app:iconTint=\"@color/custom_icon_tint\"\n    app:messageTextAppearance=\"@style/BannerMessageTextAppearance\"\n    app:messageTextColor=\"@color/custom_message_text\"\n    app:buttonsTextAppearance=\"@style/BannerButtonsTextAppearance\"\n    app:buttonsTextColor=\"@color/custom_buttons_text\"\n    app:buttonsRippleColor=\"@color/custom_buttons_ripple\"\n    app:lineColor=\"@color/custom_line\"\n    app:lineOpacity=\"0.8\" />\n```\n\n### From the code\nAvailable methods:\n* setBackgroundColor\n* setIconTintColor\n* setMessageTextAppearance\n* setMessageTextColor\n* setButtonsTextAppearance\n* setButtonsTextColor\n* setButtonsRippleColor\n* setLineColor\n* setLineOpacity\n\nUsage:\n\n```\nbanner.setBackgroundColor(ContextCompat.getColor(this, R.color.custom_background));\nbanner.setIconTintColor(R.color.custom_icon_tint);\nbanner.setMessageTextAppearance(R.style.BannerMessageTextAppearance);\nbanner.setMessageTextColor(R.color.custom_message_text);\nbanner.setButtonsTextAppearance(R.style.BannerButtonsTextAppearance);\nbanner.setButtonsTextColor(R.color.custom_buttons_text);\nbanner.setButtonsRippleColor(R.color.custom_buttons_ripple);\nbanner.setLineColor(R.color.custom_line);\nbanner.setLineOpacity(0.8f);\n```\n\n## Global style\n\nYou can change style of your banner globally.\n\nAdd _bannerStyle_ attribute to your theme:\n\n```\n<style name=\"CustomTheme\" parent=\"Theme.MaterialComponents.Light.DarkActionBar\">\n    ...\n    <item name=\"bannerStyle\">@style/CustomBanner</item>\n</style>\n```\n\nAnd create your custom style (you can inherit from the provided default banner styles):\n\n```\n<style name=\"CustomBanner\" parent=\"@style/Widget.Material.Banner\">\n    <!-- change what you want --> \n    <item name=\"messageTextAppearance\">@style/BannerMessageTextAppearance</item>\n    <item name=\"buttonsTextAppearance\">@style/BannerButtonsTextAppearance</item>\n    ...\n</style>\n\n<style name=\"BannerMessageTextAppearance\" parent=\"TextAppearance.Banner.Message\">\n    <item name=\"android:textSize\">16sp</item>\n    ...\n</style>\n\n<style name=\"BannerButtonsTextAppearance\" parent=\"TextAppearance.Banner.Button\">\n    <item name=\"android:textStyle\">bold</item>\n    ...\n</style>\n```\n\n## Change padding of the banner's content to fit your layout\n\nIf you want to do something like this:\n![Banner in wide layout](https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F170Vf6civyniR4ROILotY0usRMAB0lgSL%2Fbanners-placement-desktop.png)\nYou can change the content's padding using provided attributes or methods:\n* attr: contentPaddingStart\n* attr: contentPaddingEnd\n* setContentPaddingStart\n* setContentPaddingEnd\n\nBut account for the default padding:\n* the end padding is always __16dp__ (a distance between the button's last character and the end edge of a banner)\n* the start padding depends on a user's device\n\nOn mobile:\n* the start padding is always __16dp__ regardless if icon set or not\n\nOn tablet (sw720dp):\n* the start padding depends whether icon set or not\n  * if set then __16dp__\n  * otherwise __24dp__\n  \nSee [Banners - specs](https://material.io/design/components/banners.html#specs) for visualisation.\n\n### Example\n\n1. If the content of your screen has __32dp__ margin from both sides and you set an icon then you can set __16dp__ padding for your banner:\n\n```\napp:contentPaddingEnd=\"16dp\"\napp:contentPaddingStart=\"16dp\"\n\nor\n\nbanner.setContentPaddingStart(R.dimen.banner_content_padding);\nbanner.setContentPaddingEnd(R.dimen.banner_content_padding);\n```\n\n2. Everything is the same but no icon:\n* for mobile devices - __16dp__ padding from both sides;\n* for tablets\n  * __16dp__ end padding\n  * __8dp__ start padding (32dp margin - 24dp margin of the message)\n  \nSee the sample app for example.\n\n### Note\n\n__DO NOT__ set padding directly using the default padding attributes or methods. It will break the appearance of the widget.\n\n# License\n\n    Copyright 2023 Sergey Ivanov\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": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "plugins {\n    id(\"com.android.application\")\n    id(\"org.jetbrains.kotlin.android\")\n}\napply from: \"../_sign/signing.gradle\"\n\nandroid {\n    namespace \"com.sergivonavi.materialbanner.app\"\n    compileSdk setup.compileSdk\n\n    defaultConfig {\n        applicationId \"com.sergivonavi.materialbanner.app\"\n        minSdk setup.minSdk\n        targetSdk setup.targetSdk\n        versionCode release.appVersionCode\n        versionName release.appVersionName\n        vectorDrawables.useSupportLibrary = true\n\n        resValue(\"string\", \"materialbanner_app_version\", \"${versionName}\")\n    }\n    buildTypes {\n        release {\n            minifyEnabled = false\n            proguardFiles(getDefaultProguardFile(\"proguard-android-optimize.txt\"), \"proguard-rules.pro\")\n\n            signingConfig signingConfigs.release\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_1_8\n        targetCompatibility = JavaVersion.VERSION_1_8\n    }\n    lint {\n        abortOnError = false\n    }\n}\n\ndependencies {\n    implementation project(\":library\")\n    implementation(\"org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}\")\n    implementation(\"androidx.appcompat:appcompat:1.6.0\")\n    implementation(\"androidx.cardview:cardview:1.0.0\")\n    implementation(\"androidx.core:core-ktx:1.9.0\")\n    implementation(\"androidx.recyclerview:recyclerview:1.2.1\")\n    implementation(\"com.google.android.material:material:${versions.material}\")\n    implementation(\"com.squareup.picasso:picasso:2.71828\")\n}"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\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-keepclasseswithmembers class **.R$* {\n    public static final int define_*;\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    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <application\n        android:name=\".App\"\n        android:allowBackup=\"false\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\"\n        tools:ignore=\"GoogleAppIndexingWarning\">\n        <activity\n            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        <activity\n            android:name=\".AboutActivity\"\n            android:label=\"@string/menu_about\" />\n        <activity\n            android:name=\".activities.ShowcaseActivity\"\n            android:label=\"@string/demo_showcase\" />\n        <activity\n            android:name=\".activities.FromCodeActivity\"\n            android:label=\"@string/demo_from_code\" />\n        <activity\n            android:name=\".activities.FromLayoutActivity\"\n            android:label=\"@string/demo_from_layout\" />\n        <activity\n            android:name=\".activities.StyledBannerActivity\"\n            android:label=\"@string/demo_styled\" />\n        <activity\n            android:name=\".activities.GlobalStyleActivity\"\n            android:label=\"@string/demo_global_style\"\n            android:theme=\"@style/CustomTheme\" />\n        <activity\n            android:name=\".activities.WithPaddingActivity\"\n            android:label=\"@string/demo_with_padding\" />\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/assets/fonts/LICENSE.txt",
    "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 [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "app/src/main/assets/pics/CREDITS.txt",
    "content": "Photo by Mike Meeks on Unsplash: https://unsplash.com/photos/zk-fclJdGas\nPhoto by Alireza Etemadi on Unsplash: https://unsplash.com/photos/qrDbj7OV2EU\nPhoto by Artur Rutkowski on Unsplash: https://unsplash.com/photos/-Ps6CdiazxI\nPhoto by Karly Gomez on Unsplash: https://unsplash.com/photos/_EqjV7bHBB4\nPhoto by Monika Grabkowska on Unsplash: https://unsplash.com/photos/HAf-cOayGiQ\nPhoto by Conor Luddy on Unsplash: https://unsplash.com/photos/mKaszdVnteY\nPhoto by Alex Loup on Unsplash: https://unsplash.com/photos/aX_ljOOyWJY\nPhoto by Alexandra Gornago on Unsplash: https://unsplash.com/photos/_B7shfNUXEA\nPhoto by Reuben Mcfeeters on Unsplash: https://unsplash.com/photos/qnCzQRAoIr4\nPhoto by Brina Blum on Unsplash: https://unsplash.com/photos/surQ2mkZNxw"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/AboutActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app\n\nimport android.os.Bundle\nimport android.text.Html\nimport android.widget.TextView\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.text.HtmlCompat\n\nclass AboutActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_about)\n\n        val description = findViewById<TextView>(R.id.description)\n        description.text =\n            HtmlCompat.fromHtml(\n                getString(com.sergivonavi.materialbanner.R.string.library_MaterialBanner_libraryDescription),\n                HtmlCompat.FROM_HTML_MODE_LEGACY\n            )\n        val appVersion = findViewById<TextView>(R.id.version_app)\n        appVersion.text = String.format(\n            getString(R.string.about_app_version),\n            getString(R.string.materialbanner_app_version)\n        )\n        val libVersion = findViewById<TextView>(R.id.version_lib)\n        libVersion.text = String.format(\n            getString(R.string.about_lib_version),\n            getString(com.sergivonavi.materialbanner.R.string.materialbanner_lib_version)\n        )\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/App.kt",
    "content": "package com.sergivonavi.materialbanner.app\n\nimport android.app.Application\nimport androidx.appcompat.app.AppCompatDelegate\n\nclass App : Application() {\n    init {\n        AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/MainActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport android.view.View\nimport android.widget.Button\nimport androidx.appcompat.app.AppCompatActivity\nimport com.sergivonavi.materialbanner.app.activities.*\n\nclass MainActivity : AppCompatActivity(), View.OnClickListener {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        val btn1 = findViewById<Button>(R.id.btn_showcase)\n        val btn2 = findViewById<Button>(R.id.btn_from_layout)\n        val btn3 = findViewById<Button>(R.id.btn_from_activity)\n        val btn4 = findViewById<Button>(R.id.btn_styled)\n        val btn5 = findViewById<Button>(R.id.btn_global_style)\n        val btn6 = findViewById<Button>(R.id.btn_with_padding)\n        btn1.setOnClickListener(this)\n        btn2.setOnClickListener(this)\n        btn3.setOnClickListener(this)\n        btn4.setOnClickListener(this)\n        btn5.setOnClickListener(this)\n        btn6.setOnClickListener(this)\n    }\n\n    override fun onClick(v: View) {\n        val intent = Intent()\n        when (v.id) {\n            R.id.btn_showcase -> intent.setClass(this@MainActivity, ShowcaseActivity::class.java)\n            R.id.btn_from_layout -> intent.setClass(\n                this@MainActivity,\n                FromLayoutActivity::class.java\n            )\n            R.id.btn_from_activity -> intent.setClass(\n                this@MainActivity,\n                FromCodeActivity::class.java\n            )\n            R.id.btn_styled -> intent.setClass(this@MainActivity, StyledBannerActivity::class.java)\n            R.id.btn_global_style -> intent.setClass(\n                this@MainActivity,\n                GlobalStyleActivity::class.java\n            )\n            R.id.btn_with_padding -> intent.setClass(\n                this@MainActivity,\n                WithPaddingActivity::class.java\n            )\n        }\n        startActivity(intent)\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.main, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        if (item.itemId == R.id.menu_about) {\n            startActivity(Intent(this@MainActivity, AboutActivity::class.java))\n            return true\n        }\n        return false\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/BaseSampleActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport androidx.annotation.LayoutRes\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.recyclerview.widget.GridLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport com.sergivonavi.materialbanner.Banner\nimport com.sergivonavi.materialbanner.app.R\nimport com.sergivonavi.materialbanner.app.activities.adapter.ItemsAdapter\n\nabstract class BaseSampleActivity : AppCompatActivity() {\n    protected lateinit var mBanner: Banner\n\n    @LayoutRes\n    protected abstract fun setLayoutView(): Int\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(setLayoutView())\n\n        val recyclerView = findViewById<RecyclerView>(R.id.recycler_view)\n        val adapter = ItemsAdapter(this)\n        recyclerView.layoutManager = GridLayoutManager(this, 2)\n        recyclerView.adapter = adapter\n    }\n\n    override fun onCreateOptionsMenu(menu: Menu): Boolean {\n        menuInflater.inflate(R.menu.sample, menu)\n        return true\n    }\n\n    override fun onOptionsItemSelected(item: MenuItem): Boolean {\n        if (item.itemId == R.id.menu_toggle_banner) {\n            if (mBanner.isShown) {\n                mBanner.dismiss()\n            } else {\n                mBanner.show()\n            }\n            return true\n        }\n        return false\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/FromCodeActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport android.view.ViewGroup\nimport com.sergivonavi.materialbanner.Banner\nimport com.sergivonavi.materialbanner.app.R\nimport com.sergivonavi.materialbanner.app.utils.SnackbarHelper\n\nclass FromCodeActivity : BaseSampleActivity() {\n\n    override fun setLayoutView(): Int {\n        return R.layout.sample_activity_from_code\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        // The root view for the banner\n        val rootView = findViewById<ViewGroup>(R.id.root)\n        mBanner = Banner.Builder(this).setParent(rootView)\n            .setIcon(R.drawable.ic_signal_wifi_off_40dp)\n            .setMessage(R.string.banner_message)\n            .setLeftButton(R.string.banner_btn_left) { banner ->\n                SnackbarHelper.show(rootView, R.string.msg_banner_btnleft)\n                banner.dismiss()\n            }\n            .setRightButton(R.string.banner_btn_right) { banner ->\n                SnackbarHelper.show(rootView, R.string.msg_banner_btnright)\n                // Dismiss with 0.5 sec delay\n                banner.dismiss(500)\n            }\n            .setOnShowListener { banner ->\n                SnackbarHelper.show(rootView, R.string.msg_banner_onshow)\n                // banner?.setMessage(\"New message in onShowListener\")\n            }\n            .setOnDismissListener { banner ->\n                SnackbarHelper.show(rootView, R.string.msg_banner_ondismiss)\n                // banner?.setMessage(\"New message in onDismissListener\")\n            }\n            .create()\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/FromLayoutActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport android.view.ViewGroup\nimport com.sergivonavi.materialbanner.app.R\nimport com.sergivonavi.materialbanner.app.utils.SnackbarHelper\n\nclass FromLayoutActivity : BaseSampleActivity() {\n\n    override fun setLayoutView(): Int {\n        return R.layout.sample_activity_from_layout\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        val rootView = findViewById<ViewGroup>(R.id.root)\n\n        mBanner = findViewById(R.id.banner)\n        mBanner.setLeftButtonListener { banner ->\n            SnackbarHelper.show(rootView, R.string.msg_banner_btnleft)\n            banner.dismiss()\n        }\n        mBanner.setRightButtonListener { banner ->\n            SnackbarHelper.show(rootView, R.string.msg_banner_btnright)\n            // Dismiss with 0.5 sec delay\n            banner.dismiss(500)\n        }\n        mBanner.setOnShowListener { SnackbarHelper.show(rootView, R.string.msg_banner_onshow) }\n        mBanner.setOnDismissListener {\n            SnackbarHelper.show(rootView, R.string.msg_banner_ondismiss)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/GlobalStyleActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport android.view.ViewGroup\nimport com.sergivonavi.materialbanner.app.R\nimport com.sergivonavi.materialbanner.app.utils.SnackbarHelper\n\nclass GlobalStyleActivity : BaseSampleActivity() {\n\n    override fun setLayoutView(): Int {\n        return R.layout.sample_activity_global_style\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        // The magic of styling is done in the activity's theme \"CustomTheme\"\n        val rootView = findViewById<ViewGroup>(R.id.root)\n        mBanner = findViewById(R.id.banner)\n        mBanner.setLeftButtonListener { banner ->\n            SnackbarHelper.show(rootView, R.string.msg_banner_btnleft)\n            banner.dismiss()\n        }\n        mBanner.setRightButtonListener {banner ->\n            SnackbarHelper.show(rootView, R.string.msg_banner_btnright)\n            banner.dismiss(500)\n        }\n        mBanner.setOnShowListener { SnackbarHelper.show(rootView, R.string.msg_banner_onshow) }\n        mBanner.setOnDismissListener {\n            SnackbarHelper.show(rootView, R.string.msg_banner_ondismiss)\n        }\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/ShowcaseActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\nimport com.sergivonavi.materialbanner.app.R\n\nclass ShowcaseActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.sample_activity_showcase)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/StyledBannerActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.content.ContextCompat\nimport com.sergivonavi.materialbanner.Banner\nimport com.sergivonavi.materialbanner.app.R\n\nclass StyledBannerActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.sample_activity_styled_banner)\n\n        // You can do the same from the code\n        val banner = Banner.Builder(this).setParent((findViewById<View>(R.id.root) as ViewGroup))\n            .setIcon(R.drawable.ic_signal_wifi_off_40dp)\n            .setMessage(R.string.banner_message3)\n            .setLeftButton(R.string.banner_btn_left, null)\n            .setRightButton(R.string.banner_btn_right, null)\n            .create()\n        banner.setBackgroundColor(ContextCompat.getColor(this, R.color.custom_background))\n        banner.setMessageTextAppearance(R.style.BannerMessageTextAppearance)\n        banner.setMessageTextColor(R.color.custom_message_text)\n        banner.setIconTintColor(R.color.custom_icon_tint)\n        // banner.setFont(getString(R.string.font_medium_path));\n        // banner.setMessageFont(getString(R.string.font_medium_path));\n        // banner.setButtonsFont(getString(R.string.font_medium_path));\n        banner.setButtonsTextAppearance(R.style.BannerButtonsTextAppearance)\n        banner.setButtonsTextColor(R.color.custom_buttons_text)\n        banner.setLeftButtonTextColor(R.color.custom_button_left_text)\n        // banner.setRightButtonTextColor(R.color.custom_button_right_text);\n        banner.setButtonsRippleColor(R.color.custom_buttons_text)\n        banner.setLineColor(R.color.custom_line)\n        banner.setLineOpacity(0.8f)\n\n        // And then show this banner\n        banner.show()\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/WithPaddingActivity.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities\n\nimport android.os.Bundle\nimport androidx.appcompat.app.AppCompatActivity\nimport com.sergivonavi.materialbanner.app.R\n\nclass WithPaddingActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.sample_activity_with_padding)\n\n        /*\n        // You can do the same thing here\n\n        banner.setContentPaddingStart(dimensionResource);\n        banner.setContentPaddingEnd(dimensionResource);\n\n        or\n\n        banner.setContentPaddingStartPx(paddingInPixels);\n        banner.setContentPaddingEndPx(paddingInPixels);\n        */\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/adapter/ItemViewHolder.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities.adapter\n\nimport android.view.View\nimport android.widget.ImageView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.sergivonavi.materialbanner.app.R\n\ninternal class ItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n    @JvmField\n    var image: ImageView\n\n    init {\n        image = itemView.findViewById(R.id.item_image)\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/adapter/ItemsAdapter.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities.adapter\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.RecyclerView\nimport com.sergivonavi.materialbanner.app.R\nimport com.squareup.picasso.Picasso\nimport java.util.*\n\ninternal class ItemsAdapter(context: Context?) : RecyclerView.Adapter<ItemViewHolder>() {\n    private val mLayoutInflater: LayoutInflater\n    private val mList: MutableList<String?> = ArrayList()\n\n    init {\n        mLayoutInflater = LayoutInflater.from(context)\n\n        // Ensure we get a different ordering of images on each run.\n        Collections.addAll(mList, *SampleData.ASSETS)\n        mList.shuffle()\n\n        // Triple up the list.\n        val copy = ArrayList(mList)\n        mList.addAll(copy)\n        mList.addAll(copy)\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemViewHolder {\n        return ItemViewHolder(mLayoutInflater.inflate(R.layout.item_list, parent, false))\n    }\n\n    override fun onBindViewHolder(holder: ItemViewHolder, position: Int) {\n        holder.image.post {\n            Picasso.get()\n                .load(mList[position])\n                .resize(holder.image.width, holder.image.height)\n                .centerCrop()\n                .into(holder.image)\n        }\n    }\n\n    override fun getItemCount(): Int {\n        return mList.size\n    }\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/activities/adapter/SampleData.kt",
    "content": "package com.sergivonavi.materialbanner.app.activities.adapter\n\ninternal object SampleData {\n    private const val BASE = \"file:///android_asset/pics/\"\n    private const val EXT = \".jpg\"\n\n    @JvmField\n    val ASSETS = arrayOf(\n        BASE + \"1\" + EXT, BASE + \"2\" + EXT, BASE + \"3\" + EXT, BASE + \"4\" + EXT,\n        BASE + \"5\" + EXT, BASE + \"6\" + EXT, BASE + \"7\" + EXT, BASE + \"8\" + EXT,\n        BASE + \"9\" + EXT, BASE + \"10\" + EXT\n    )\n}"
  },
  {
    "path": "app/src/main/java/com/sergivonavi/materialbanner/app/utils/SnackbarHelper.kt",
    "content": "package com.sergivonavi.materialbanner.app.utils\n\nimport android.view.View\nimport com.google.android.material.snackbar.Snackbar\n\nobject SnackbarHelper {\n    fun show(view: View?, msg: Int) {\n        Snackbar.make(view!!, msg, Snackbar.LENGTH_SHORT).show()\n    }\n}"
  },
  {
    "path": "app/src/main/res/drawable/ic_banner_circle_40dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"40dp\"\n    android:height=\"40dp\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#969696\"\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</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#008577\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_signal_wifi_off_40dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"40dp\"\n    android:height=\"40dp\"\n    android:tint=\"?colorPrimary\"\n    android:viewportWidth=\"24.0\"\n    android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M23.64,7c-0.45,-0.34 -4.93,-4 -11.64,-4 -1.5,0 -2.89,0.19 -4.15,0.48L18.18,13.8 23.64,7zM17.04,15.22L3.27,1.44 2,2.72l2.05,2.06C1.91,5.76 0.59,6.82 0.36,7l11.63,14.49 0.01,0.01 0.01,-0.01 3.9,-4.86 3.32,3.32 1.27,-1.27 -3.46,-3.46z\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeWidth=\"1\"\n        android:strokeColor=\"#00000000\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeWidth=\"1\"\n        android:strokeColor=\"#00000000\" />\n</vector>\n"
  },
  {
    "path": "app/src/main/res/layout/activity_about.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        android:padding=\"16dp\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_marginBottom=\"16dp\"\n            android:text=\"@string/library_MaterialBanner_libraryName\"\n            android:textAppearance=\"@style/TextAppearance.MaterialComponents.Headline6\" />\n\n        <TextView\n            android:id=\"@+id/description\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"8dp\"\n            android:textAppearance=\"@style/TextAppearance.MaterialComponents.Body1\" />\n\n        <TextView\n            android:id=\"@+id/version_app\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\" />\n\n        <TextView\n            android:id=\"@+id/version_lib\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"16dp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:autoLink=\"web\"\n            android:text=\"@string/library_MaterialBanner_repositoryLink\" />\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:layout_marginTop=\"16dp\"\n            android:layout_marginBottom=\"16dp\"\n            android:background=\"#EEEEEE\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"16dp\"\n            android:text=\"Open Source Licenses\"\n            android:textSize=\"18sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"16dp\"\n            android:text=\"The open source libraries used in this demo app:\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"16dp\"\n            android:text=\"Picasso\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:autoLink=\"web\"\n            android:text=\"@string/picasso_license\" />\n\n    </LinearLayout>\n\n</ScrollView>"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\"\n    tools:context=\".MainActivity\">\n\n    <Button\n        android:id=\"@+id/btn_showcase\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_showcase\" />\n\n    <Button\n        android:id=\"@+id/btn_from_layout\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_from_layout\" />\n\n    <Button\n        android:id=\"@+id/btn_from_activity\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_from_code\" />\n\n    <Button\n        android:id=\"@+id/btn_styled\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_styled\" />\n\n    <Button\n        android:id=\"@+id/btn_global_style\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_global_style\" />\n\n    <Button\n        android:id=\"@+id/btn_with_padding\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/demo_with_padding\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/item_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.cardview.widget.CardView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_margin=\"4dp\">\n\n    <ImageView\n        android:id=\"@+id/item_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"120dp\"\n        android:adjustViewBounds=\"true\" />\n\n</androidx.cardview.widget.CardView>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_from_code.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.core.widget.NestedScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/scroll_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:id=\"@+id/root\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/recycler_view\"\n            style=\"@style/RecyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n\n    </LinearLayout>\n\n</androidx.core.widget.NestedScrollView>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_from_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.core.widget.NestedScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/scroll_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:id=\"@+id/root\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <com.sergivonavi.materialbanner.Banner\n            android:id=\"@+id/banner\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:visibility=\"gone\"\n            app:buttonLeftText=\"@string/banner_btn_left\"\n            app:buttonRightText=\"@string/banner_btn_right\"\n            app:icon=\"@drawable/ic_signal_wifi_off_40dp\"\n            app:messageText=\"@string/banner_message\" />\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/recycler_view\"\n            style=\"@style/RecyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n\n    </LinearLayout>\n\n</androidx.core.widget.NestedScrollView>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_global_style.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<androidx.core.widget.NestedScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/scroll_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout\n        android:id=\"@+id/root\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <com.sergivonavi.materialbanner.Banner\n            android:id=\"@+id/banner\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:visibility=\"gone\"\n            app:buttonLeftText=\"@string/banner_btn_left\"\n            app:buttonRightText=\"@string/banner_btn_right\"\n            app:icon=\"@drawable/ic_signal_wifi_off_40dp\"\n            app:messageText=\"@string/banner_message\" />\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/recycler_view\"\n            style=\"@style/RecyclerView\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n\n    </LinearLayout>\n\n</androidx.core.widget.NestedScrollView>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_showcase.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <com.sergivonavi.materialbanner.Banner\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:buttonLeftText=\"@string/banner_showcase_button\"\n        app:messageText=\"@string/banner_showcase_message_1\" />\n\n    <com.sergivonavi.materialbanner.Banner\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:buttonLeftText=\"@string/banner_showcase_button\"\n        app:buttonRightText=\"@string/banner_showcase_button\"\n        app:messageText=\"@string/banner_showcase_message_2\" />\n\n    <com.sergivonavi.materialbanner.Banner\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:icon=\"@drawable/ic_banner_circle_40dp\"\n        app:buttonLeftText=\"@string/banner_showcase_button\"\n        app:buttonRightText=\"@string/banner_showcase_button\"\n        app:messageText=\"@string/banner_showcase_message_2\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_styled_banner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/root\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <com.sergivonavi.materialbanner.Banner\n        android:id=\"@+id/banner\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:backgroundColor=\"@color/custom_background\"\n        app:buttonLeftText=\"@string/banner_btn_left\"\n        app:buttonRightText=\"@string/banner_btn_right\"\n        app:buttonsRippleColor=\"@color/custom_buttons_text\"\n        app:buttonsTextAppearance=\"@style/BannerButtonsTextAppearance\"\n        app:buttonsTextColor=\"@color/custom_buttons_text\"\n        app:buttonRightTextColor=\"@color/custom_button_right_text\"\n        app:icon=\"@drawable/ic_signal_wifi_off_40dp\"\n        app:iconTint=\"@color/custom_icon_tint\"\n        app:lineColor=\"@color/custom_line\"\n        app:lineOpacity=\"0.8\"\n        app:messageText=\"@string/banner_message2\"\n        app:messageTextAppearance=\"@style/BannerMessageTextAppearance\"\n        app:messageTextColor=\"@color/custom_message_text\" />\n\n    <com.sergivonavi.materialbanner.Banner\n        android:id=\"@+id/banner_font\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:backgroundColor=\"@color/custom_background\"\n        app:buttonLeftText=\"@string/banner_btn_left\"\n        app:buttonRightText=\"@string/banner_btn_right\"\n        app:buttonsRippleColor=\"@color/custom_buttons_text\"\n        app:buttonsTextColor=\"@color/custom_buttons_text\"\n        app:icon=\"@drawable/ic_signal_wifi_off_40dp\"\n        app:iconTint=\"@color/custom_icon_tint\"\n        app:lineColor=\"@color/custom_line\"\n        app:lineOpacity=\"0.8\"\n        app:fontPath=\"@string/font_medium_path\"\n        app:messageText=\"@string/banner_message4\"\n        app:messageTextAppearance=\"@style/BannerMessageTextAppearance\"\n        app:messageTextColor=\"@color/custom_message_text\" />\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"8dp\"\n        android:gravity=\"center\"\n        android:text=\"@string/styling_warning\"\n        android:textSize=\"16sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/sample_activity_with_padding.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/long_text_background\"\n    android:orientation=\"vertical\">\n\n    <com.sergivonavi.materialbanner.Banner\n        android:id=\"@+id/banner\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:buttonLeftText=\"@string/banner_btn_left\"\n        app:buttonRightText=\"@string/banner_btn_right\"\n        app:contentPaddingEnd=\"@dimen/banner_content_padding_end\"\n        app:contentPaddingStart=\"@dimen/banner_content_padding_start\"\n        app:messageText=\"@string/banner_message\" />\n\n    <androidx.cardview.widget.CardView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginLeft=\"32dp\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginRight=\"32dp\">\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"16dp\"\n            android:text=\"@string/long_text\" />\n    </androidx.cardview.widget.CardView>\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/menu/main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu 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/menu_about\"\n        app:showAsAction=\"always|withText\" />\n\n</menu>"
  },
  {
    "path": "app/src/main/res/menu/sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu 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_toggle_banner\"\n        android:title=\"@string/menu_toggle\"\n        app:showAsAction=\"always|withText\" />\n\n</menu>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@mipmap/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n    <color name=\"colorSurface\">#FFFFFF</color>\n    <color name=\"colorOnSurface\">#000000</color>\n\n    <color name=\"custom_background\">#FFE082</color>\n    <color name=\"custom_icon_tint\">#303F9F</color>\n    <color name=\"custom_message_text\">#388E3C</color>\n    <color name=\"custom_buttons_text\">#7B1FA2</color>\n    <color name=\"custom_button_left_text\">#FF5722</color>\n    <color name=\"custom_button_right_text\">#AAAAAA</color>\n    <color name=\"custom_line\">#d32f2f</color>\n\n    <color name=\"customTheme_colorPrimary\">#1976D2</color>\n    <color name=\"customTheme_colorPrimaryDark\">#0D47A1</color>\n    <color name=\"customTheme_colorAccent\">#448AFF</color>\n    <color name=\"customTheme_colorSurface\">#E3F2FD</color>\n    <color name=\"customTheme_colorOnSurface\">#1E88E5</color>\n    <color name=\"customTheme_colorBackground\">#E3F2FD</color>\n\n    <color name=\"long_text_background\">#EEEEEE</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <dimen name=\"banner_content_padding_start\">16dp</dimen>\n    <dimen name=\"banner_content_padding_end\">16dp</dimen>\n\n</resources>"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">MaterialBanner</string>\n\n    <string name=\"font_medium_path\">fonts/Roboto-Medium.ttf</string>\n\n    <string name=\"demo_showcase\">Showcase</string>\n    <string name=\"demo_from_layout\">Banner from layout</string>\n    <string name=\"demo_from_code\">Banner from code</string>\n    <string name=\"demo_styled\">Styled Banner</string>\n    <string name=\"demo_global_style\">Global Banner Style</string>\n    <string name=\"demo_with_padding\">Banner with padding</string>\n\n    <string name=\"banner_message\">You have lost connection to the Internet. This app is offline.</string>\n    <string name=\"banner_message2\">This is a banner created from the layout.</string>\n    <string name=\"banner_message3\">This is a dynamically created banner.</string>\n    <string name=\"banner_message4\">This is a banner with a custom font.</string>\n    <string name=\"banner_btn_left\">Dismiss</string>\n    <string name=\"banner_btn_right\">Turn on wifi</string>\n\n    <string name=\"banner_showcase_message_1\">This is a short banner message.</string>\n    <string name=\"banner_showcase_message_2\">This is a long banner message. But don\\'t make it too long.</string>\n    <string name=\"banner_showcase_button\">Action</string>\n\n    <string name=\"menu_about\">About</string>\n    <string name=\"menu_toggle\">Toggle Banner</string>\n\n    <string name=\"msg_banner_btnleft\">Banner: Left Button</string>\n    <string name=\"msg_banner_btnright\">Banner: Right Button</string>\n    <string name=\"msg_banner_ondismiss\">Banner: onDismiss</string>\n    <string name=\"msg_banner_onshow\">Banner: onShow</string>\n\n    <string name=\"styling_warning\">This multicolor styling is done only for the showcase purposes.\\nDon\\'t do this in your real apps :)</string>\n    <string name=\"long_text\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</string>\n\n    <string name=\"about_app_version\">App version: %s</string>\n    <string name=\"about_lib_version\">Library version: %s</string>\n\n    <string name=\"picasso_license\">Copyright 2013 Square, Inc.\\n\\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\\n\\nhttp://www.apache.org/licenses/LICENSE-2.0\\n\\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</string>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <style name=\"AppTheme\" parent=\"Theme.MaterialComponents.Light.DarkActionBar\">\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n        <item name=\"colorSurface\">@color/colorSurface</item>\n        <item name=\"colorOnSurface\">@color/colorOnSurface</item>\n    </style>\n\n    <style name=\"CustomTheme\" parent=\"Theme.MaterialComponents.Light.DarkActionBar\">\n        <item name=\"android:colorBackground\">@color/customTheme_colorBackground</item>\n        <item name=\"colorPrimary\">@color/customTheme_colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/customTheme_colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/customTheme_colorAccent</item>\n        <item name=\"colorSurface\">@color/customTheme_colorSurface</item>\n        <item name=\"colorOnSurface\">@color/customTheme_colorOnSurface</item>\n        <item name=\"bannerStyle\">@style/CustomBanner</item>\n    </style>\n\n    <style name=\"RecyclerView\">\n        <item name=\"android:padding\">4dp</item>\n        <item name=\"android:clipToPadding\">false</item>\n    </style>\n\n    <!-- Custom Banner style -->\n    <style name=\"CustomBanner\" parent=\"Widget.Material.Banner\">\n        <item name=\"messageTextAppearance\">@style/BannerMessageTextAppearance</item>\n    </style>\n\n    <style name=\"BannerMessageTextAppearance\" parent=\"TextAppearance.Banner.Message\">\n        <item name=\"android:textSize\">16sp</item>\n    </style>\n\n    <style name=\"BannerButtonsTextAppearance\" parent=\"TextAppearance.Banner.Button\">\n        <item name=\"android:textStyle\">bold</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-sw720dp/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- Notice the 8dp start padding here instead of 16dp. -->\n    <dimen name=\"banner_content_padding_start\">8dp</dimen>\n    <dimen name=\"banner_content_padding_end\">16dp</dimen>\n\n</resources>"
  },
  {
    "path": "build.gradle",
    "content": "buildscript {\n    ext {\n        release = [\n                versionCode   : 4,\n                versionName   : \"2.0.0\",\n                appVersionCode: 4,\n                appVersionName: \"2.0.0\"\n        ]\n        setup = [\n                compileSdk: 33,\n                minSdk    : 14,\n                targetSdk : 33\n        ]\n        versions = [\n                kotlin       : \"1.7.21\",\n                androidX_core: \"1.9.0\",\n                material     : \"1.7.0\"\n        ]\n    }\n    dependencies {\n        classpath(\"org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}\")\n    }\n}\n\nplugins {\n    id(\"com.android.application\") version \"7.4.0\" apply false\n    id(\"com.android.library\") version \"7.4.0\" apply false\n    id(\"org.jetbrains.kotlin.android\") version \"1.7.21\" apply false\n}\n\ntask clean(type: Delete) {\n    delete(rootProject.buildDir)\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sun Jan 22 23:45:09 MSK 2023\ndistributionBase=GRADLE_USER_HOME\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-7.6-bin.zip\ndistributionPath=wrapper/dists\nzipStorePath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\n"
  },
  {
    "path": "gradle-release.gradle.ignore",
    "content": "apply plugin: 'com.github.dcendents.android-maven'\napply plugin: 'com.jfrog.bintray'\n\ngroup = POM_GROUP_ID\nversion = project.release.versionName\n\ninstall {\n    repositories.mavenInstaller {\n        pom {\n            project {\n                packaging 'aar'\n                groupId POM_GROUP_ID\n                artifactId POM_ARTIFACT_ID\n\n                name POM_NAME\n                description POM_DESCRIPTION\n                url POM_SITE_URL\n\n                licenses {\n                    license {\n                        name POM_LICENCE_NAME\n                        url POM_LICENCE_URL\n                    }\n                }\n                developers {\n                    developer {\n                        id POM_DEVELOPER_ID\n                        name POM_DEVELOPER_NAME\n                        email 'sergivonavi@gmail.com'\n                    }\n                }\n                scm {\n                    connection POM_GIT_URL\n                    developerConnection POM_GIT_URL\n                    url POM_SITE_URL\n\n                }\n            }\n        }\n    }\n}\n\nallprojects {\n    tasks.withType(Javadoc) {\n        options.addStringOption('Xdoclint:none', '-quiet')\n        options.addStringOption('encoding', 'UTF-8')\n        options.addStringOption('charSet', 'UTF-8')\n    }\n}\n\ntask androidJavadocs(type: Javadoc) {\n    failOnError = false\n    source = android.sourceSets.main.java.source\n    classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + configurations.compile\n}\n\ntask androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {\n    classifier = 'javadoc'\n    from androidJavadocs.destinationDir\n}\n\ntask androidSourcesJar(type: Jar) {\n    classifier = 'sources'\n    from android.sourceSets.main.java.source\n}\n\nartifacts {\n    archives androidSourcesJar\n    archives androidJavadocsJar\n}\n\n// Bintray\nProperties properties = new Properties()\nproperties.load(project.rootProject.file('local.properties').newDataInputStream())\n\nbintray {\n    user = properties.getProperty(\"bintray.user\")\n    key = properties.getProperty(\"bintray.apikey\")\n\n    configurations = ['archives']\n    pkg {\n        repo = BINTRAY_REPO\n        name = BINTRAY_NAME\n        desc = POM_DESCRIPTION\n        websiteUrl = POM_SITE_URL\n        vcsUrl = POM_GIT_URL\n        licenses = POM_LICENCES\n        publish = true\n        publicDownloadNumbers = true\n        version {\n            desc = POM_DESCRIPTION\n            // released  = new Date()\n            gpg {\n                sign = true\n                passphrase = properties.getProperty(\"bintray.gpg.password\")\n            }\n        }\n    }\n}"
  },
  {
    "path": "gradle.properties",
    "content": "# 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# Picasso\nandroid.enableJetifier=true\n# Enables namespacing of each library's R class so that its R class includes only the\n# resources declared in the library itself and none from the library's dependencies,\n# thereby reducing the size of the R class for that library\nandroid.nonTransitiveRClass=true\n\n# Maven\nBINTRAY_REPO=maven\nBINTRAY_NAME=MaterialBanner\n\nPOM_SITE_URL=https://github.com/sergivonavi/MaterialBanner\nPOM_GIT_URL=https://github.com/sergivonavi/MaterialBanner.git\n\nPOM_LICENCE_NAME=The Apache Software License, Version 2.0\nPOM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt\nPOM_LICENCES=[\"Apache-2.0\"]\n\nPOM_DEVELOPER_ID=sergivonavi\nPOM_DEVELOPER_NAME=Sergey Ivanov\n\nPOM_NAME=library\nPOM_DESCRIPTION=A library that provides an implementation of the banner widget from the Material design\nPOM_GROUP_ID=com.sergivonavi\nPOM_ARTIFACT_ID=materialbanner"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\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\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\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\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\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\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\" -a \"$nonstop\" = \"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# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\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\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\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\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 Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_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=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "library/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "library/build.gradle",
    "content": "plugins {\n    id(\"com.android.library\")\n    id(\"org.jetbrains.kotlin.android\")\n}\n\ndef versionNameSuffix = \"-debug\"\n\nandroid {\n    namespace 'com.sergivonavi.materialbanner'\n    compileSdk setup.compileSdk\n\n    defaultConfig {\n        minSdk setup.minSdk\n        targetSdk setup.targetSdk\n\n        resValue(\"string\", \"materialbanner_lib_version\", \"${project.release.versionName}${versionNameSuffix}\")\n    }\n    buildTypes {\n        release {\n            minifyEnabled = false\n            consumerProguardFiles(\"proguard-rules.pro\")\n\n            resValue(\"string\", \"materialbanner_lib_version\", \"${project.release.versionName}\")\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_1_8\n        targetCompatibility = JavaVersion.VERSION_1_8\n    }\n}\n\ndependencies {\n    implementation(\"org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}\")\n    implementation(\"androidx.core:core:${versions.androidX_core}\")\n    implementation(\"com.google.android.material:material:${versions.material}\")\n}\n\n//apply from: '../gradle-release.gradle'"
  },
  {
    "path": "library/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\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": "library/src/main/AndroidManifest.xml",
    "content": "<manifest />"
  },
  {
    "path": "library/src/main/java/com/sergivonavi/materialbanner/Banner.kt",
    "content": "/*\n * Copyright 2023 Sergey Ivanov\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 */\npackage com.sergivonavi.materialbanner\n\nimport android.animation.*\nimport android.content.Context\nimport android.content.res.ColorStateList\nimport android.graphics.Color\nimport android.graphics.Typeface\nimport android.graphics.drawable.Drawable\nimport android.os.Build\nimport android.os.Parcel\nimport android.os.Parcelable\nimport android.os.Parcelable.Creator\nimport android.util.AttributeSet\nimport android.util.Log\nimport android.view.ContextThemeWrapper\nimport android.view.View\nimport android.view.ViewGroup\nimport android.view.animation.AccelerateDecelerateInterpolator\nimport android.widget.RelativeLayout\nimport androidx.annotation.*\nimport androidx.appcompat.widget.AppCompatImageView\nimport androidx.core.content.ContextCompat\nimport androidx.core.widget.ImageViewCompat\nimport androidx.core.widget.TextViewCompat\nimport com.google.android.material.button.MaterialButton\nimport com.sergivonavi.materialbanner.widget.ButtonsContainer\nimport com.sergivonavi.materialbanner.widget.MessageView\n\n/**\n * A banner displays an important, succinct message, and provides actions for users to address\n * (or dismiss the banner). It requires a user action to be dismissed.\n *\n * Banners should be displayed at the top of the screen, below a top app bar. They are persistent\n * and nonmodal, allowing the user to either ignore them or interact with them at any time.\n *\n * Banners can contain up to two action buttons which are set via [setLeftButton] and\n * [setRightButton] methods.\n *\n * To be notified when a banner has been shown or dismissed, you can provide a\n * [BannerInterface.OnShowListener] and [BannerInterface.OnDismissListener] via\n * [setOnShowListener] and [setOnDismissListener].\n *\n * **Design Guides**\n *\n * For the style and usage guidelines read the\n * [Banners - Material Design](https://material.io/design/components/banners.html).\n */\nclass Banner @JvmOverloads constructor(\n    context: Context,\n    attrs: AttributeSet? = null,\n    defStyleAttr: Int = R.attr.bannerStyle\n) : ViewGroup(context, attrs, defStyleAttr), BannerInterface {\n    @IntDef(value = [VISIBLE, INVISIBLE, GONE])\n    @Retention(AnnotationRetention.SOURCE)\n    private annotation class Visibility\n\n    private lateinit var mContentContainer: RelativeLayout\n    private lateinit var mIconView: AppCompatImageView\n    private lateinit var mMessageView: MessageView\n    private lateinit var mButtonsContainer: ButtonsContainer\n    private lateinit var mLeftButton: MaterialButton\n    private lateinit var mRightButton: MaterialButton\n    private lateinit var mLine: View\n    private var mIcon: Drawable? = null\n    private var mMessageText: CharSequence? = null\n    private var mLeftButtonText: String? = null\n    private var mRightButtonText: String? = null\n    private var mContainerPaddingTopOneLine = 0\n    private var mContainerPaddingTopMultiline = 0\n    private var mIconSize = 0\n    private var mIconMarginStart = 0\n    private var mMessageMarginStart = 0\n    private var mMessageMarginEndSingleLine = 0\n    private var mMessageMarginEndMultiline = 0\n    private var mMessageMarginBottomMultiline = 0\n    private var mMessageMarginBottomWithIcon = 0\n    private var mLineHeight = 0\n\n    /**\n     * Banner's bottom margin.\n     */\n    private var mMarginBottom = 0\n\n    /**\n     * Indicates that the device is at least a 10-inch tablet.\n     */\n    private var mWideLayout = false\n\n    /**\n     * The layout type: [LAYOUT_UNDEFINED], [LAYOUT_SINGLE_LINE] or\n     * [LAYOUT_MULTILINE].\n     */\n    private var mLayoutType = LAYOUT_UNDEFINED\n    private var mLeftButtonListener: BannerInterface.OnClickListener? = null\n    private var mRightButtonListener: BannerInterface.OnClickListener? = null\n    private var mOnDismissListener: BannerInterface.OnDismissListener? = null\n    private var mOnShowListener: BannerInterface.OnShowListener? = null\n\n    private var mIsAnimating = false\n    private var mScheduledShow = false\n    private var mScheduledDismiss = false\n\n    init {\n        loadDimens(context)\n        initViewGroup(context)\n        retrieveAttrs(context, attrs, defStyleAttr)\n    }\n\n    private fun loadDimens(context: Context) {\n        mWideLayout = context.resources.getBoolean(R.bool.mb_wide_layout)\n        mIconSize = getDimen(R.dimen.mb_icon_size)\n        mIconMarginStart = getDimen(R.dimen.mb_icon_margin_start)\n        mMessageMarginStart = getDimen(R.dimen.mb_message_margin_start)\n        mMessageMarginEndSingleLine = getDimen(R.dimen.mb_message_margin_end_singleline)\n        mMessageMarginEndMultiline = getDimen(R.dimen.mb_message_margin_end_multiline)\n        mMessageMarginBottomMultiline = getDimen(R.dimen.mb_message_margin_bottom_multiline)\n        mMessageMarginBottomWithIcon = getDimen(R.dimen.mb_message_margin_bottom_with_icon)\n        mLineHeight = getDimen(R.dimen.mb_line_height)\n        mContainerPaddingTopOneLine = getDimen(R.dimen.mb_container_padding_top_singleline)\n        mContainerPaddingTopMultiline = getDimen(R.dimen.mb_container_padding_top_multiline)\n    }\n\n    private fun initViewGroup(context: Context) {\n        // CONTENT CONTAINER\n        var layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)\n        mContentContainer = RelativeLayout(context)\n        mContentContainer.id = R.id.mb_container_content\n        mContentContainer.layoutParams = layoutParams\n\n        // ICON VIEW\n        var relativeLayoutParams = RelativeLayout.LayoutParams(\n            mIconSize, mIconSize\n        )\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            relativeLayoutParams.marginStart = mIconMarginStart\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_START, RelativeLayout.TRUE)\n        } else {\n            relativeLayoutParams.leftMargin = mIconMarginStart\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE)\n        }\n        mIconView = AppCompatImageView(context)\n        mIconView.id = R.id.mb_icon\n        mIconView.layoutParams = relativeLayoutParams\n        mIconView.visibility = GONE\n\n        // MESSAGE VIEW\n        relativeLayoutParams =\n            RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            relativeLayoutParams.marginStart = mMessageMarginStart\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_START, RelativeLayout.TRUE)\n        } else {\n            relativeLayoutParams.leftMargin = mMessageMarginStart\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE)\n        }\n        mMessageView = MessageView(context)\n        mMessageView.id = R.id.mb_message\n        mMessageView.layoutParams = relativeLayoutParams\n\n        // BUTTONS CONTAINER\n        relativeLayoutParams =\n            RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_END, RelativeLayout.TRUE)\n        } else {\n            relativeLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE)\n        }\n        mButtonsContainer = ButtonsContainer(context)\n        mButtonsContainer.id = R.id.mb_container_buttons\n        mButtonsContainer.layoutParams = relativeLayoutParams\n        mLeftButton = mButtonsContainer.leftButton\n        mRightButton = mButtonsContainer.rightButton\n\n        // LINE\n        layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, mLineHeight)\n        mLine = View(context)\n        mLine.id = R.id.mb_line\n        mLine.layoutParams = layoutParams\n        addView(mContentContainer)\n        addView(mLine)\n        mContentContainer.addView(mIconView)\n        mContentContainer.addView(mMessageView)\n        mContentContainer.addView(mButtonsContainer)\n    }\n\n    private fun retrieveAttrs(context: Context, attrs: AttributeSet?, defStyleAttr: Int) {\n        val a = context.obtainStyledAttributes(\n            attrs, R.styleable.Banner, defStyleAttr,\n            R.style.Widget_Material_Banner\n        )\n        if (a.hasValue(R.styleable.Banner_icon)) {\n            setIcon(a.getResourceId(R.styleable.Banner_icon, -1))\n        }\n        if (a.hasValue(R.styleable.Banner_iconTint)) {\n            setIconTintColorInternal(a.getColor(R.styleable.Banner_iconTint, Color.BLACK))\n        }\n        if (a.hasValue(R.styleable.Banner_messageText)) {\n            setMessage(a.getString(R.styleable.Banner_messageText))\n        }\n        if (a.hasValue(R.styleable.Banner_buttonLeftText)) {\n            setLeftButton(a.getString(R.styleable.Banner_buttonLeftText), null)\n        }\n        if (a.hasValue(R.styleable.Banner_buttonRightText)) {\n            setRightButton(a.getString(R.styleable.Banner_buttonRightText), null)\n        }\n        if (a.hasValue(R.styleable.Banner_messageTextAppearance)) {\n            TextViewCompat.setTextAppearance(\n                mMessageView, a.getResourceId(\n                    R.styleable.Banner_messageTextAppearance,\n                    R.style.TextAppearance_Banner_Message\n                )\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_buttonsTextAppearance)) {\n            val textAppearance = a.getResourceId(\n                R.styleable.Banner_buttonsTextAppearance,\n                R.style.TextAppearance_Banner_Button\n            )\n            TextViewCompat.setTextAppearance(mLeftButton, textAppearance)\n            TextViewCompat.setTextAppearance(mRightButton, textAppearance)\n        }\n        if (a.hasValue(R.styleable.Banner_fontPath)) {\n            val typeface = getFont(a.getString(R.styleable.Banner_fontPath))\n            mLeftButton.typeface = typeface\n            mRightButton.typeface = typeface\n            mMessageView.typeface = typeface\n        }\n        if (a.hasValue(R.styleable.Banner_buttonsFontPath)) {\n            val typeface = getFont(a.getString(R.styleable.Banner_buttonsFontPath))\n            mLeftButton.typeface = typeface\n            mRightButton.typeface = typeface\n        }\n        if (a.hasValue(R.styleable.Banner_messageFontPath)) {\n            mMessageView.typeface = getFont(a.getString(R.styleable.Banner_messageFontPath))\n        }\n        if (a.hasValue(R.styleable.Banner_messageTextColor)) {\n            mMessageView.setTextColor(\n                a.getColor(\n                    R.styleable.Banner_messageTextColor,\n                    Color.BLACK\n                )\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_buttonsTextColor)) {\n            mLeftButton.setTextColor(a.getColor(R.styleable.Banner_buttonsTextColor, Color.BLACK))\n            mRightButton.setTextColor(\n                a.getColor(\n                    R.styleable.Banner_buttonsTextColor,\n                    Color.BLACK\n                )\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_buttonLeftTextColor)) {\n            mLeftButton.setTextColor(\n                a.getColor(R.styleable.Banner_buttonLeftTextColor, Color.BLACK)\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_buttonRightTextColor)) {\n            mRightButton.setTextColor(\n                a.getColor(R.styleable.Banner_buttonRightTextColor, Color.BLACK)\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_buttonsRippleColor)) {\n            mLeftButton.rippleColor = ColorStateList.valueOf(\n                a.getColor(R.styleable.Banner_buttonsRippleColor, Color.BLACK)\n            )\n            mRightButton.rippleColor = ColorStateList.valueOf(\n                a.getColor(R.styleable.Banner_buttonsRippleColor, Color.BLACK)\n            )\n        }\n        if (a.hasValue(R.styleable.Banner_backgroundColor)) {\n            setBackgroundColor(a.getColor(R.styleable.Banner_backgroundColor, 0))\n        }\n        if (a.hasValue(R.styleable.Banner_lineColor)) {\n            mLine.setBackgroundColor(a.getColor(R.styleable.Banner_lineColor, Color.BLACK))\n        }\n        if (a.hasValue(R.styleable.Banner_lineOpacity)) {\n            mLine.alpha = a.getFloat(R.styleable.Banner_lineOpacity, 0.12f)\n        }\n        val contentPaddingStart = a.getDimensionPixelSize(\n            R.styleable.Banner_contentPaddingStart,\n            0\n        )\n        val contentPaddingEnd = a.getDimensionPixelSize(R.styleable.Banner_contentPaddingEnd, 0)\n        setContainerPadding(contentPaddingStart, -1, contentPaddingEnd)\n        a.recycle()\n    }\n\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        if (DEBUG) {\n            Log.e(\"Banner onMeasure w\", MeasureSpec.toString(widthMeasureSpec))\n            Log.e(\"Banner onMeasure h\", MeasureSpec.toString(heightMeasureSpec))\n        }\n        val widthSpecSize = MeasureSpec.getSize(widthMeasureSpec)\n        var widthUsed = containerHorizontalPadding\n\n        // Measure the message view\n        measureChild(mMessageView, widthMeasureSpec, heightMeasureSpec)\n        // Adding the start margin and possible single line end margin\n        val messageViewWidth =\n            mMessageView.measuredWidth + mMessageMarginStart + mMessageMarginEndSingleLine\n\n        // Measure the icon\n        var iconViewWidth = 0\n        if (mIcon != null) {\n            measureChild(mIconView, widthMeasureSpec, heightMeasureSpec)\n            iconViewWidth = mIconView.measuredWidth + mIconMarginStart\n        }\n        measureChild(mButtonsContainer, widthMeasureSpec, heightMeasureSpec)\n        val buttonsWidth = mButtonsContainer.measuredWidth\n\n        // Update the layout params\n        if (widthSpecSize - widthUsed - iconViewWidth - buttonsWidth >= messageViewWidth) {\n            // The message view fits in one line with the icon and the both buttons\n            onSingleLine()\n        } else {\n            // Doesn't fit\n            onMultiline()\n        }\n        measureChild(mContentContainer, widthMeasureSpec, heightMeasureSpec)\n        measureChild(mLine, widthMeasureSpec, heightMeasureSpec)\n        widthUsed = mContentContainer.measuredWidth\n        val heightUsed: Int = mContentContainer.measuredHeight + mLine.measuredHeight\n        setMeasuredDimension(widthUsed, heightUsed)\n    }\n\n    private fun onSingleLine() {\n        if (mLayoutType == LAYOUT_SINGLE_LINE) {\n            // Skip unnecessary layout params changes. The views already have the correct ones.\n            return\n        }\n        setContainerPadding(-1, mContainerPaddingTopOneLine, -1)\n        val messageLayoutParams = mMessageView.layoutParams as RelativeLayout.LayoutParams\n        val buttonsContainerLayoutParams =\n            mButtonsContainer.layoutParams as RelativeLayout.LayoutParams\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            messageLayoutParams.addRule(RelativeLayout.START_OF, mButtonsContainer.id)\n            messageLayoutParams.marginEnd = mMessageMarginEndSingleLine\n        } else {\n            messageLayoutParams.addRule(RelativeLayout.LEFT_OF, mButtonsContainer.id)\n            messageLayoutParams.rightMargin = mMessageMarginEndSingleLine\n        }\n        messageLayoutParams.addRule(RelativeLayout.ALIGN_BASELINE, mButtonsContainer.id)\n        messageLayoutParams.bottomMargin = 0\n        mMessageView.layoutParams = messageLayoutParams\n        buttonsContainerLayoutParams.addRule(RelativeLayout.ALIGN_BASELINE, 0)\n        buttonsContainerLayoutParams.addRule(RelativeLayout.BELOW, 0)\n        mButtonsContainer.layoutParams = buttonsContainerLayoutParams\n        mLayoutType = LAYOUT_SINGLE_LINE\n    }\n\n    private fun onMultiline() {\n        if (mLayoutType == LAYOUT_MULTILINE) {\n            // Skip unnecessary layout params changes. The views already have the correct ones.\n            return\n        }\n        setContainerPadding(-1, mContainerPaddingTopMultiline, -1)\n        val messageLayoutParams = mMessageView.layoutParams as RelativeLayout.LayoutParams\n        val buttonsContainerLayoutParams =\n            mButtonsContainer.layoutParams as RelativeLayout.LayoutParams\n        if (mWideLayout) {\n            if (mButtonsContainer.measuredWidth\n                > (measuredWidth - containerHorizontalPadding) / 2\n            ) {\n                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                    messageLayoutParams.addRule(RelativeLayout.START_OF, 0)\n                } else {\n                    messageLayoutParams.addRule(RelativeLayout.LEFT_OF, 0)\n                }\n                messageLayoutParams.bottomMargin = if (mIcon\n                    == null\n                ) mMessageMarginBottomMultiline else mMessageMarginBottomWithIcon\n                buttonsContainerLayoutParams.addRule(RelativeLayout.BELOW, mMessageView.id)\n            } else {\n                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                    messageLayoutParams.addRule(RelativeLayout.START_OF, mButtonsContainer.id)\n                } else {\n                    messageLayoutParams.addRule(RelativeLayout.LEFT_OF, mButtonsContainer.id)\n                }\n                buttonsContainerLayoutParams.addRule(\n                    RelativeLayout.ALIGN_BASELINE,\n                    mMessageView.id\n                )\n            }\n        } else {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n                messageLayoutParams.addRule(RelativeLayout.START_OF, 0)\n            } else {\n                messageLayoutParams.addRule(RelativeLayout.LEFT_OF, 0)\n            }\n            messageLayoutParams.bottomMargin =\n                if (mIcon == null) mMessageMarginBottomMultiline else mMessageMarginBottomWithIcon\n            buttonsContainerLayoutParams.addRule(RelativeLayout.BELOW, mMessageView.id)\n        }\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            messageLayoutParams.marginEnd = mMessageMarginEndMultiline\n        } else {\n            messageLayoutParams.rightMargin = mMessageMarginEndMultiline\n        }\n        messageLayoutParams.addRule(RelativeLayout.ALIGN_BASELINE, 0)\n        mMessageView.layoutParams = messageLayoutParams\n        mButtonsContainer.layoutParams = buttonsContainerLayoutParams\n        mLayoutType = LAYOUT_MULTILINE\n    }\n\n    private fun updateParamsOnIconChanged() {\n        val messageLayoutParams = mMessageView.layoutParams as RelativeLayout.LayoutParams\n        val parentStart = if (mIcon == null) RelativeLayout.TRUE else 0\n        val toEndOfId = if (mIcon == null) 0 else mIconView.id\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            messageLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_START, parentStart)\n            messageLayoutParams.addRule(RelativeLayout.END_OF, toEndOfId)\n        } else {\n            messageLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, parentStart)\n            messageLayoutParams.addRule(RelativeLayout.RIGHT_OF, toEndOfId)\n        }\n        mMessageView.layoutParams = messageLayoutParams\n    }\n\n    override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {\n        val y = mContentContainer.measuredHeight\n        mContentContainer.layout(0, 0, mContentContainer.measuredWidth, y)\n        mLine.layout(0, y, mLine.measuredWidth, y + mLine.measuredHeight)\n    }\n\n    /**\n     * Sets the icon to display in the banner.\n     *\n     * @param icon The drawable to use as the icon or null if you don't want an icon\n     */\n    fun setIcon(icon: Drawable?) {\n        mIcon = icon\n        if (mIcon != null) {\n            mIconView.visibility = VISIBLE\n            mIconView.setImageDrawable(icon)\n        } else {\n            mIconView.visibility = GONE\n        }\n        updateParamsOnIconChanged()\n    }\n\n    /**\n     * Sets the icon to display in the banner.\n     *\n     * @param iconId The resourceId of the drawable to use as the icon\n     */\n    fun setIcon(@DrawableRes iconId: Int) {\n        setIcon(ContextCompat.getDrawable(context, iconId))\n    }\n\n    /**\n     * Sets the message to display in the banner.\n     *\n     * @param text The text to display in the banner\n     */\n    fun setMessage(text: CharSequence?) {\n        mMessageText = text\n        mMessageView.text = text\n    }\n\n    /**\n     * Sets the message to display in the banner using the given resource id.\n     *\n     * @param textId The resource id of the text to display\n     */\n    fun setMessage(@StringRes textId: Int) {\n        setMessage(context.getString(textId))\n    }\n\n    /**\n     * Sets a listener to be invoked when the left button of the banner is pressed.\n     *\n     * Usually used for the dismissive action.\n     *\n     * @param text     The text to display in the left button\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setLeftButton(text: String?, listener: BannerInterface.OnClickListener?) {\n        mLeftButtonText = text\n        if (mLeftButtonText != null) {\n            mLeftButton.visibility = VISIBLE\n            mLeftButton.text = text\n            setLeftButtonListener(listener)\n        } else {\n            mLeftButton.visibility = GONE\n        }\n    }\n\n    /**\n     * Sets a listener to be invoked when the left button of the banner is pressed.\n     *\n     * Usually used for the dismissive action.\n     *\n     * @param textId   The resource id of the text to display in the left button\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setLeftButton(@StringRes textId: Int, listener: BannerInterface.OnClickListener?) {\n        setLeftButton(context.getString(textId), listener)\n    }\n\n    /**\n     * Sets a listener to be invoked when the left button of the banner is pressed.\n     *\n     * Usually used for the dismissive action.\n     *\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setLeftButtonListener(listener: BannerInterface.OnClickListener?) {\n        mLeftButtonListener = listener\n        mLeftButton.setOnClickListener {\n            mLeftButtonListener?.onClick(this@Banner)\n        }\n    }\n\n    /**\n     * Sets a listener to be invoked when the right button of the banner is pressed.\n     *\n     * Usually used for the confirming action.\n     *\n     * @param text     The text to display in the right button\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setRightButton(text: String?, listener: BannerInterface.OnClickListener?) {\n        mRightButtonText = text\n        if (mRightButtonText != null) {\n            mRightButton.visibility = VISIBLE\n            mRightButton.text = text\n            setRightButtonListener(listener)\n        } else {\n            mRightButton.visibility = GONE\n        }\n    }\n\n    /**\n     * Sets a listener to be invoked when the right button of the banner is pressed.\n     *\n     * Usually used for the confirming action.\n     *\n     * @param textId   The resource id of the text to display in the right button\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setRightButton(@StringRes textId: Int, listener: BannerInterface.OnClickListener?) {\n        setRightButton(context.getString(textId), listener)\n    }\n\n    /**\n     * Sets a listener to be invoked when the right button of the banner is pressed.\n     *\n     * Usually used for the confirming action.\n     *\n     * @param listener The [BannerInterface.OnClickListener] to use\n     */\n    fun setRightButtonListener(listener: BannerInterface.OnClickListener?) {\n        mRightButtonListener = listener\n        mRightButton.setOnClickListener {\n            mRightButtonListener?.onClick(this@Banner)\n        }\n    }\n\n    /**\n     * Sets a listener to be invoked when the banner is dismissed.\n     *\n     * @param listener The [BannerInterface.OnDismissListener] to use\n     */\n    fun setOnDismissListener(listener: BannerInterface.OnDismissListener?) {\n        mOnDismissListener = listener\n    }\n\n    /**\n     * Sets a listener to be invoked when the banner is shown.\n     *\n     * @param listener The [BannerInterface.OnShowListener] to use\n     */\n    fun setOnShowListener(listener: BannerInterface.OnShowListener?) {\n        mOnShowListener = listener\n    }\n\n    /**\n     * Applies a tint to the icon.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setIconTintColor(@ColorRes colorId: Int) {\n        setIconTintColorInternal(ContextCompat.getColor(context, colorId))\n    }\n\n    private fun setIconTintColorInternal(@ColorInt color: Int) {\n        ImageViewCompat.setImageTintList(mIconView, ColorStateList.valueOf(color))\n    }\n\n    /**\n     * Creates a new typeface from the specified font in the assets folder.\n     *\n     * @param fontPath path to the font in the assets folder, e.g. *\"fonts/Roboto-Medium.ttf\"*\n     * @return Typeface The new typeface\n     */\n    private fun getFont(fontPath: String?): Typeface? {\n        var typeface: Typeface? = null\n        try {\n            typeface = Typeface.createFromAsset(context.assets, fontPath)\n        } catch (e: Exception) {\n            e.printStackTrace()\n        }\n        return typeface\n    }\n\n    /**\n     * Sets the font of the buttons and message.\n     *\n     * @param fontPath path to the font in the assets folder, e.g. *\"fonts/Roboto-Medium.ttf\"*\n     */\n    fun setFont(fontPath: String?) {\n        val typeface = getFont(fontPath)\n        mLeftButton.typeface = typeface\n        mRightButton.typeface = typeface\n        mMessageView.typeface = typeface\n    }\n\n    /**\n     * Sets the font of the buttons and message.\n     *\n     * @param typeface typeface\n     */\n    fun setFont(typeface: Typeface?) {\n        mLeftButton.typeface = typeface\n        mRightButton.typeface = typeface\n        mMessageView.typeface = typeface\n    }\n\n    /**\n     * Sets the font of the message.\n     *\n     * @param fontPath path to the font in the assets folder, e.g. *\"fonts/Roboto-Medium.ttf\"*\n     */\n    fun setMessageFont(fontPath: String?) {\n        val typeface = getFont(fontPath)\n        mMessageView.typeface = typeface\n    }\n\n    /**\n     * Sets the font of the message.\n     *\n     * @param typeface typeface\n     */\n    fun setMessageFont(typeface: Typeface?) {\n        mMessageView.typeface = typeface\n    }\n\n    /**\n     * Sets the font of the buttons.\n     *\n     * @param fontPath path to the font in the assets folder, e.g. *\"fonts/Roboto-Medium.ttf\"*\n     */\n    fun setButtonsFont(fontPath: String?) {\n        val typeface = getFont(fontPath)\n        mLeftButton.typeface = typeface\n        mRightButton.typeface = typeface\n    }\n\n    /**\n     * Sets the font of the buttons.\n     *\n     * @param typeface typeface\n     */\n    fun setButtonsFont(typeface: Typeface?) {\n        mLeftButton.typeface = typeface\n        mRightButton.typeface = typeface\n        mMessageView.typeface = typeface\n    }\n\n    /**\n     * Sets the text appearance of a message from the specified style resource.\n     *\n     * @param resId The resource identifier of the style to apply.\n     */\n    fun setMessageTextAppearance(@StyleRes resId: Int) {\n        TextViewCompat.setTextAppearance(mMessageView, resId)\n    }\n\n    /**\n     * Sets the text color of a message.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setMessageTextColor(@ColorRes colorId: Int) {\n        mMessageView.setTextColor(ContextCompat.getColor(context, colorId))\n    }\n\n    /**\n     * Sets the text appearance of buttons' text from the specified style resource.\n     *\n     * @param resId The resource identifier of the style to apply.\n     */\n    fun setButtonsTextAppearance(@StyleRes resId: Int) {\n        TextViewCompat.setTextAppearance(mLeftButton, resId)\n        TextViewCompat.setTextAppearance(mRightButton, resId)\n    }\n\n    /**\n     * Sets the text color of both buttons.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setButtonsTextColor(@ColorRes colorId: Int) {\n        mLeftButton.setTextColor(ContextCompat.getColor(context, colorId))\n        mRightButton.setTextColor(ContextCompat.getColor(context, colorId))\n    }\n\n    /**\n     * Sets the text color of the left button.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setLeftButtonTextColor(@ColorRes colorId: Int) {\n        mLeftButton.setTextColor(ContextCompat.getColor(context, colorId))\n    }\n\n    /**\n     * Sets the text color of the right button.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setRightButtonTextColor(@ColorRes colorId: Int) {\n        mRightButton.setTextColor(ContextCompat.getColor(context, colorId))\n    }\n\n    /**\n     * Sets the ripple color for both buttons.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setButtonsRippleColor(@ColorRes colorId: Int) {\n        mLeftButton.setRippleColorResource(colorId)\n        mRightButton.setRippleColorResource(colorId)\n    }\n\n    /**\n     * Sets the line color.\n     *\n     * @param colorId the resource id of the color\n     */\n    fun setLineColor(@ColorRes colorId: Int) {\n        mLine.setBackgroundColor(ContextCompat.getColor(context, colorId))\n    }\n\n    /**\n     * Sets the opacity of the line to a value from 0 to 1, where 0 means the line is\n     * completely transparent and 1 means the line is completely opaque.\n     *\n     * @param lineOpacity the opacity of the line\n     */\n    fun setLineOpacity(@FloatRange(from = 0.0, to = 1.0) lineOpacity: Float) {\n        mLine.alpha = lineOpacity\n    }\n\n    /**\n     * Sets a content start padding.\n     *\n     * @param dimenId the resource id of the dimension\n     * @see setContentPaddingStartPx\n     */\n    fun setContentPaddingStart(@DimenRes dimenId: Int) {\n        setContentPaddingStartPx(getDimen(dimenId))\n    }\n\n    /**\n     * Sets a content start padding.\n     *\n     * @param dimenPx the padding in pixels\n     * @see setContentPaddingStart\n     */\n    fun setContentPaddingStartPx(@Dimension dimenPx: Int) {\n        setContainerPadding(dimenPx, -1, -1)\n    }\n\n    /**\n     * Sets a content end padding.\n     *\n     * @param dimenId the resource id of the dimension\n     * @see setContentPaddingEndPx\n     */\n    fun setContentPaddingEnd(@DimenRes dimenId: Int) {\n        setContentPaddingEndPx(getDimen(dimenId))\n    }\n\n    /**\n     * Sets a content end padding.\n     *\n     * @param dimenPx the padding in pixels\n     * @see setContentPaddingEnd\n     */\n    fun setContentPaddingEndPx(@Dimension dimenPx: Int) {\n        setContainerPadding(-1, -1, dimenPx)\n    }\n\n    /**\n     * Set the visibility state of this view.\n     *\n     * **Note:** this will not trigger [BannerInterface.OnShowListener] and\n     * [BannerInterface.OnDismissListener] callbacks. If you want them use\n     * [setBannerVisibility] instead.\n     */\n    @Suppress(\"RedundantOverride\")\n    override fun setVisibility(visibility: Int) {\n        super.setVisibility(visibility)\n    }\n\n    /**\n     * Sets the visibility state of this banner.\n     *\n     * This will trigger [BannerInterface.OnShowListener] callback if visibility set to\n     * [View.VISIBLE] or [BannerInterface.OnDismissListener] callback if set to\n     * [View.GONE].\n     *\n     * If visibility set to [View.INVISIBLE] none of these callbacks will be triggered.\n     *\n     * @param visibility One of [View.VISIBLE], [View.INVISIBLE], or [View.GONE].\n     * @see setVisibility\n     */\n    fun setBannerVisibility(@Visibility visibility: Int) {\n        if (visibility == VISIBLE) {\n            dispatchOnShow()\n        } else if (visibility == GONE) {\n            dispatchOnDismiss()\n        }\n        setVisibility(visibility)\n    }\n\n    /**\n     * Shows the [Banner] with the animation after the specified delay in milliseconds.\n     *\n     * Note that the delay should always be non-negative. Any negative delay will be clamped to 0\n     * on N and above.\n     *\n     * Call [Banner.setVisibility(VISIBLE)][setVisibility] to immediately show the\n     * banner without animation.\n     *\n     * @param delay The amount of time, in milliseconds, to delay starting the banner animation\n     *\n     * @see setBannerVisibility\n     */\n    fun show(delay: Long = 0) {\n        if (mScheduledShow || (!mScheduledDismiss && mIsAnimating)) return\n        mScheduledShow = true\n\n        // Other variants return getMeasuredHeight lesser than actual height.\n        // See https://stackoverflow.com/a/29684471/1216542\n        val widthSpec = MeasureSpec.makeMeasureSpec(\n            (parent as ViewGroup).width,\n            MeasureSpec.EXACTLY\n        )\n        val heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)\n        measure(widthSpec, heightSpec)\n        val fromY = -measuredHeight\n        val layoutParams = layoutParams as MarginLayoutParams\n        mMarginBottom = layoutParams.bottomMargin\n\n        // Animate the banner\n        val bannerAnimator = ObjectAnimator.ofFloat(this, TRANSLATION_Y, fromY.toFloat(), 0f)\n        // Animate the banner's bottom margin to move other views\n        layoutParams.bottomMargin = fromY\n        val marginAnimator = ValueAnimator.ofInt(\n            layoutParams.bottomMargin,\n            mMarginBottom\n        )\n        marginAnimator.addUpdateListener { valueAnimator ->\n            layoutParams.bottomMargin = (valueAnimator.animatedValue as Int)\n            requestLayout()\n        }\n        val animatorSet = AnimatorSet()\n        animatorSet.playTogether(bannerAnimator, marginAnimator)\n        animatorSet.interpolator = AccelerateDecelerateInterpolator()\n        animatorSet.startDelay = delay\n        animatorSet.duration = ANIM_DURATION_SHOW.toLong()\n        animatorSet.addListener(mAnimatorListener)\n        animatorSet.start()\n    }\n\n    /**\n     * Dismisses the [Banner] with the animation after the specified delay in milliseconds.\n     *\n     * Call [Banner.setVisibility(GONE)][setVisibility] to immediately dismiss the\n     * banner without animation.\n     *\n     * @param delay The amount of time, in milliseconds, to delay starting the banner animation\n     *\n     * @see setBannerVisibility\n     */\n    fun dismiss(delay: Long = 0) {\n        if (mScheduledDismiss || (!mScheduledShow && mIsAnimating)) return\n        mScheduledDismiss = true\n\n        val toY = -measuredHeight\n        val layoutParams = layoutParams as MarginLayoutParams\n        mMarginBottom = layoutParams.bottomMargin\n\n        // Animate the banner\n        val bannerAnimator = ObjectAnimator.ofFloat(this, TRANSLATION_Y, 0f, toY.toFloat())\n        // Animate the banner's bottom margin to move other views\n        val marginAnimator = ValueAnimator.ofInt(layoutParams.bottomMargin, toY)\n        marginAnimator.addUpdateListener { valueAnimator ->\n            layoutParams.bottomMargin = (valueAnimator.animatedValue as Int)\n            requestLayout()\n        }\n        val animatorSet = AnimatorSet()\n        animatorSet.playTogether(bannerAnimator, marginAnimator)\n        animatorSet.interpolator = AccelerateDecelerateInterpolator()\n        animatorSet.startDelay = delay\n        animatorSet.duration = ANIM_DURATION_DISMISS.toLong()\n        animatorSet.addListener(mAnimatorListener)\n        animatorSet.start()\n    }\n\n    private val mAnimatorListener: AnimatorListenerAdapter = object : AnimatorListenerAdapter() {\n        override fun onAnimationStart(animation: Animator) {\n            // onAnimationStart is invoked immediately after calling AnimatorSet.start()\n            postDelayed({\n                mIsAnimating = true\n                if (animation.duration == ANIM_DURATION_SHOW.toLong()) {\n                    visibility = VISIBLE\n                }\n            }, animation.startDelay)\n        }\n\n        override fun onAnimationEnd(animation: Animator) {\n            mIsAnimating = false\n            if (animation.duration == ANIM_DURATION_DISMISS.toLong()) {\n                visibility = GONE\n\n                // Reset to default\n                val layoutParams = layoutParams as MarginLayoutParams\n                layoutParams.bottomMargin = mMarginBottom\n                setLayoutParams(layoutParams)\n                // #7 Fix dismiss animation\n                // setTranslationY(0);\n            }\n            if (isShown) {\n                dispatchOnShow()\n            } else {\n                dispatchOnDismiss()\n            }\n        }\n    }\n\n    private fun dispatchOnShow() {\n        mScheduledShow = false\n        mOnShowListener?.onShow(this)\n    }\n\n    private fun dispatchOnDismiss() {\n        mScheduledDismiss = false\n        mOnDismissListener?.onDismiss(this)\n    }\n\n    /**\n     * Calculates the horizontal padding of the inner container.\n     *\n     * @return the total horizontal padding in pixels\n     */\n    private val containerHorizontalPadding: Int\n        get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            mContentContainer.paddingStart + mContentContainer.paddingEnd\n        } else {\n            mContentContainer.paddingLeft + mContentContainer.paddingRight\n        }\n\n    /**\n     * Sets the padding to the container view.\n     *\n     * Use `-1` to preserve the existing padding.\n     */\n    private fun setContainerPadding(start: Int, top: Int, end: Int) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            mContentContainer.setPaddingRelative(\n                if (start != -1) start else mContentContainer.paddingStart,\n                if (top != -1) top else mContentContainer.paddingTop,\n                if (end != -1) end else mContentContainer.paddingEnd, 0\n            )\n        } else {\n            mContentContainer.setPadding(\n                if (start != -1) start else mContentContainer.paddingLeft,\n                if (top != -1) top else mContentContainer.paddingTop,\n                if (end != -1) end else mContentContainer.paddingRight, 0\n            )\n        }\n    }\n\n    /**\n     * Retrieves a dimensional for a particular resource ID for use as a size in raw pixels.\n     *\n     * @param dimenRes the dimension resource identifier\n     * @return Resource dimension value multiplied by the appropriate metric and truncated to\n     * integer pixels.\n     * @see android.content.res.Resources.getDimensionPixelSize\n     */\n    private fun getDimen(@DimenRes dimenRes: Int): Int {\n        return context.resources.getDimensionPixelSize(dimenRes)\n    }\n\n    override fun onSaveInstanceState(): Parcelable {\n        val superState = super.onSaveInstanceState()\n        val ss = SavedState(superState)\n        ss.visibility = visibility\n        return ss\n    }\n\n    override fun onRestoreInstanceState(state: Parcelable) {\n        if (state !is SavedState) {\n            super.onRestoreInstanceState(state)\n            return\n        }\n        super.onRestoreInstanceState(state.superState)\n        // Restore visibility\n        visibility = state.visibility\n    }\n\n    private class SavedState : BaseSavedState {\n        var visibility = 0\n\n        constructor(superState: Parcelable?) : super(superState)\n        private constructor(`in`: Parcel) : super(`in`) {\n            visibility = `in`.readInt()\n        }\n\n        override fun writeToParcel(out: Parcel, flags: Int) {\n            super.writeToParcel(out, flags)\n            out.writeInt(visibility)\n        }\n\n        companion object {\n            @JvmField\n            val CREATOR: Creator<SavedState?> = object : Creator<SavedState?> {\n                override fun createFromParcel(`in`: Parcel): SavedState {\n                    return SavedState(`in`)\n                }\n\n                override fun newArray(size: Int): Array<SavedState?> {\n                    return arrayOfNulls(size)\n                }\n            }\n        }\n    }\n\n    /**\n     * Creates a builder for a banner that uses the default banner style (either specified in\n     * the app theme or in this library).\n     *\n     * The default banner style is defined by [R.attr#bannerStyle][R.attr.bannerStyle]\n     * within the parent `context`'s theme.\n     *\n     * @param mContext the parent context\n     */\n    class Builder(private val mContext: Context) {\n        private var mParent: ViewGroup? = null\n        private var mChildIndex = 0\n        private var mParams: LayoutParams? = null\n\n        @IdRes\n        private var mId = 0\n        private var mIcon: Drawable? = null\n        private var mMessageText: CharSequence? = null\n        private var mLeftBtnText: String? = null\n        private var mRightBtnText: String? = null\n        private var mLeftBtnListener: BannerInterface.OnClickListener? = null\n        private var mRightBtnListener: BannerInterface.OnClickListener? = null\n        private var mOnDismissListener: BannerInterface.OnDismissListener? = null\n        private var mOnShowListener: BannerInterface.OnShowListener? = null\n\n        /**\n         * Creates a builder for a banner that uses an explicit style resource.\n         *\n         * @param context    the parent context\n         * @param themeResId the resource ID of the theme against which to inflate this banner\n         */\n        constructor(context: Context, @StyleRes themeResId: Int) : this(\n            ContextThemeWrapper(context, themeResId)\n        )\n\n        /**\n         * Sets the [ViewGroup] that will be a parent view for this banner and specify\n         * banner's index in the parent view.\n         *\n         * @param parent the parent view to display the banner in\n         * @param index  the position at which to add the banner or -1 to add last\n         * @param params the layout parameters to set on the banner\n         * @return the [Builder] object to chain calls\n         */\n        @JvmOverloads\n        fun setParent(\n            parent: ViewGroup,\n            index: Int = 0,\n            params: LayoutParams? = LayoutParams(\n                LayoutParams.MATCH_PARENT,\n                LayoutParams.WRAP_CONTENT\n            )\n        ): Builder {\n            mParent = parent\n            mChildIndex = index\n            mParams = params\n            return this\n        }\n\n        /**\n         * Sets the [identifier][id] for this banner. The identifier should be a positive number.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setId(@IdRes id: Int): Builder {\n            mId = id\n            return this\n        }\n\n        /**\n         * Sets the [Drawable] to be used in the banner.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setIcon(@DrawableRes iconId: Int): Builder {\n            mIcon = ContextCompat.getDrawable(mContext, iconId)\n            return this\n        }\n\n        /**\n         * Sets the resource id of the [Drawable] to be used in the banner.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setIcon(icon: Drawable?): Builder {\n            mIcon = icon\n            return this\n        }\n\n        /**\n         * Sets the message to display in the banner using the given resource id.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setMessage(@StringRes textId: Int): Builder {\n            mMessageText = mContext.getString(textId)\n            return this\n        }\n\n        /**\n         * Sets the message to display in the banner.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setMessage(text: CharSequence): Builder {\n            mMessageText = text\n            return this\n        }\n\n        /**\n         * Sets a listener to be invoked when the left button of the banner is pressed.\n         *\n         * Usually used for the dismissive action.\n         *\n         * @param textId   The resource id of the text to display in the left button\n         * @param listener The [BannerInterface.OnClickListener] to use\n         * @return the [Builder] object to chain calls\n         */\n        fun setLeftButton(\n            @StringRes textId: Int,\n            listener: BannerInterface.OnClickListener?\n        ): Builder {\n            setLeftButton(mContext.getString(textId), listener)\n            return this\n        }\n\n        /**\n         * Sets a listener to be invoked when the left button of the banner is pressed.\n         *\n         * Usually used for the dismissive action.\n         *\n         * @param text     The text to display in the left button\n         * @param listener The [BannerInterface.OnClickListener] to use\n         * @return the [Builder] object to chain calls\n         */\n        fun setLeftButton(\n            text: String,\n            listener: BannerInterface.OnClickListener?\n        ): Builder {\n            mLeftBtnText = text\n            mLeftBtnListener = listener\n            return this\n        }\n\n        /**\n         * Sets a listener to be invoked when the right button of the banner is pressed.\n         *\n         * Usually used for the confirming action.\n         *\n         * @param textId   The resource id of the text to display in the right button\n         * @param listener The [BannerInterface.OnClickListener] to use\n         * @return the [Builder] object to chain calls\n         */\n        fun setRightButton(\n            @StringRes textId: Int,\n            listener: BannerInterface.OnClickListener?\n        ): Builder {\n            setRightButton(mContext.getString(textId), listener)\n            return this\n        }\n\n        /**\n         * Sets a listener to be invoked when the right button of the banner is pressed.\n         *\n         * Usually used for the confirming action.\n         *\n         * @param text     The text to display in the right button\n         * @param listener The [BannerInterface.OnClickListener] to use\n         * @return the [Builder] object to chain calls\n         */\n        fun setRightButton(\n            text: String,\n            listener: BannerInterface.OnClickListener?\n        ): Builder {\n            mRightBtnText = text\n            mRightBtnListener = listener\n            return this\n        }\n\n        /**\n         * Sets a [listener] to be invoked when the banner is dismissed.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setOnDismissListener(listener: BannerInterface.OnDismissListener?): Builder {\n            mOnDismissListener = listener\n            return this\n        }\n\n        /**\n         * Sets a [listener] to be invoked when the banner is shown.\n         *\n         * @return the [Builder] object to chain calls\n         */\n        fun setOnShowListener(listener: BannerInterface.OnShowListener?): Builder {\n            mOnShowListener = listener\n            return this\n        }\n\n        /**\n         * Creates a [Banner] with the arguments supplied to this builder.\n         *\n         * Calling this method does not display the banner. If no additional processing is\n         * needed, [show] may be called instead to both create and display the banner.\n         *\n         * @return The banner created using the arguments supplied to this builder\n         */\n        fun create(): Banner {\n            if (mParent == null) {\n                throw NullPointerException(\n                    \"The parent view must not be null! \"\n                            + \"Call Banner.Builder#setParent() to set the parent view.\"\n                )\n            }\n            val banner = Banner(mContext)\n            banner.id = if (mId != 0) mId else R.id.mb_banner\n            banner.setIcon(mIcon)\n            banner.setMessage(mMessageText)\n            banner.setLeftButton(mLeftBtnText, mLeftBtnListener)\n            banner.setRightButton(mRightBtnText, mRightBtnListener)\n            banner.setOnDismissListener(mOnDismissListener)\n            banner.setOnShowListener(mOnShowListener)\n            banner.layoutParams = mParams\n            banner.visibility = GONE\n            mParent!!.addView(banner, mChildIndex)\n            return banner\n        }\n\n        /**\n         * Creates a [Banner] with the arguments supplied to this builder and immediately\n         * displays the banner.\n         *\n         * Calling this method is functionally identical to:\n         *\n         *    banner: Banner = builder.create()\n         *    banner.show()\n         *\n         * @return The banner created using the arguments supplied to this builder\n         */\n        fun show(): Banner {\n            val banner = create()\n            banner.show()\n            return banner\n        }\n    }\n\n    companion object {\n        private const val TAG = \"Banner\"\n        private const val DEBUG = false\n        private const val LAYOUT_UNDEFINED = -1\n        private const val LAYOUT_SINGLE_LINE = 0\n        private const val LAYOUT_MULTILINE = 1\n        private const val ANIM_DURATION_DISMISS = 160\n        private const val ANIM_DURATION_SHOW = 180\n    }\n}"
  },
  {
    "path": "library/src/main/java/com/sergivonavi/materialbanner/BannerInterface.kt",
    "content": "/*\n * Copyright 2023 Sergey Ivanov\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 */\npackage com.sergivonavi.materialbanner\n\ninterface BannerInterface {\n\n    /**\n     * Interface used to allow the creator of a banner to run some code when a button in the\n     * banner is clicked.\n     */\n    fun interface OnClickListener {\n        /**\n         * This method will be invoked when a button in the banner is clicked.\n         *\n         * @param banner The banner that was clicked\n         */\n        fun onClick(banner: Banner)\n    }\n\n    /**\n     * Interface used to allow the creator of a banner to run some code when the banner is\n     * dismissed.\n     */\n    fun interface OnDismissListener {\n        /**\n         * This method will be invoked when the banner is dismissed.\n         *\n         * @param banner The banner that was dismissed\n         */\n        fun onDismiss(banner: Banner?)\n    }\n\n    /**\n     * Interface used to allow the creator of a banner to run some code when the banner is shown.\n     */\n    fun interface OnShowListener {\n        /**\n         * This method will be invoked when the banner is shown.\n         *\n         * @param banner The banner that is shown\n         */\n        fun onShow(banner: Banner?)\n    }\n}"
  },
  {
    "path": "library/src/main/java/com/sergivonavi/materialbanner/widget/ButtonsContainer.kt",
    "content": "/*\n * Copyright 2023 Sergey Ivanov\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 */\npackage com.sergivonavi.materialbanner.widget\n\nimport android.content.Context\nimport android.os.Build\nimport android.util.AttributeSet\nimport android.view.ViewGroup\nimport androidx.annotation.DimenRes\nimport androidx.annotation.IntDef\nimport androidx.annotation.RestrictTo\nimport androidx.core.view.ViewCompat\nimport com.google.android.material.button.MaterialButton\nimport com.sergivonavi.materialbanner.R\nimport kotlin.math.max\n\n@RestrictTo(RestrictTo.Scope.LIBRARY)\nclass ButtonsContainer @JvmOverloads constructor(\n    context: Context,\n    attrs: AttributeSet? = null,\n    defStyleAttr: Int = 0\n) : ViewGroup(context, attrs, defStyleAttr) {\n    @IntDef(HORIZONTAL, VERTICAL)\n    @Retention(AnnotationRetention.SOURCE)\n    private annotation class OrientationMode\n\n    lateinit var leftButton: MaterialButton\n        private set\n    lateinit var rightButton: MaterialButton\n        private set\n    private var mButtonMarginEnd = 0\n    private var mButtonMarginBottom = 0\n    private var mOrientation = 0\n\n    init {\n        init(context)\n    }\n\n    private fun init(context: Context) {\n        mButtonMarginEnd = getDimen(R.dimen.mb_button_margin_end)\n        mButtonMarginBottom = getDimen(R.dimen.mb_button_margin_bottom)\n        val layoutParams = MarginLayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n            layoutParams.marginEnd = mButtonMarginEnd\n        } else {\n            layoutParams.rightMargin = mButtonMarginEnd\n        }\n        layoutParams.bottomMargin = mButtonMarginBottom\n        leftButton = MaterialButton(context, null, androidx.appcompat.R.attr.borderlessButtonStyle)\n        leftButton.id = R.id.mb_button_left\n        leftButton.isSingleLine = true\n        leftButton.maxLines = 1\n        leftButton.minWidth = 0\n        leftButton.minimumWidth = 0\n        leftButton.layoutParams = layoutParams\n        leftButton.visibility = GONE\n        rightButton = MaterialButton(context, null, androidx.appcompat.R.attr.borderlessButtonStyle)\n        rightButton.id = R.id.mb_button_right\n        rightButton.isSingleLine = true\n        rightButton.maxLines = 1\n        rightButton.minWidth = 0\n        rightButton.minimumWidth = 0\n        rightButton.layoutParams = layoutParams\n        rightButton.visibility = GONE\n        addView(leftButton)\n        addView(rightButton)\n    }\n\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        var widthUsed = 0\n        if (leftButton.visibility != GONE) {\n            measureChildWithMargins(leftButton, widthMeasureSpec, 0, heightMeasureSpec, 0)\n            widthUsed += leftButton.measuredWidth + mButtonMarginEnd\n        }\n        if (rightButton.visibility != GONE) {\n            measureChildWithMargins(rightButton, widthMeasureSpec, 0, heightMeasureSpec, 0)\n            widthUsed += rightButton.measuredWidth + mButtonMarginEnd\n        }\n\n        // Allow orientation change only when the both buttons are not hidden\n        if (leftButton.visibility != GONE && rightButton.visibility != GONE) {\n            mOrientation = if (widthUsed > MeasureSpec.getSize(widthMeasureSpec)) {\n                VERTICAL\n            } else {\n                HORIZONTAL\n            }\n        }\n        if (mOrientation == VERTICAL) {\n            measureVertical()\n        } else {\n            measureHorizontal()\n        }\n    }\n\n    /**\n     * Measures the children when the orientation of this view is set to [VERTICAL].\n     */\n    private fun measureVertical() {\n        var widthUsed = 0\n        var heightUsed = 0\n        if (leftButton.visibility != GONE) {\n            widthUsed = leftButton.measuredWidth + mButtonMarginEnd\n            heightUsed += leftButton.measuredHeight + mButtonMarginBottom\n        }\n        if (rightButton.visibility != GONE) {\n            widthUsed = max(widthUsed, rightButton.measuredWidth + mButtonMarginEnd)\n            heightUsed += rightButton.measuredHeight + mButtonMarginBottom\n        }\n        setMeasuredDimension(widthUsed, heightUsed)\n    }\n\n    /**\n     * Measures the children when the orientation of this view is set to [HORIZONTAL].\n     */\n    private fun measureHorizontal() {\n        var widthUsed = 0\n        var heightUsed = 0\n        if (leftButton.visibility != GONE) {\n            widthUsed += leftButton.measuredWidth + mButtonMarginEnd\n            heightUsed = leftButton.measuredHeight + mButtonMarginBottom\n        }\n        if (rightButton.visibility != GONE) {\n            widthUsed += rightButton.measuredWidth + mButtonMarginEnd\n            heightUsed = max(heightUsed, rightButton.measuredHeight + mButtonMarginBottom)\n        }\n        setMeasuredDimension(widthUsed, heightUsed)\n    }\n\n    override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {\n        if (mOrientation == VERTICAL) {\n            layoutVertical()\n        } else {\n            layoutHorizontal()\n        }\n    }\n\n    /**\n     * Position the children during a layout pass if the orientation of this view is set to\n     * [VERTICAL].\n     */\n    private fun layoutVertical() {\n        var top = 0\n        var lBtnRight = measuredWidth - mButtonMarginEnd\n        var lBtnLeft = lBtnRight - leftButton.measuredWidth\n        var rBtnRight = measuredWidth - mButtonMarginEnd\n        var rBtnLeft = rBtnRight - rightButton.measuredWidth\n        if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_RTL) {\n            lBtnLeft = mButtonMarginEnd\n            lBtnRight = lBtnLeft + leftButton.measuredWidth\n            rBtnLeft = mButtonMarginEnd\n            rBtnRight = rBtnLeft + rightButton.measuredWidth\n        }\n        if (rightButton.visibility != GONE) {\n            rightButton.layout(rBtnLeft, top, rBtnRight, rightButton.measuredHeight)\n            top += rightButton.measuredHeight + mButtonMarginBottom\n        }\n        if (leftButton.visibility != GONE) {\n            leftButton.layout(lBtnLeft, top, lBtnRight, top + leftButton.measuredHeight)\n        }\n    }\n\n    /**\n     * Position the children during a layout pass if the orientation of this view is set to\n     * [HORIZONTAL].\n     */\n    private fun layoutHorizontal() {\n        var lBtnRight = leftButton.measuredWidth\n        var lBtnLeft = 0\n        var rBtnRight = measuredWidth - mButtonMarginEnd\n        var rBtnLeft = rBtnRight - rightButton.measuredWidth\n        if (ViewCompat.getLayoutDirection(this) == ViewCompat.LAYOUT_DIRECTION_RTL) {\n            rBtnLeft = mButtonMarginEnd\n            rBtnRight = rBtnLeft + rightButton.measuredWidth\n            lBtnRight = measuredWidth\n            lBtnLeft = lBtnRight - leftButton.measuredWidth\n        }\n        if (leftButton.visibility != GONE) {\n            leftButton.layout(lBtnLeft, 0, lBtnRight, leftButton.measuredHeight)\n        }\n        if (rightButton.visibility != GONE) {\n            rightButton.layout(rBtnLeft, 0, rBtnRight, rightButton.measuredHeight)\n        }\n    }\n\n    override fun checkLayoutParams(p: LayoutParams): Boolean {\n        return p is MarginLayoutParams\n    }\n\n    override fun generateDefaultLayoutParams(): LayoutParams {\n        return MarginLayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)\n    }\n\n    override fun generateLayoutParams(attrs: AttributeSet): LayoutParams {\n        return MarginLayoutParams(context, attrs)\n    }\n\n    override fun generateLayoutParams(p: LayoutParams): LayoutParams {\n        return MarginLayoutParams(p)\n    }\n\n    /**\n     * Returns the baseline of the left button if it's not hidden or the baseline of the right\n     * button. If both buttons hidden returns -1.\n     */\n    override fun getBaseline(): Int {\n        if (leftButton.visibility != GONE && leftButton.text != null) {\n            return leftButton.baseline\n        } else if (rightButton.visibility != GONE && rightButton.text != null) {\n            return rightButton.baseline\n        }\n        return -1\n    }\n\n    /**\n     * And orientation of buttons: either [HORIZONTAL] or [VERTICAL].\n     *\n     * Default value is [HORIZONTAL].\n     */\n    @get:OrientationMode\n    var orientation: Int\n        get() = mOrientation\n        set(orientation) {\n            if (mOrientation != orientation) {\n                mOrientation = orientation\n                requestLayout()\n            }\n        }\n\n    private fun getDimen(@DimenRes dimenId: Int): Int {\n        return context.resources.getDimensionPixelSize(dimenId)\n    }\n\n    companion object {\n        const val HORIZONTAL = 0\n        const val VERTICAL = 1\n    }\n}"
  },
  {
    "path": "library/src/main/java/com/sergivonavi/materialbanner/widget/MessageView.kt",
    "content": "/*\n * Copyright 2023 Sergey Ivanov\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 */\npackage com.sergivonavi.materialbanner.widget\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport androidx.annotation.RestrictTo\nimport androidx.appcompat.widget.AppCompatTextView\n\n@RestrictTo(RestrictTo.Scope.LIBRARY)\nclass MessageView : AppCompatTextView {\n\n    constructor(context: Context) : super(context)\n    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)\n    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(\n        context, attrs, defStyleAttr\n    )\n\n    /**\n     * Return the offset of the widget's last text line baseline from the widget's top\n     * boundary. If this widget does not support baseline alignment, this method returns -1.\n     *\n     * @return the offset of the baseline of the last text line within the widget's bounds or -1\n     * if baseline alignment is not supported\n     */\n    override fun getBaseline(): Int {\n        val layout = layout ?: return super.getBaseline()\n        val baselineOffset = super.getBaseline() - layout.getLineBaseline(0)\n        return baselineOffset + layout.getLineBaseline(layout.lineCount - 1)\n    }\n}"
  },
  {
    "path": "library/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <attr name=\"bannerStyle\" format=\"reference\" />\n\n    <declare-styleable name=\"Banner\">\n        <!-- Icon drawable to display at the start of this view. -->\n        <attr name=\"icon\" format=\"reference\" />\n        <!-- Tint color to use for the icon. -->\n        <attr name=\"iconTint\" format=\"color\" />\n        <!-- Message text to display in the Banner. -->\n        <attr name=\"messageText\" format=\"string|reference\" />\n        <!-- Text to display in the left button. -->\n        <attr name=\"buttonLeftText\" format=\"string|reference\" />\n        <!-- Text to display in the right button. -->\n        <attr name=\"buttonRightText\" format=\"string|reference\" />\n        <!-- Sets the padding, in pixels, of the start edge. -->\n        <attr name=\"contentPaddingStart\" format=\"dimension\" />\n        <!-- Sets the padding, in pixels, of the end edge. -->\n        <attr name=\"contentPaddingEnd\" format=\"dimension\" />\n        <!-- Banner font path. -->\n        <attr name=\"fontPath\" format=\"string\" />\n        <!-- Message font path. -->\n        <attr name=\"messageFontPath\" format=\"string\" />\n        <!-- Buttons font path. -->\n        <attr name=\"buttonsFontPath\" format=\"string\" />\n        <!-- Base text color, typeface, size, and style of the message text. -->\n        <attr name=\"messageTextAppearance\" format=\"reference\" />\n        <!-- Base text color, typeface, size, and style of the buttons' text. -->\n        <attr name=\"buttonsTextAppearance\" format=\"reference\" />\n        <!-- Message text color. -->\n        <attr name=\"messageTextColor\" format=\"color\" />\n        <!-- Buttons text color. -->\n        <attr name=\"buttonsTextColor\" format=\"color\" />\n        <!-- Left button text color. -->\n        <attr name=\"buttonLeftTextColor\" format=\"color\" />\n        <!-- Right button text color. -->\n        <attr name=\"buttonRightTextColor\" format=\"color\" />\n        <!-- Buttons' ripple color. -->\n        <attr name=\"buttonsRippleColor\" format=\"color\" />\n        <!-- Banner background color. -->\n        <attr name=\"backgroundColor\" format=\"color\" />\n        <!-- Divider color. -->\n        <attr name=\"lineColor\" format=\"color\" />\n        <!-- Divider opacity. -->\n        <attr name=\"lineOpacity\" format=\"float\" />\n    </declare-styleable>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/booleans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <bool name=\"mb_wide_layout\">false</bool>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <dimen name=\"mb_container_padding_top_singleline\">10dp</dimen>\n    <dimen name=\"mb_container_padding_top_multiline\">24dp</dimen>\n\n    <dimen name=\"mb_icon_size\">40dp</dimen>\n    <dimen name=\"mb_icon_margin_start\">16dp</dimen>\n\n    <dimen name=\"mb_message_margin_start\">16dp</dimen>\n    <dimen name=\"mb_message_margin_end_singleline\">36dp</dimen>\n    <dimen name=\"mb_message_margin_end_multiline\">16dp</dimen>\n    <dimen name=\"mb_message_margin_bottom_multiline\">12dp</dimen>\n    <dimen name=\"mb_message_margin_bottom_with_icon\">20dp</dimen>\n\n    <dimen name=\"mb_button_margin_end\">8dp</dimen>\n    <dimen name=\"mb_button_margin_bottom\">8dp</dimen>\n\n    <dimen name=\"mb_line_height\">1dp</dimen>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/ids.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <!-- The default banner id. Used in the Builder to save the view state -->\n    <item name=\"mb_banner\" type=\"id\" />\n\n    <item name=\"mb_container_content\" type=\"id\" />\n    <item name=\"mb_container_buttons\" type=\"id\" />\n    <item name=\"mb_icon\" type=\"id\" />\n    <item name=\"mb_message\" type=\"id\" />\n    <item name=\"mb_button_left\" type=\"id\" />\n    <item name=\"mb_button_right\" type=\"id\" />\n    <item name=\"mb_line\" type=\"id\" />\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values/library_materialbanner_strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string name=\"define_int_MaterialBanner\">year;owner</string>\n    <string name=\"library_MaterialBanner_author\">Sergey Ivanov</string>\n    <string name=\"library_MaterialBanner_authorWebsite\">https://github.com/sergivonavi</string>\n    <!-- Library section -->\n    <string name=\"library_MaterialBanner_libraryName\">MaterialBanner</string>\n    <string name=\"library_MaterialBanner_libraryDescription\">\n        <![CDATA[\n        <b>MaterialBanner</b> is a library that provides an implementation of the banner widget from the Material design.\n        ]]>\n    </string>\n    <string name=\"library_MaterialBanner_libraryWebsite\">https://github.com/sergivonavi/MaterialBanner</string>\n    <string name=\"library_MaterialBanner_libraryVersion\">@string/materialbanner_lib_version</string>\n    <string name=\"library_MaterialBanner_isOpenSource\">true</string>\n    <string name=\"library_MaterialBanner_repositoryLink\">https://github.com/sergivonavi/MaterialBanner</string>\n    <string name=\"library_MaterialBanner_licenseId\">apache_2_0</string>\n    <!-- Custom variables section -->\n    <string name=\"library_MaterialBanner_owner\">Sergey Ivanov</string>\n    <string name=\"library_MaterialBanner_year\">2019</string>\n</resources>\n"
  },
  {
    "path": "library/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <style name=\"TextAppearance\" />\n\n    <style name=\"TextAppearance.Banner\" />\n\n    <style name=\"TextAppearance.Banner.Message\" parent=\"@style/TextAppearance.MaterialComponents.Body2\">\n        <item name=\"android:textColor\">?colorOnSurface</item>\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n\n    <style name=\"TextAppearance.Banner.Button\" parent=\"@style/TextAppearance.MaterialComponents.Button\">\n        <item name=\"android:textColor\">?colorPrimary</item>\n        <item name=\"android:textSize\">14sp</item>\n    </style>\n\n    <style name=\"Widget\" />\n\n    <style name=\"Widget.Material\" />\n\n    <style name=\"Widget.Material.Banner\">\n        <item name=\"messageTextAppearance\">@style/TextAppearance.Banner.Message</item>\n        <item name=\"buttonsTextAppearance\">@style/TextAppearance.Banner.Button</item>\n        <item name=\"backgroundColor\">?colorSurface</item>\n        <item name=\"lineColor\">?colorOnSurface</item>\n        <item name=\"lineOpacity\">0.12</item>\n    </style>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values-sw720dp/booleans.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <bool name=\"mb_wide_layout\">true</bool>\n\n</resources>"
  },
  {
    "path": "library/src/main/res/values-sw720dp/dimens.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <dimen name=\"mb_container_padding_top_singleline\">8dp</dimen>\n    <dimen name=\"mb_container_padding_top_multiline\">16dp</dimen>\n\n    <dimen name=\"mb_message_margin_start\">24dp</dimen>\n    <dimen name=\"mb_message_margin_end_singleline\">90dp</dimen>\n    <dimen name=\"mb_message_margin_end_multiline\">90dp</dimen>\n    <dimen name=\"mb_message_margin_bottom_multiline\">0dp</dimen>\n    <dimen name=\"mb_message_margin_bottom_with_icon\">0dp</dimen>\n\n</resources>"
  },
  {
    "path": "settings.gradle",
    "content": "pluginManagement {\n    repositories {\n        google()\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\nrootProject.name = \"Material Banner\"\ninclude(\"library\", \"app\")"
  }
]