[
  {
    "path": ".gitattributes",
    "content": "# Auto detect text files and perform LF normalization\n* text=auto\n"
  },
  {
    "path": ".gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n.idea/modules.xml\n.idea/vcs.xml\n.idea/modules.xml\n.idea/modules.xml\n"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n            <option value=\"$PROJECT_DIR$/cardviewlibrary\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"NullableNotNullManager\">\n    <option name=\"myDefaultNullable\" value=\"android.support.annotation.Nullable\" />\n    <option name=\"myDefaultNotNull\" value=\"android.support.annotation.NonNull\" />\n    <option name=\"myNullables\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.Nullable\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nullable\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.Nullable\" />\n        </list>\n      </value>\n    </option>\n    <option name=\"myNotNulls\">\n      <value>\n        <list size=\"4\">\n          <item index=\"0\" class=\"java.lang.String\" itemvalue=\"org.jetbrains.annotations.NotNull\" />\n          <item index=\"1\" class=\"java.lang.String\" itemvalue=\"javax.annotation.Nonnull\" />\n          <item index=\"2\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.NonNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"android.support.annotation.NonNull\" />\n        </list>\n      </value>\n    </option>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_8\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n  <component name=\"masterDetails\">\n    <states>\n      <state key=\"ProjectJDKs.UI\">\n        <settings>\n          <last-edited>1.8</last-edited>\n          <splitter-proportions>\n            <option name=\"proportions\">\n              <list>\n                <option value=\"0.2\" />\n              </list>\n            </option>\n          </splitter-proportions>\n        </settings>\n      </state>\n    </states>\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "LICENSE",
    "content": "Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "README.md",
    "content": "# CardviewFix 简书地址 [https://www.jianshu.com/p/8c8b2708bdb4]\n\n##### 原生的CardView虽然好，但是公司UI设计必须修改阴影颜色\n这个库是基于google官方库，所以基本属性相同，增加三个属性，暂时只支持xml配置，分别是`startColor`，`endColor`，`topDelta`，意思是支持修改渐变颜色值，而`topDelta`是1.0.1版本加进来支持修改上下阴影比例的，取值范围是-1到1的浮点值，具体效果可以看截图\n\n\n>demo在另一个项目https://github.com/bigmanLau/Tablayout 去吧比卡丘\n\n\n\n依赖方式\nStep 1. Add the JitPack repository to your build file\nAdd it in your root build.gradle at the end of repositories:\n\n````\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n````\nStep 2. Add the dependency\n````\ndependencies {\n\t        implementation 'com.github.bigmanLau:CardviewFix:1.0.3'\n\t}\n````\n\n效果图如下\n![1.png](https://upload-images.jianshu.io/upload_images/12262980-a456f38c9faabf0d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n第一个item就是topDelta等于-1的效果，第二个item是topDelta等于0的效果，第三个item是topDelta等于1的效果\n\n>*注意：这个偏移量和cardCornerRadius的值有关，最大值就是cardCornerRadius的值，其实就是设置cardCornerRadius的百分比*\n\n##### 有些同学不喜欢我贴代码，那么直接上我的github地址去看\n\n具体原理看代码 \n[github地址] (https://github.com/bigmanLau/CardviewFix)\n\n>注意问题\n>1. 如果出现黑边  需要修改主题为` <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">`\n>2.其他属性用法和原生的一样\n>3.如果出现白边请用cardview的请设置` app:cardPreventCornerOverlap=\"false\"`\n\n请关注我的公众号，有很多免费信息和优秀小程序\n![扫码_搜索联合传播样式-微信标准绿版.png](https://upload-images.jianshu.io/upload_images/12262980-5ac93fc0b868dd4e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.1.51'\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.0.0'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "cardviewlibrary/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "cardviewlibrary/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\nandroid {\n    compileSdkVersion 26\n\n\n\n    defaultConfig {\n        minSdkVersion 14\n        targetSdkVersion 26\n        versionCode 1\n        versionName \"1.0\"\n\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    compileOptions {\n        targetCompatibility 1.8\n        sourceCompatibility 1.8\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation\"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version\"\n    implementation \"com.android.support:cardview-v7:26.1.0\"\n}\n"
  },
  {
    "path": "cardviewlibrary/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": "cardviewlibrary/src/androidTest/java/com/bigman/wmzx/cardviewlibrary/ExampleInstrumentedTest.java",
    "content": "package com.bigman.wmzx.cardviewlibrary;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n    @Test\n    public void useAppContext() throws Exception {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.bigman.wmzx.cardviewlibrary.test\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.bigman.wmzx.cardviewlibrary\" />\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardView.kt",
    "content": "package com.bigman.wmzx.customcardview.library\n\n/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport android.content.Context\nimport android.content.res.ColorStateList\nimport android.graphics.Color\nimport android.graphics.Rect\nimport android.graphics.drawable.Drawable\nimport android.os.Build\nimport android.support.annotation.ColorInt\nimport android.util.AttributeSet\nimport android.view.View\nimport android.widget.FrameLayout\nimport com.bigman.wmzx.cardviewlibrary.R\n\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewBaseImpl\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewDelegate\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewApi21Impl\n\n/**\n * A FrameLayout with a rounded corner background and shadow.\n *\n *\n * CardView uses `elevation` property on Lollipop for shadows and falls back to a\n * custom emulated shadow implementation on older platforms.\n *\n *\n * Due to expensive nature of rounded corner clipping, on platforms before Lollipop, CardView does\n * not clip its children that intersect with rounded corners. Instead, it adds padding to avoid such\n * intersection (See [.setPreventCornerOverlap] to change this behavior).\n *\n *\n * Before Lollipop, CardView adds padding to its content and draws shadows to that area. This\n * padding amount is equal to `maxCardElevation + (1 - cos45) * cornerRadius` on the\n * sides and `maxCardElevation * 1.5 + (1 - cos45) * cornerRadius` on top and bottom.\n *\n *\n * Since padding is used to offset content for shadows, you cannot set padding on CardView.\n * Instead, you can use content padding attributes in XML or\n * [.setContentPadding] in code to set the padding between the edges of\n * the CardView and children of CardView.\n *\n *\n * Note that, if you specify exact dimensions for the CardView, because of the shadows, its content\n * area will be different between platforms before Lollipop and after Lollipop. By using api version\n * specific resource values, you can avoid these changes. Alternatively, If you want CardView to add\n * inner padding on platforms Lollipop and after as well, you can call\n * [.setUseCompatPadding] and pass `true`.\n *\n *\n * To change CardView's elevation in a backward compatible way, use\n * [.setCardElevation]. CardView will use elevation API on Lollipop and before\n * Lollipop, it will change the shadow size. To avoid moving the View while shadow size is changing,\n * shadow size is clamped by [.getMaxCardElevation]. If you want to change elevation\n * dynamically, you should call [.setMaxCardElevation] when CardView is initialized.\n *\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardBackgroundColor\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardCornerRadius\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardElevation\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardMaxElevation\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardUseCompatPadding\n * @attr ref android.support.v7.cardview.R.styleable#CardView_cardPreventCornerOverlap\n * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPadding\n * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingLeft\n * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingTop\n * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingRight\n * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingBottom\n */\nclass CardView : FrameLayout {\n\n    private var mCompatPadding: Boolean = false\n\n    private var mPreventCornerOverlap: Boolean = false\n\n    /**\n     * CardView requires to have a particular minimum size to draw shadows before API 21. If\n     * developer also sets min width/height, they might be overridden.\n     *\n     * CardView works around this issue by recording user given parameters and using an internal\n     * method to set them.\n     */\n    internal var mUserSetMinWidth: Int = 0\n    internal var mUserSetMinHeight: Int = 0\n\n    internal val mContentPadding = Rect()\n\n    internal val mShadowBounds = Rect()\n\n    private var mEndColor: Int = 0\n\n    private var mStartColor: Int = 0\n\n    /**\n     * Returns whether CardView will add inner padding on platforms Lollipop and after.\n     *\n     * @return `true` if CardView adds inner padding on platforms Lollipop and after to\n     * have same dimensions with platforms before Lollipop.\n     */\n    /**\n     * CardView adds additional padding to draw shadows on platforms before Lollipop.\n     *\n     *\n     * This may cause Cards to have different sizes between Lollipop and before Lollipop. If you\n     * need to align CardView with other Views, you may need api version specific dimension\n     * resources to account for the changes.\n     * As an alternative, you can set this flag to `true` and CardView will add the same\n     * padding values on platforms Lollipop and after.\n     *\n     *\n     * Since setting this flag to true adds unnecessary gaps in the UI, default value is\n     * `false`.\n     *\n     * @param useCompatPadding `true>` if CardView should add padding for the shadows on\n     * platforms Lollipop and above.\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardUseCompatPadding\n     */\n    var useCompatPadding: Boolean\n        get() = mCompatPadding\n        set(useCompatPadding) {\n            if (mCompatPadding != useCompatPadding) {\n                mCompatPadding = useCompatPadding\n                IMPL.onCompatPaddingChanged(mCardViewDelegate)\n            }\n        }\n\n    /**\n     * Returns the background color state list of the CardView.\n     *\n     * @return The background color state list of the CardView.\n     */\n    val cardBackgroundColor: ColorStateList\n        get() = IMPL.getBackgroundColor(mCardViewDelegate)\n\n    /**\n     * Returns the inner padding after the Card's left edge\n     *\n     * @return the inner padding after the Card's left edge\n     */\n    val contentPaddingLeft: Int\n        get() = mContentPadding.left\n\n    /**\n     * Returns the inner padding before the Card's right edge\n     *\n     * @return the inner padding before the Card's right edge\n     */\n    val contentPaddingRight: Int\n        get() = mContentPadding.right\n\n    /**\n     * Returns the inner padding after the Card's top edge\n     *\n     * @return the inner padding after the Card's top edge\n     */\n    val contentPaddingTop: Int\n        get() = mContentPadding.top\n\n    /**\n     * Returns the inner padding before the Card's bottom edge\n     *\n     * @return the inner padding before the Card's bottom edge\n     */\n    val contentPaddingBottom: Int\n        get() = mContentPadding.bottom\n\n    /**\n     * Returns the corner radius of the CardView.\n     *\n     * @return Corner radius of the CardView\n     * @see .getRadius\n     */\n    /**\n     * Updates the corner radius of the CardView.\n     *\n     * @param radius The radius in pixels of the corners of the rectangle shape\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardCornerRadius\n     * @see .setRadius\n     */\n    var radius: Float\n        get() = IMPL.getRadius(mCardViewDelegate)\n        set(radius) = IMPL.setRadius(mCardViewDelegate, radius)\n\n    /**\n     * Returns the backward compatible elevation of the CardView.\n     *\n     * @return Elevation of the CardView\n     * @see .setCardElevation\n     * @see .getMaxCardElevation\n     */\n    /**\n     * Updates the backward compatible elevation of the CardView.\n     *\n     * @param elevation The backward compatible elevation in pixels.\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardElevation\n     * @see .getCardElevation\n     * @see .setMaxCardElevation\n     */\n    var cardElevation: Float\n        get() = IMPL.getElevation(mCardViewDelegate)\n        set(elevation) = IMPL.setElevation(mCardViewDelegate, elevation)\n\n    /**\n     * Returns the backward compatible maximum elevation of the CardView.\n     *\n     * @return Maximum elevation of the CardView\n     * @see .setMaxCardElevation\n     * @see .getCardElevation\n     */\n    /**\n     * Updates the backward compatible maximum elevation of the CardView.\n     *\n     *\n     * Calling this method has no effect if device OS version is Lollipop or newer and\n     * [.getUseCompatPadding] is `false`.\n     *\n     * @param maxElevation The backward compatible maximum elevation in pixels.\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardMaxElevation\n     * @see .setCardElevation\n     * @see .getMaxCardElevation\n     */\n    var maxCardElevation: Float\n        get() = IMPL.getMaxElevation(mCardViewDelegate)\n        set(maxElevation) = IMPL.setMaxElevation(mCardViewDelegate, maxElevation)\n\n    /**\n     * Returns whether CardView should add extra padding to content to avoid overlaps with rounded\n     * corners on pre-Lollipop platforms.\n     *\n     * @return True if CardView prevents overlaps with rounded corners on platforms before Lollipop.\n     * Default value is `true`.\n     */\n    /**\n     * On pre-Lollipop platforms, CardView does not clip the bounds of the Card for the rounded\n     * corners. Instead, it adds padding to content so that it won't overlap with the rounded\n     * corners. You can disable this behavior by setting this field to `false`.\n     *\n     *\n     * Setting this value on Lollipop and above does not have any effect unless you have enabled\n     * compatibility padding.\n     *\n     * @param preventCornerOverlap Whether CardView should add extra padding to content to avoid\n     * overlaps with the CardView corners.\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardPreventCornerOverlap\n     * @see .setUseCompatPadding\n     */\n    var preventCornerOverlap: Boolean\n        get() = mPreventCornerOverlap\n        set(preventCornerOverlap) {\n            if (preventCornerOverlap != mPreventCornerOverlap) {\n                mPreventCornerOverlap = preventCornerOverlap\n                IMPL.onPreventCornerOverlapChanged(mCardViewDelegate)\n            }\n        }\n\n    private val mCardViewDelegate = object : CardViewDelegate {\n        private var mCardBackground: Drawable? = null\n\n        override fun setCardBackground(drawable: Drawable) {\n            mCardBackground = drawable\n            setBackgroundDrawable(drawable)\n        }\n\n        override fun getUseCompatPadding(): Boolean {\n            return this@CardView.useCompatPadding\n        }\n\n        override fun getPreventCornerOverlap(): Boolean {\n            return this@CardView.preventCornerOverlap\n        }\n\n        override fun setShadowPadding(left: Int, top: Int, right: Int, bottom: Int) {\n            mShadowBounds.set(left, top, right, bottom)\n            super@CardView.setPadding(left + mContentPadding.left, top + mContentPadding.top,\n                    right + mContentPadding.right, bottom + mContentPadding.bottom)\n        }\n\n        override fun setMinWidthHeightInternal(width: Int, height: Int) {\n            if (width > mUserSetMinWidth) {\n                super@CardView.setMinimumWidth(width)\n            }\n            if (height > mUserSetMinHeight) {\n                super@CardView.setMinimumHeight(height)\n            }\n        }\n\n        override fun getCardBackground(): Drawable? {\n            return mCardBackground\n        }\n\n        override fun getCardView(): View {\n            return this@CardView\n        }\n    }\n\n    constructor(context: Context) : super(context) {\n        initialize(context, null, 0)\n    }\n\n    constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {\n        initialize(context, attrs, 0)\n    }\n\n    constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {\n        initialize(context, attrs, defStyleAttr)\n    }\n\n    override fun setPadding(left: Int, top: Int, right: Int, bottom: Int) {\n        // NO OP\n    }\n\n    override fun setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int) {\n        // NO OP\n    }\n\n    /**\n     * Sets the padding between the Card's edges and the children of CardView.\n     *\n     *\n     * Depending on platform version or [.getUseCompatPadding] settings, CardView may\n     * update these values before calling [View.setPadding].\n     *\n     * @param left   The left padding in pixels\n     * @param top    The top padding in pixels\n     * @param right  The right padding in pixels\n     * @param bottom The bottom padding in pixels\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPadding\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingLeft\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingTop\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingRight\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingBottom\n     */\n    fun setContentPadding(left: Int, top: Int, right: Int, bottom: Int) {\n        mContentPadding.set(left, top, right, bottom)\n        IMPL.updatePadding(mCardViewDelegate)\n    }\n\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        var widthMeasureSpec = widthMeasureSpec\n        var heightMeasureSpec = heightMeasureSpec\n        if (IMPL !is CardViewApi21Impl) {\n            val widthMode = View.MeasureSpec.getMode(widthMeasureSpec)\n            when (widthMode) {\n                View.MeasureSpec.EXACTLY, View.MeasureSpec.AT_MOST -> {\n                    val minWidth = Math.ceil(IMPL.getMinWidth(mCardViewDelegate).toDouble()).toInt()\n                    widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(Math.max(minWidth,\n                            View.MeasureSpec.getSize(widthMeasureSpec)), widthMode)\n                }\n                View.MeasureSpec.UNSPECIFIED -> {\n                }\n            }// Do nothing\n\n            val heightMode = View.MeasureSpec.getMode(heightMeasureSpec)\n            when (heightMode) {\n                View.MeasureSpec.EXACTLY, View.MeasureSpec.AT_MOST -> {\n                    val minHeight = Math.ceil(IMPL.getMinHeight(mCardViewDelegate).toDouble()).toInt()\n                    heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(Math.max(minHeight,\n                            View.MeasureSpec.getSize(heightMeasureSpec)), heightMode)\n                }\n                View.MeasureSpec.UNSPECIFIED -> {\n                }\n            }// Do nothing\n            super.onMeasure(widthMeasureSpec, heightMeasureSpec)\n        } else {\n            super.onMeasure(widthMeasureSpec, heightMeasureSpec)\n        }\n    }\n\n    private var mTopDelta: Float=1f\n\n    private fun initialize(context: Context, attrs: AttributeSet?, defStyleAttr: Int) {\n        val a = context.obtainStyledAttributes(attrs, R.styleable.CardView, defStyleAttr,\n                R.style.CardView)\n\n\n        val backgroundColor: ColorStateList?\n        if (a.hasValue(R.styleable.CardView_cardBackgroundColor)) {\n            backgroundColor = a.getColorStateList(R.styleable.CardView_cardBackgroundColor)\n        } else {\n            // There isn't one set, so we'll compute one based on the theme\n            val aa = getContext().obtainStyledAttributes(COLOR_BACKGROUND_ATTR)\n            val themeColorBackground = aa.getColor(0, 0)\n            aa.recycle()\n\n            // If the theme colorBackground is light, use our own light color, otherwise dark\n            val hsv = FloatArray(3)\n            Color.colorToHSV(themeColorBackground, hsv)\n            backgroundColor = ColorStateList.valueOf(if (hsv[2] > 0.5f)\n                resources.getColor(R.color.cardview_light_background)\n            else\n                resources.getColor(R.color.cardview_dark_background))\n        }\n        val radius = a.getDimension(R.styleable.CardView_cardCornerRadius, 0f)\n        val elevation = a.getDimension(R.styleable.CardView_cardElevation, 0f)\n        var maxElevation = a.getDimension(R.styleable.CardView_cardMaxElevation, 0f)\n        mCompatPadding = a.getBoolean(R.styleable.CardView_cardUseCompatPadding, false)\n        mPreventCornerOverlap = a.getBoolean(R.styleable.CardView_cardPreventCornerOverlap, true)\n        val defaultPadding = a.getDimensionPixelSize(R.styleable.CardView_contentPadding, 0)\n        mContentPadding.left = a.getDimensionPixelSize(R.styleable.CardView_contentPaddingLeft,\n                defaultPadding)\n        mContentPadding.top = a.getDimensionPixelSize(R.styleable.CardView_contentPaddingTop,\n                defaultPadding)\n        mContentPadding.right = a.getDimensionPixelSize(R.styleable.CardView_contentPaddingRight,\n                defaultPadding)\n        mContentPadding.bottom = a.getDimensionPixelSize(R.styleable.CardView_contentPaddingBottom,\n                defaultPadding)\n        if (elevation > maxElevation) {\n            maxElevation = elevation\n        }\n        mUserSetMinWidth = a.getDimensionPixelSize(R.styleable.CardView_android_minWidth, 0)\n        mUserSetMinHeight = a.getDimensionPixelSize(R.styleable.CardView_android_minHeight, 0)\n        a.recycle()\n\n        val a2 = context.obtainStyledAttributes(attrs, R.styleable.CardViewShadow)\n        val n = a2.indexCount\n        if(a2.hasValue(R.styleable.CardViewShadow_topDelta)){\n            mTopDelta=a2.getFloat(R.styleable.CardViewShadow_topDelta,0f)\n        }\n        if (a2.hasValue(R.styleable.CardViewShadow_endColor) && a2.hasValue(R.styleable.CardViewShadow_startColor)) {\n            for (i in 0 until n) {\n                val attr = a.getIndex(i)\n                when (attr) {\n                    R.styleable.CardViewShadow_endColor -> mEndColor = a.getColor(attr, resources.getColor(R.color.cardview_shadow_end_color))\n                    R.styleable.CardViewShadow_startColor -> mStartColor = a.getColor(attr, resources.getColor(R.color.cardview_shadow_start_color))\n                }\n\n            }\n            IMPL.initialize(mCardViewDelegate, context, backgroundColor, radius,\n                    elevation, maxElevation, mStartColor, mEndColor,mTopDelta)\n        } else {\n            IMPL.initialize(mCardViewDelegate, context, backgroundColor, radius,\n                    elevation, maxElevation,mTopDelta)\n        }\n\n\n    }\n\n    override fun setMinimumWidth(minWidth: Int) {\n        mUserSetMinWidth = minWidth\n        super.setMinimumWidth(minWidth)\n    }\n\n    override fun setMinimumHeight(minHeight: Int) {\n        mUserSetMinHeight = minHeight\n        super.setMinimumHeight(minHeight)\n    }\n\n    /**\n     * Updates the background color of the CardView\n     *\n     * @param color The new color to set for the card background\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardBackgroundColor\n     */\n    fun setCardBackgroundColor(@ColorInt color: Int) {\n        IMPL.setBackgroundColor(mCardViewDelegate, ColorStateList.valueOf(color))\n    }\n\n    /**\n     * Updates the background ColorStateList of the CardView\n     *\n     * @param color The new ColorStateList to set for the card background\n     * @attr ref android.support.v7.cardview.R.styleable#CardView_cardBackgroundColor\n     */\n    fun setCardBackgroundColor(color: ColorStateList?) {\n        IMPL.setBackgroundColor(mCardViewDelegate, color)\n    }\n\n    companion object {\n\n        private val COLOR_BACKGROUND_ATTR = intArrayOf(android.R.attr.colorBackground)\n        private val IMPL: CardViewImpl = if (Build.VERSION.SDK_INT >= 17) {\n            CardViewApi17Impl()\n        } else {\n            CardViewBaseImpl()\n        }\n\n        init {\n            IMPL.initStatic()\n        }\n    }\n}\n\n\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardViewApi17Impl.kt",
    "content": "package com.bigman.wmzx.customcardview.library\n\nimport android.content.Context\nimport android.content.res.ColorStateList\nimport android.graphics.Canvas\nimport android.graphics.Paint\nimport android.graphics.RectF\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewBaseImpl\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewDelegate\n\n\n/**\n * create by bigman\n * create date == 2018/7/10\n * create time == 15:48\n */\ninternal class CardViewApi17Impl : CardViewBaseImpl() {\n\n\n    override fun initStatic() {\n        RoundRectDrawableWithShadow.sRoundRectHelper = object : RoundRectDrawableWithShadow.RoundRectHelper {\n            override fun drawRoundRect(canvas: Canvas, bounds: RectF, cornerRadius: Float, paint: Paint?) {\n                canvas.drawRoundRect(bounds, cornerRadius, cornerRadius, paint)\n            }\n\n\n        }\n\n    }\n\n}"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardViewApi21Impl.kt",
    "content": "package com.bigman.wmzx.cardviewlibrary.library\n\nimport android.content.Context\nimport android.content.res.ColorStateList\nimport android.support.annotation.RequiresApi\nimport com.bigman.wmzx.customcardview.library.CardViewImpl\nimport com.bigman.wmzx.customcardview.library.RoundRectDrawableWithShadow\n\n/**\n * create by bigman\n * create date == 2018/7/26\n * create time == 15:46\n */\n\n@RequiresApi(21)\ninternal class CardViewApi21Impl : CardViewImpl {\n    override fun initialize(cardViewDelegate: CardViewDelegate, context: Context, backgroundColor: ColorStateList,\n                            radius: Float, elevation: Float, maxElevation: Float, startColor: Int, endColor: Int, topDelta: Float) {\n        TODO(\"not implemented\") //To change body of created functions use File | Settings | File Templates.\n    }\n\n    override fun initialize(cardView: CardViewDelegate, context: Context, backgroundColor: ColorStateList, radius: Float\n                            , elevation: Float, maxElevation: Float, topDelta: Float) {\n        val background = RoundRectDrawable(backgroundColor, radius)\n        cardView.cardBackground = background\n\n        val view = cardView.cardView\n        view.clipToOutline = true\n        view.elevation = elevation\n        setMaxElevation(cardView, maxElevation)\n    }\n\n\n\n    override fun setRadius(cardView: CardViewDelegate, radius: Float) {\n        getCardBackground(cardView).radius = radius\n    }\n\n    override fun initStatic() {}\n\n    override fun setMaxElevation(cardView: CardViewDelegate, maxElevation: Float) {\n        getCardBackground(cardView).setPadding(maxElevation,\n                cardView.useCompatPadding, cardView.preventCornerOverlap)\n        updatePadding(cardView)\n    }\n\n    override fun getMaxElevation(cardView: CardViewDelegate): Float {\n        return getCardBackground(cardView).padding\n    }\n\n    override fun getMinWidth(cardView: CardViewDelegate): Float {\n        return getRadius(cardView) * 2\n    }\n\n    override fun getMinHeight(cardView: CardViewDelegate): Float {\n        return getRadius(cardView) * 2\n    }\n\n    override fun getRadius(cardView: CardViewDelegate): Float {\n        return getCardBackground(cardView).radius\n    }\n\n    override fun setElevation(cardView: CardViewDelegate, elevation: Float) {\n        cardView.cardView.elevation = elevation\n    }\n\n    override fun getElevation(cardView: CardViewDelegate): Float {\n        return cardView.cardView.elevation\n    }\n\n    override fun updatePadding(cardView: CardViewDelegate) {\n        if (!cardView.useCompatPadding) {\n            cardView.setShadowPadding(0, 0, 0, 0)\n            return\n        }\n        val elevation = getMaxElevation(cardView)\n        val radius = getRadius(cardView)\n        val hPadding = Math.ceil(RoundRectDrawableWithShadow\n                .calculateHorizontalPadding(elevation, radius, cardView.preventCornerOverlap).toDouble()).toInt()\n        val vPadding = Math.ceil(RoundRectDrawableWithShadow\n                .calculateVerticalPadding(elevation, radius, cardView.preventCornerOverlap).toDouble()).toInt()\n        cardView.setShadowPadding(hPadding, vPadding, hPadding, vPadding)\n    }\n\n    override fun onCompatPaddingChanged(cardView: CardViewDelegate) {\n        setMaxElevation(cardView, getMaxElevation(cardView))\n    }\n\n    override fun onPreventCornerOverlapChanged(cardView: CardViewDelegate) {\n        setMaxElevation(cardView, getMaxElevation(cardView))\n    }\n\n    override fun setBackgroundColor(cardView: CardViewDelegate, color: ColorStateList?) {\n        getCardBackground(cardView).color = color\n    }\n\n    override fun getBackgroundColor(cardView: CardViewDelegate): ColorStateList {\n        return getCardBackground(cardView).color\n    }\n\n\n\n    private fun getCardBackground(cardView: CardViewDelegate): RoundRectDrawable {\n        return cardView.cardBackground as RoundRectDrawable\n    }\n}\n\n\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardViewBaseImpl.java",
    "content": "package com.bigman.wmzx.cardviewlibrary.library;\n\nimport android.content.Context;\nimport android.content.res.ColorStateList;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.support.annotation.Nullable;\n\nimport com.bigman.wmzx.customcardview.library.CardViewImpl;\nimport com.bigman.wmzx.customcardview.library.RoundRectDrawableWithShadow;\n\n\npublic class CardViewBaseImpl implements CardViewImpl {\n\n    private final RectF mCornerRect = new RectF();\n\n    @Override\n    public void initStatic() {\n        // Draws a round rect using 7 draw operations. This is faster than using\n        // canvas.drawRoundRect before JBMR1 because API 11-16 used alpha mask textures to draw\n        // shapes.\n        RoundRectDrawableWithShadow.Companion.setSRoundRectHelper((canvas, bounds, cornerRadius, paint) -> {\n            final float twoRadius = cornerRadius * 2;\n            final float innerWidth = bounds.width() - twoRadius - 1;\n            final float innerHeight = bounds.height() - twoRadius - 1;\n            if (cornerRadius >= 1f) {\n                // increment corner radius to account for half pixels.\n                float roundedCornerRadius = cornerRadius + .5f;\n                mCornerRect.set(-roundedCornerRadius, -roundedCornerRadius, roundedCornerRadius,\n                        roundedCornerRadius);\n                int saved = canvas.save();\n                canvas.translate(bounds.left + roundedCornerRadius,\n                        bounds.top + roundedCornerRadius);\n                canvas.drawArc(mCornerRect, 180, 90, true, paint);\n                canvas.translate(innerWidth, 0);\n                canvas.rotate(90);\n                canvas.drawArc(mCornerRect, 180, 90, true, paint);\n                canvas.translate(innerHeight, 0);\n                canvas.rotate(90);\n                canvas.drawArc(mCornerRect, 180, 90, true, paint);\n                canvas.translate(innerWidth, 0);\n                canvas.rotate(90);\n                canvas.drawArc(mCornerRect, 180, 90, true, paint);\n                canvas.restoreToCount(saved);\n                //draw top and bottom pieces\n                canvas.drawRect(bounds.left + roundedCornerRadius - 1f, bounds.top,\n                        bounds.right - roundedCornerRadius + 1f,\n                        bounds.top + roundedCornerRadius, paint);\n\n                canvas.drawRect(bounds.left + roundedCornerRadius - 1f,\n                        bounds.bottom - roundedCornerRadius,\n                        bounds.right - roundedCornerRadius + 1f, bounds.bottom, paint);\n            }\n            // center\n            canvas.drawRect(bounds.left, bounds.top + cornerRadius,\n                    bounds.right, bounds.bottom - cornerRadius, paint);\n        });\n    }\n\n    @Override\n    public void initialize(CardViewDelegate cardView, Context context,\n                           ColorStateList backgroundColor, float radius, float elevation, float maxElevation,float topDelta) {\n        RoundRectDrawableWithShadow background = createBackground(context, backgroundColor, radius,\n                elevation, maxElevation,topDelta);\n        background.setAddPaddingForCorners(cardView.getPreventCornerOverlap());\n        cardView.setCardBackground(background);\n        updatePadding(cardView);\n    }\n\n    private RoundRectDrawableWithShadow createBackground(Context context,\n                                                         ColorStateList backgroundColor, float radius, float elevation,\n                                                         float maxElevation,float topDelta) {\n        return new RoundRectDrawableWithShadow(context.getResources(), backgroundColor, radius,\n                elevation, maxElevation,topDelta);\n    }\n\n    @Override\n    public void updatePadding(CardViewDelegate cardView) {\n        Rect shadowPadding = new Rect();\n        getShadowBackground(cardView).getMaxShadowAndCornerPadding(shadowPadding);\n        cardView.setMinWidthHeightInternal((int) Math.ceil(getMinWidth(cardView)),\n                (int) Math.ceil(getMinHeight(cardView)));\n        cardView.setShadowPadding(shadowPadding.left, shadowPadding.top,\n                shadowPadding.right, shadowPadding.bottom);\n    }\n\n    @Override\n    public void onCompatPaddingChanged(CardViewDelegate cardView) {\n        // NO OP\n    }\n\n    @Override\n    public void onPreventCornerOverlapChanged(CardViewDelegate cardView) {\n        getShadowBackground(cardView).setAddPaddingForCorners(cardView.getPreventCornerOverlap());\n        updatePadding(cardView);\n    }\n\n    @Override\n    public void setBackgroundColor(CardViewDelegate cardView, @Nullable ColorStateList color) {\n        getShadowBackground(cardView).setColor(color);\n    }\n\n    @Override\n    public ColorStateList getBackgroundColor(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getColor();\n    }\n\n    @Override\n    public void initialize(CardViewDelegate cardView, Context context,\n                           ColorStateList backgroundColor, float radius, float elevation,\n                           float maxElevation, int startColor, int endColor,float topDelta) {\n        RoundRectDrawableWithShadow background = createBackground(context, backgroundColor, radius,\n                elevation, maxElevation,startColor,endColor,topDelta);\n        background.setAddPaddingForCorners(cardView.getPreventCornerOverlap());\n        cardView.setCardBackground(background);\n        updatePadding(cardView);\n    }\n\n    private RoundRectDrawableWithShadow createBackground(Context context, ColorStateList backgroundColor,\n                                                         float radius, float elevation, float maxElevation,\n                                                         int startColor, int endColor,float topDelta) {\n        return new RoundRectDrawableWithShadow(context.getResources(), backgroundColor, radius,\n                elevation, maxElevation,startColor,endColor,topDelta);\n    }\n\n    @Override\n    public void setRadius(CardViewDelegate cardView, float radius) {\n        getShadowBackground(cardView).setCornerRadius(radius);\n        updatePadding(cardView);\n    }\n\n    @Override\n    public float getRadius(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getCornerRadius();\n    }\n\n    @Override\n    public void setElevation(CardViewDelegate cardView, float elevation) {\n        getShadowBackground(cardView).setShadowSize(elevation);\n    }\n\n    @Override\n    public float getElevation(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getShadowSize();\n    }\n\n    @Override\n    public void setMaxElevation(CardViewDelegate cardView, float maxElevation) {\n        getShadowBackground(cardView).setMaxShadowSize(maxElevation);\n        updatePadding(cardView);\n    }\n\n    @Override\n    public float getMaxElevation(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getMaxShadowSize();\n    }\n\n    @Override\n    public float getMinWidth(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getMinWidth();\n    }\n\n    @Override\n    public float getMinHeight(CardViewDelegate cardView) {\n        return getShadowBackground(cardView).getMinHeight();\n    }\n\n    private RoundRectDrawableWithShadow getShadowBackground(CardViewDelegate cardView) {\n        return ((RoundRectDrawableWithShadow) cardView.getCardBackground());\n    }\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardViewDelegate.java",
    "content": "package com.bigman.wmzx.cardviewlibrary.library;\n\nimport android.graphics.drawable.Drawable;\nimport android.view.View;\n\n/**\n * create by bigman\n * create date == 2018/7/10\n * create time == 11:01\n */\n\npublic interface CardViewDelegate {\n    void setCardBackground(Drawable drawable);\n    Drawable getCardBackground();\n    boolean getUseCompatPadding();\n    boolean getPreventCornerOverlap();\n    void setShadowPadding(int left, int top, int right, int bottom);\n    void setMinWidthHeightInternal(int width, int height);\n    View getCardView();\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/CardViewImpl.kt",
    "content": "package com.bigman.wmzx.customcardview.library\n\nimport android.content.Context\nimport android.content.res.ColorStateList\nimport com.bigman.wmzx.cardviewlibrary.library.CardViewDelegate\n\n\ninternal interface CardViewImpl {\n    fun initialize(cardView: CardViewDelegate, context: Context, backgroundColor: ColorStateList,\n                   radius: Float, elevation: Float, maxElevation: Float, topDelta: Float)\n\n    fun setRadius(cardView: CardViewDelegate, radius: Float)\n\n    fun getRadius(cardView: CardViewDelegate): Float\n\n    fun setElevation(cardView: CardViewDelegate, elevation: Float)\n\n    fun getElevation(cardView: CardViewDelegate): Float\n\n    fun initStatic()\n\n    fun setMaxElevation(cardView: CardViewDelegate, maxElevation: Float)\n\n    fun getMaxElevation(cardView: CardViewDelegate): Float\n\n    fun getMinWidth(cardView: CardViewDelegate): Float\n\n    fun getMinHeight(cardView: CardViewDelegate): Float\n\n    fun updatePadding(cardView: CardViewDelegate)\n\n    fun onCompatPaddingChanged(cardView: CardViewDelegate)\n\n    fun onPreventCornerOverlapChanged(cardView: CardViewDelegate)\n\n    fun setBackgroundColor(cardView: CardViewDelegate, color: ColorStateList?)\n\n    fun getBackgroundColor(cardView: CardViewDelegate): ColorStateList\n\n    fun initialize(cardViewDelegate: CardViewDelegate, context: Context,\n                   backgroundColor: ColorStateList, radius: Float, elevation: Float\n                   , maxElevation: Float, startColor: Int, endColor: Int, topDelta: Float)\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/RoundRectDrawable.java",
    "content": "package com.bigman.wmzx.cardviewlibrary.library;\n\n\n\n\nimport android.content.res.ColorStateList;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.ColorFilter;\nimport android.graphics.Outline;\nimport android.graphics.Paint;\nimport android.graphics.PixelFormat;\nimport android.graphics.PorterDuff;\nimport android.graphics.PorterDuffColorFilter;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.graphics.drawable.Drawable;\nimport android.support.annotation.Nullable;\nimport android.support.annotation.RequiresApi;\n\nimport com.bigman.wmzx.customcardview.library.RoundRectDrawableWithShadow;\n\n\n/**\n * Very simple drawable that draws a rounded rectangle background with arbitrary corners and also\n * reports proper outline for Lollipop.\n * <p>\n * Simpler and uses less resources compared to GradientDrawable or ShapeDrawable.\n */\n@RequiresApi(21)\npublic class RoundRectDrawable extends Drawable {\n    private float mRadius;\n    private final Paint mPaint;\n    private final RectF mBoundsF;\n    private final Rect mBoundsI;\n    private float mPadding;\n    private boolean mInsetForPadding = false;\n    private boolean mInsetForRadius = true;\n\n    private ColorStateList mBackground;\n    private PorterDuffColorFilter mTintFilter;\n    private ColorStateList mTint;\n    private PorterDuff.Mode mTintMode = PorterDuff.Mode.SRC_IN;\n\n    public RoundRectDrawable(ColorStateList backgroundColor, float radius) {\n        mRadius = radius;\n        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);\n        setBackground(backgroundColor);\n\n        mBoundsF = new RectF();\n        mBoundsI = new Rect();\n    }\n\n    private void setBackground(ColorStateList color) {\n        mBackground = (color == null) ?  ColorStateList.valueOf(Color.TRANSPARENT) : color;\n        mPaint.setColor(mBackground.getColorForState(getState(), mBackground.getDefaultColor()));\n    }\n\n    void setPadding(float padding, boolean insetForPadding, boolean insetForRadius) {\n        if (padding == mPadding && mInsetForPadding == insetForPadding\n                && mInsetForRadius == insetForRadius) {\n            return;\n        }\n        mPadding = padding;\n        mInsetForPadding = insetForPadding;\n        mInsetForRadius = insetForRadius;\n        updateBounds(null);\n        invalidateSelf();\n    }\n\n    float getPadding() {\n        return mPadding;\n    }\n\n    @Override\n    public void draw(Canvas canvas) {\n        final Paint paint = mPaint;\n\n        final boolean clearColorFilter;\n        if (mTintFilter != null && paint.getColorFilter() == null) {\n            paint.setColorFilter(mTintFilter);\n            clearColorFilter = true;\n        } else {\n            clearColorFilter = false;\n        }\n\n        canvas.drawRoundRect(mBoundsF, mRadius, mRadius, paint);\n\n        if (clearColorFilter) {\n            paint.setColorFilter(null);\n        }\n    }\n\n    private void updateBounds(Rect bounds) {\n        if (bounds == null) {\n            bounds = getBounds();\n        }\n        mBoundsF.set(bounds.left, bounds.top, bounds.right, bounds.bottom);\n        mBoundsI.set(bounds);\n        if (mInsetForPadding) {\n            float vInset = RoundRectDrawableWithShadow.Companion.calculateVerticalPadding(mPadding, mRadius, mInsetForRadius);\n            float hInset = RoundRectDrawableWithShadow.Companion.calculateHorizontalPadding(mPadding, mRadius, mInsetForRadius);\n            mBoundsI.inset((int) Math.ceil(hInset), (int) Math.ceil(vInset));\n            // to make sure they have same bounds.\n            mBoundsF.set(mBoundsI);\n        }\n    }\n\n    @Override\n    protected void onBoundsChange(Rect bounds) {\n        super.onBoundsChange(bounds);\n        updateBounds(bounds);\n    }\n\n    @Override\n    public void getOutline(Outline outline) {\n        outline.setRoundRect(mBoundsI, mRadius);\n    }\n\n    void setRadius(float radius) {\n        if (radius == mRadius) {\n            return;\n        }\n        mRadius = radius;\n        updateBounds(null);\n        invalidateSelf();\n    }\n\n    @Override\n    public void setAlpha(int alpha) {\n        mPaint.setAlpha(alpha);\n    }\n\n    @Override\n    public void setColorFilter(ColorFilter cf) {\n        mPaint.setColorFilter(cf);\n    }\n\n    @Override\n    public int getOpacity() {\n        return PixelFormat.TRANSLUCENT;\n    }\n\n    public float getRadius() {\n        return mRadius;\n    }\n\n    public void setColor(@Nullable ColorStateList color) {\n        setBackground(color);\n        invalidateSelf();\n    }\n\n    public ColorStateList getColor() {\n        return mBackground;\n    }\n\n    @Override\n    public void setTintList(ColorStateList tint) {\n        mTint = tint;\n        mTintFilter = createTintFilter(mTint, mTintMode);\n        invalidateSelf();\n    }\n\n    @Override\n    public void setTintMode(PorterDuff.Mode tintMode) {\n        mTintMode = tintMode;\n        mTintFilter = createTintFilter(mTint, mTintMode);\n        invalidateSelf();\n    }\n\n    @Override\n    protected boolean onStateChange(int[] stateSet) {\n        final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor());\n        final boolean colorChanged = newColor != mPaint.getColor();\n        if (colorChanged) {\n            mPaint.setColor(newColor);\n        }\n        if (mTint != null && mTintMode != null) {\n            mTintFilter = createTintFilter(mTint, mTintMode);\n            return true;\n        }\n        return colorChanged;\n    }\n\n    @Override\n    public boolean isStateful() {\n        return (mTint != null && mTint.isStateful())\n                || (mBackground != null && mBackground.isStateful()) || super.isStateful();\n    }\n\n    /**\n     * Ensures the tint filter is consistent with the current tint color and\n     * mode.\n     */\n    private PorterDuffColorFilter createTintFilter(ColorStateList tint, PorterDuff.Mode tintMode) {\n        if (tint == null || tintMode == null) {\n            return null;\n        }\n        final int color = tint.getColorForState(getState(), Color.TRANSPARENT);\n        return new PorterDuffColorFilter(color, tintMode);\n    }\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/java/com/bigman/wmzx/cardviewlibrary/library/RoundRectDrawableWithShadow.kt",
    "content": "package com.bigman.wmzx.customcardview.library\n\n\nimport android.content.res.ColorStateList\nimport android.content.res.Resources\nimport android.graphics.*\nimport android.graphics.drawable.Drawable\nimport com.bigman.wmzx.cardviewlibrary.R\n\n/**\n * A rounded rectangle drawable which also includes a shadow around.\n */\ninternal class RoundRectDrawableWithShadow : Drawable {\n\n    private val mInsetShadow: Int // extra shadow to avoid gaps between card and shadow\n\n    private var mPaint: Paint? = null\n\n    private var mCornerShadowPaint: Paint? = null\n\n    private var mEdgeShadowPaint: Paint? = null\n\n    private val mCardBounds: RectF\n\n    private var mCornerRadius: Float = 0.toFloat()\n\n    private var mCornerShadowPath: Path? = null\n\n    // actual value set by developer\n    private var mRawMaxShadowSize: Float = 0.toFloat()\n\n    // multiplied value to account for shadow offset\n    private var mShadowSize: Float = 0.toFloat()\n\n    // actual value set by developer\n    private var mRawShadowSize: Float = 0.toFloat()\n\n    private var mBackground: ColorStateList? = null\n\n    private var mDirty = true\n\n    private val mShadowStartColor: Int\n\n    private val mShadowEndColor: Int\n    private var mTopDelta: Float\n\n    private var mAddPaddingForCorners = true\n\n    /**\n     * If shadow size is set to a value above max shadow, we print a warning\n     */\n    private var mPrintedShadowClipWarning = false\n\n    var cornerRadius: Float\n        get() = mCornerRadius\n        set(radius) {\n            var radius = radius\n            if (radius < 0f) {\n                throw IllegalArgumentException(\"Invalid radius $radius. Must be >= 0\")\n            }\n            radius = (radius + .5f).toInt().toFloat()\n            if (mCornerRadius == radius) {\n                return\n            }\n            mCornerRadius = radius\n            mDirty = true\n            invalidateSelf()\n        }\n\n    var shadowSize: Float\n        get() = mRawShadowSize\n        set(size) = setShadowSize(size, mRawMaxShadowSize)\n\n    var maxShadowSize: Float\n        get() = mRawMaxShadowSize\n        set(size) = setShadowSize(mRawShadowSize, size)\n\n    val minWidth: Float\n        get() {\n            val content = 2 * Math.max(mRawMaxShadowSize, mCornerRadius + mInsetShadow.toFloat() + mRawMaxShadowSize / 2)\n            return content + (mRawMaxShadowSize + mInsetShadow) * 2\n        }\n\n    val minHeight: Float\n        get() {\n            val content = 2 * Math.max(mRawMaxShadowSize, mCornerRadius + mInsetShadow.toFloat()\n                    + mRawMaxShadowSize * SHADOW_MULTIPLIER / 2)\n            return content + (mRawMaxShadowSize * SHADOW_MULTIPLIER + mInsetShadow) * 2\n        }\n\n    var color: ColorStateList?\n        get() = mBackground\n        set(color) {\n            setBackground(color)\n            invalidateSelf()\n        }\n\n    constructor(resources: Resources, backgroundColor: ColorStateList, radius: Float,\n                shadowSize: Float, maxShadowSize: Float,topDelta:Float) {\n        mShadowStartColor = resources.getColor(R.color.cardview_shadow_start_color)\n        mShadowEndColor = resources.getColor(R.color.cardview_shadow_end_color)\n        mTopDelta =topDelta\n        mInsetShadow = resources.getDimensionPixelSize(R.dimen.cardview_compat_inset_shadow)\n        mPaint = Paint(Paint.ANTI_ALIAS_FLAG or Paint.DITHER_FLAG)\n        setBackground(backgroundColor)\n        mCornerShadowPaint = Paint(Paint.ANTI_ALIAS_FLAG or Paint.DITHER_FLAG)\n        mCornerShadowPaint!!.style = Paint.Style.FILL\n        mCornerRadius = (radius + .5f).toInt().toFloat()\n        mCardBounds = RectF()\n        mEdgeShadowPaint = Paint(mCornerShadowPaint)\n        mEdgeShadowPaint!!.isAntiAlias = false\n        setShadowSize(shadowSize, maxShadowSize)\n    }\n\n    constructor(resources: Resources, backgroundColor: ColorStateList,\n                radius: Float, shadowSize: Float, maxShadowSize: Float,\n                startColor: Int, endColor: Int,topDelta:Float) {\n        mShadowStartColor = startColor\n        mShadowEndColor = endColor\n        mTopDelta = topDelta\n        mInsetShadow = resources.getDimensionPixelSize(R.dimen.cardview_compat_inset_shadow)\n        mPaint = Paint(Paint.ANTI_ALIAS_FLAG or Paint.DITHER_FLAG)\n        setBackground(backgroundColor)\n        mCornerShadowPaint = Paint(Paint.ANTI_ALIAS_FLAG or Paint.DITHER_FLAG)\n        mCornerShadowPaint!!.style = Paint.Style.FILL\n        mCornerRadius = (radius + .5f).toInt().toFloat()\n        mCardBounds = RectF()\n        mEdgeShadowPaint = Paint(mCornerShadowPaint)\n        mEdgeShadowPaint!!.isAntiAlias = false\n        setShadowSize(shadowSize, maxShadowSize)\n    }\n\n    private fun setBackground(color: ColorStateList?) {\n        mBackground = color ?: ColorStateList.valueOf(Color.TRANSPARENT)\n        mPaint!!.color = mBackground!!.getColorForState(state, mBackground!!.defaultColor)\n    }\n\n    /**\n     * Casts the value to an even integer.\n     */\n    private fun toEven(value: Float): Int {\n        val i = (value + .5f).toInt()\n        return if (i % 2 == 1) {\n            i - 1\n        } else i\n    }\n\n    fun setAddPaddingForCorners(addPaddingForCorners: Boolean) {\n        mAddPaddingForCorners = addPaddingForCorners\n        invalidateSelf()\n    }\n\n    override fun setAlpha(alpha: Int) {\n        mPaint!!.alpha = alpha\n        mCornerShadowPaint!!.alpha = alpha\n        mEdgeShadowPaint!!.alpha = alpha\n    }\n\n    override fun onBoundsChange(bounds: Rect) {\n        super.onBoundsChange(bounds)\n        mDirty = true\n    }\n\n    private fun setShadowSize(shadowSize: Float, maxShadowSize: Float) {\n        var shadowSize = shadowSize\n        var maxShadowSize = maxShadowSize\n        if (shadowSize < 0f) {\n            throw IllegalArgumentException(\"Invalid shadow size \" + shadowSize\n                    + \". Must be >= 0\")\n        }\n        if (maxShadowSize < 0f) {\n            throw IllegalArgumentException(\"Invalid max shadow size \" + maxShadowSize\n                    + \". Must be >= 0\")\n        }\n        shadowSize = toEven(shadowSize).toFloat()\n        maxShadowSize = toEven(maxShadowSize).toFloat()\n        if (shadowSize > maxShadowSize) {\n            shadowSize = maxShadowSize\n            if (!mPrintedShadowClipWarning) {\n                mPrintedShadowClipWarning = true\n            }\n        }\n        if (mRawShadowSize == shadowSize && mRawMaxShadowSize == maxShadowSize) {\n            return\n        }\n        mRawShadowSize = shadowSize\n        mRawMaxShadowSize = maxShadowSize\n        mShadowSize = (shadowSize * SHADOW_MULTIPLIER + mInsetShadow.toFloat() + .5f).toInt().toFloat()\n        mDirty = true\n        invalidateSelf()\n    }\n\n    override fun getPadding(padding: Rect): Boolean {\n        val vOffset = Math.ceil(calculateVerticalPadding(mRawMaxShadowSize, mCornerRadius,\n                mAddPaddingForCorners).toDouble()).toInt()\n        val hOffset = Math.ceil(calculateHorizontalPadding(mRawMaxShadowSize, mCornerRadius,\n                mAddPaddingForCorners).toDouble()).toInt()\n        padding.set(hOffset, vOffset, hOffset, vOffset)\n        return true\n    }\n\n    override fun onStateChange(stateSet: IntArray): Boolean {\n        val newColor = mBackground!!.getColorForState(stateSet, mBackground!!.defaultColor)\n        if (mPaint!!.color == newColor) {\n            return false\n        }\n        mPaint!!.color = newColor\n        mDirty = true\n        invalidateSelf()\n        return true\n    }\n\n    override fun isStateful(): Boolean {\n        return mBackground != null && mBackground!!.isStateful || super.isStateful()\n    }\n\n    override fun setColorFilter(cf: ColorFilter?) {\n        mPaint!!.colorFilter = cf\n    }\n\n    override fun getOpacity(): Int {\n        return PixelFormat.TRANSLUCENT\n    }\n\n    /**\n     * 绘制主要工作\n     */\n    override fun draw(canvas: Canvas) {\n        if (mDirty) {\n            buildComponents(bounds)\n            mDirty = false\n        }\n        if(mTopDelta>1f){\n            mTopDelta=1f\n        }else if(mTopDelta>-1f&&mTopDelta<0f){\n            mTopDelta=-1f\n        }\n        canvas.translate(0f, mRawShadowSize / 2*mTopDelta)\n        drawShadow(canvas)\n        canvas.translate(0f, -mRawShadowSize / 2*mTopDelta)\n        sRoundRectHelper!!.drawRoundRect(canvas, mCardBounds, mCornerRadius, mPaint)\n    }\n\n    /**\n     * 绘制四个角阴影\n     */\n    private fun drawShadow(canvas: Canvas) {\n        val edgeShadowTop = -mCornerRadius - mShadowSize\n        val inset = mCornerRadius + mInsetShadow.toFloat() + mRawShadowSize / 2\n        val drawHorizontalEdges = mCardBounds.width() - 2 * inset > 0\n        val drawVerticalEdges = mCardBounds.height() - 2 * inset > 0\n        // LT 左上\n        var saved = canvas.save()\n        canvas.translate(mCardBounds.left + inset, mCardBounds.top + inset)\n        canvas.drawPath(mCornerShadowPath!!, mCornerShadowPaint!!)\n        if (drawHorizontalEdges) {\n            canvas.drawRect(0f, edgeShadowTop,\n                    mCardBounds.width() - 2 * inset, -mCornerRadius,\n                    mEdgeShadowPaint!!)\n        }\n        canvas.restoreToCount(saved)\n        // RB 右下\n        saved = canvas.save()\n        canvas.translate(mCardBounds.right - inset, mCardBounds.bottom - inset)\n        canvas.rotate(180f)\n        canvas.drawPath(mCornerShadowPath!!, mCornerShadowPaint!!)\n        if (drawHorizontalEdges) {\n            canvas.drawRect(0f, edgeShadowTop,\n                    mCardBounds.width() - 2 * inset, -mCornerRadius + mShadowSize,\n                    mEdgeShadowPaint!!)\n        }\n        canvas.restoreToCount(saved)\n        // LB 左下\n        saved = canvas.save()\n        canvas.translate(mCardBounds.left + inset, mCardBounds.bottom - inset)\n        canvas.rotate(270f)\n        canvas.drawPath(mCornerShadowPath!!, mCornerShadowPaint!!)\n        if (drawVerticalEdges) {\n            canvas.drawRect(0f, edgeShadowTop,\n                    mCardBounds.height() - 2 * inset, -mCornerRadius, mEdgeShadowPaint!!)\n        }\n        canvas.restoreToCount(saved)\n        // RT 右上\n        saved = canvas.save()\n        canvas.translate(mCardBounds.right - inset, mCardBounds.top + inset)\n        canvas.rotate(90f)\n        canvas.drawPath(mCornerShadowPath!!, mCornerShadowPaint!!)\n        if (drawVerticalEdges) {\n            canvas.drawRect(0f, edgeShadowTop,\n                    mCardBounds.height() - 2 * inset, -mCornerRadius, mEdgeShadowPaint!!)\n        }\n        canvas.restoreToCount(saved)\n    }\n\n    private fun buildShadowCorners() {\n        val innerBounds = RectF(-mCornerRadius, -mCornerRadius, mCornerRadius, mCornerRadius)\n        val outerBounds = RectF(innerBounds)\n        outerBounds.inset(-mShadowSize, -mShadowSize)\n\n        if (mCornerShadowPath == null) {\n            mCornerShadowPath = Path()\n        } else {\n            mCornerShadowPath!!.reset()\n        }\n        mCornerShadowPath!!.fillType = Path.FillType.EVEN_ODD\n        mCornerShadowPath!!.moveTo(-mCornerRadius, 0f)\n        mCornerShadowPath!!.rLineTo(-mShadowSize, 0f)\n        // outer arc\n        mCornerShadowPath!!.arcTo(outerBounds, 180f, 90f, false)\n        // inner arc\n        mCornerShadowPath!!.arcTo(innerBounds, 270f, -90f, false)\n        mCornerShadowPath!!.close()\n        val startRatio = mCornerRadius / (mCornerRadius + mShadowSize)\n        mCornerShadowPaint!!.shader = RadialGradient(0f, 0f, mCornerRadius + mShadowSize,\n                intArrayOf(mShadowStartColor, mShadowStartColor, mShadowEndColor),\n                floatArrayOf(0f, startRatio, 1f),\n                Shader.TileMode.CLAMP)\n\n        // we offset the content shadowSize/2 pixels up to make it more realistic.\n        // this is why edge shadow shader has some extra space\n        // When drawing bottom edge shadow, we use that extra space.\n        mEdgeShadowPaint!!.shader = LinearGradient(0f, -mCornerRadius + mShadowSize, 0f,\n                -mCornerRadius - mShadowSize,\n                intArrayOf(mShadowStartColor, mShadowStartColor, mShadowEndColor),\n                floatArrayOf(0f, .5f, 1f), Shader.TileMode.CLAMP)\n        mEdgeShadowPaint!!.isAntiAlias = false\n    }\n\n    private fun buildComponents(bounds: Rect) {\n        // Card is offset SHADOW_MULTIPLIER * maxShadowSize to account for the shadow shift.\n        // We could have different top-bottom offsets to avoid extra gap above but in that case\n        // center aligning Views inside the CardView would be problematic.\n        val verticalOffset = mRawMaxShadowSize * SHADOW_MULTIPLIER\n        mCardBounds.set(bounds.left + mRawMaxShadowSize, bounds.top + verticalOffset,\n                bounds.right - mRawMaxShadowSize, bounds.bottom - verticalOffset)\n        buildShadowCorners()\n    }\n\n    fun getMaxShadowAndCornerPadding(into: Rect) {\n        getPadding(into)\n    }\n\n    internal interface RoundRectHelper {\n        fun drawRoundRect(canvas: Canvas, bounds: RectF, cornerRadius: Float, paint: Paint?)\n    }\n\n    companion object {\n        // used to calculate content padding\n        private val COS_45 = Math.cos(Math.toRadians(45.0))\n\n        private val SHADOW_MULTIPLIER = 1.5f\n\n        /*\n    * This helper is set by CardView implementations.\n    * <p>\n    * Prior to API 17, canvas.drawRoundRect is expensive; which is why we need this interface\n    * to draw efficient rounded rectangles before 17.\n    * */\n        var sRoundRectHelper: RoundRectHelper? = null\n\n        fun calculateVerticalPadding(maxShadowSize: Float, cornerRadius: Float,\n                                     addPaddingForCorners: Boolean): Float {\n            return if (addPaddingForCorners) {\n                (maxShadowSize * SHADOW_MULTIPLIER + (1 - COS_45) * cornerRadius).toFloat()\n            } else {\n                maxShadowSize * SHADOW_MULTIPLIER\n            }\n        }\n\n        fun calculateHorizontalPadding(maxShadowSize: Float, cornerRadius: Float,\n                                       addPaddingForCorners: Boolean): Float {\n            return if (addPaddingForCorners) {\n                (maxShadowSize + (1 - COS_45) * cornerRadius).toFloat()\n            } else {\n                maxShadowSize\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "cardviewlibrary/src/main/res/drawable/green_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\"\n    >\n    <solid android:color=\"@color/color8DBEC4\"></solid>\n\n</shape>"
  },
  {
    "path": "cardviewlibrary/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:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "cardviewlibrary/src/main/res/drawable/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:viewportHeight=\"108\"\n    android:viewportWidth=\"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:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\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:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "cardviewlibrary/src/main/res/drawable/shape_round_orange_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape android:shape=\"rectangle\" xmlns:android=\"http://schemas.android.com/apk/res/android\">\n   <corners android:radius=\"999dp\"/>\n    <solid android:color=\"#FF6F11\"/>\n</shape>"
  },
  {
    "path": "cardviewlibrary/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <attr name=\"startColor\" format=\"reference|color\"/>\n    <attr name=\"topDelta\" format=\"float\"/>\n    <!-- Selected Paint Color (color). -->\n    <attr name=\"endColor\" format=\"reference|color\"/>\n    <declare-styleable name=\"CardViewShadow\">\n        <!-- Default Paint Color (color). -->\n        <attr name=\"startColor\" />\n        <!-- Selected Paint Color (color). -->\n        <attr name=\"endColor\" />\n        <attr name=\"topDelta\" />\n    </declare-styleable>\n\n\n\n\n    </resources>"
  },
  {
    "path": "cardviewlibrary/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#FF6602</color>\n    <color name=\"colorPrimaryDark\">#F66100</color>\n    <color name=\"colorAccent\">#FF6602</color>\n    <color name=\"white\">#ffffff</color>\n    <color name=\"black\">@android:color/black</color>\n\n    <color name=\"colorFF6602\">#FF6602</color>\n    <color name=\"colorEF5F00\">#EF5F00</color>\n\n    <color name=\"transparent\">@android:color/transparent</color>\n    <color name=\"color2B2B2B\">#2B2B2B</color>\n    <color name=\"colorC3C3C3\">#C3C3C3</color>\n    <color name=\"color8F8F8F\">#8F8F8F</color>\n    <color name=\"colorE5E5E5\">#E5E5E5</color>\n    <color name=\"colorF3F3F3\">#F3F3F3</color>\n    <!--分割线颜色-->\n    <color name=\"colorDDDDDD\">#DDDDDD</color>\n    <color name=\"colorFF1010\">#FF1010</color>\n    <color name=\"colorEF0000\">#EF0000</color>\n    <color name=\"color444444\">#444444</color>\n    <color name=\"color3C3C3C\">#3C3C3C</color>\n    <!--规范之外的颜色-->\n    <color name=\"color333333\">#333333</color>\n    <color name=\"color666666\">#666666</color>\n    <color name=\"colorE9E9E9\">#E9E9E9</color>\n    <color name=\"color7C7B7B\">#7C7B7B</color>\n    <color name=\"colorD8D8D8\">#D8D8D8</color>\n    <color name=\"color999999\">#999999</color>\n    <color name=\"color1F1F1F\">#1F1F1F</color>\n    <color name=\"color111111\">#111111</color>\n    <color name=\"color979797\">#979797</color>\n    <color name=\"colorD4D4D4\">#D4D4D4</color>\n    <color name=\"colorCC9900\">#CC9900</color>\n    <color name=\"colorFEFBFB\">#FEFBFB</color>\n    <color name=\"colorFF4F4F\">#FF4F4F</color>\n    <color name=\"color008FEB\">#008FEB</color>\n    <color name=\"color80000000\">#80000000</color>\n    <color name=\"color50000000\">#50000000</color>\n    <color name=\"colorF7F7F7\">#F7F7F7</color>\n    <color name=\"color4F4F4F\">#4F4F4F</color>\n    <color name=\"color55000000\">#55000000</color>\n    <color name=\"colorCCCCCC\">#CCCCCC</color>\n    <color name=\"colorFAFAFA\">#FAFAFA</color>\n    <color name=\"color576F6F6F\">#576F6F6F</color>\n    <color name=\"colorA4A4A4\">#A4A4A4</color>\n    <color name=\"colorF8F8F8\">#F8F8F8</color>\n    <color name=\"color515151\">#515151</color>\n    <color name=\"color787878\">#787878</color>\n    <color name=\"colorD9D9D9\">#D9D9D9</color>\n    <color name=\"colorB9B9B9\">#B9B9B9</color>\n    <color name=\"colorABABAB\">#ABABAB</color>\n    <color name=\"colorB0B0B0\">#B0B0B0</color>\n    <color name=\"colorFF3B30\">#FF3B30</color>\n    <color name=\"color7F7F7F\">#7F7F7F</color>\n    <color name=\"color969696\">#969696</color>\n    <color name=\"color577699\">#577699</color>\n    <color name=\"color8C8C8C\">#8C8C8C</color>\n    <color name=\"colorF6F5F4\">#F6F5F4</color>\n    <color name=\"color0F0F0F\">#0F0F0F</color>\n    <color name=\"color17AA1C\">#17AA1C</color>\n    <color name=\"color40B4B4B4\">#40B4B4B4</color>\n    <color name=\"color959595\">#959595</color>\n    <color name=\"colorCECECE\">#CECECE</color>\n    <color name=\"colorEDEDEE\">#EDEDEE</color>\n    <color name=\"color0E0E0E\">#0E0E0E</color>\n    <color name=\"colorDCDCDC\">#DCDCDC</color>\n    <color name=\"color4A4A4A\">#4A4A4A</color>\n    <color name=\"color3D3D3D\">#3D3D3D</color>\n    <color name=\"colorCDCDCD\">#CDCDCD</color>\n    <color name=\"color808080\">#808080</color>\n    <color name=\"colorF66100\">#F66100</color>\n    <color name=\"colorFF8E44\">#FF8E44</color>\n    <color name=\"color89A4C9\">#89A4C9</color>\n    <color name=\"colorF3F3F5\">#F3F3F5</color>\n    <color name=\"color191919\">#191919</color>\n    <color name=\"colorF4F4F4\">#F4F4F4</color>\n    <color name=\"color5378AB\">#5378AB</color>\n    <color name=\"color9EA8EA\">#9EA8EA</color>\n    <color name=\"colorFF8535\">#FF8535</color>\n    <color name=\"color10FF8535\">#10FF8535</color>\n    <color name=\"colorFFB63F\">#FFB63F</color>\n    <color name=\"color818181\">#818181</color>\n    <color name=\"color838383\">#838383</color>\n    <color name=\"color959FA6\">#959FA6</color>\n    <color name=\"color0f0f0f\">#0f0f0f</color>\n    <color name=\"color3F3F3F\">#3F3F3F</color>\n    <color name=\"colorFF552E\">#FF552E</color>\n    <color name=\"color99000000\">#99000000</color>\n    <color name=\"color66000000\">#66000000</color>\n    <color name=\"color5A5A5A\">#5A5A5A</color>\n    <color name=\"colorFFA467\">#FFA467</color>\n    <color name=\"colorFF444444\">#ff444444</color>\n    <color name=\"color73FF6602\">#73FF6602</color>\n    <color name=\"colorE3E3EC\">#E3E3EC</color>\n    <color name=\"color5B5B5B\">#5B5B5B</color>\n    <color name=\"color7F4A90E2\">#7F4A90E2</color>\n    <color name=\"color4990E2\">#4990E2</color>\n    <color name=\"color6d6d6d\">#6d6d6d</color>\n    <color name=\"colorFF5252\">#FF5252</color>\n    <color name=\"color38197A\">#38197A</color>\n    <color name=\"colorEECC76\">#EECC76</color>\n    <color name=\"color1C0B3A\">#1C0B3A</color>\n    <color name=\"color281744\">#281744</color>\n    <color name=\"colorF0F0F0\">#F0F0F0</color>\n    <color name=\"colorECB408\">#ECB408</color>\n    <color name=\"colorDDA66F\">#DDA66F</color>\n    <color name=\"color1A1A1A\">#1A1A1A</color>\n    <color name=\"color14FFFFFF\">#14FFFFFF</color>\n    <color name=\"ColorFCF5FA\">#FCF5FA</color>\n    <color name=\"ColorF3ECE4\">#F3ECE4</color>\n    <color name=\"colorFF1313\">#FF1313</color>\n    <color name=\"color848484\">#848484</color>\n    <color name=\"colorD0D0D0\">#D0D0D0</color>\n    <color name=\"colorF7F4EA\">#F7F4EA</color>\n    <color name=\"color727272\">#727272</color>\n    <color name=\"colorFFE89C\">#FFE89C</color>\n    <color name=\"colorFFD571\">#FFD571</color>\n    <color name=\"colorFEDAE4\">#FEDAE4</color>\n    <color name=\"colorE1E1E1\">#E1E1E1</color>\n    <color name=\"colorFFAD44\">#FFAD44</color>\n    <color name=\"color8DBEC4\">#8DBEC4</color>\n    <color name=\"colorF6F6F6\">#F6F6F6</color>\n    <color name=\"cardview_shadow_start_color\">#D2d2d2</color>\n    <color name=\"cardview_shadow_end_color\">#F6F6F6</color>\n\n</resources>\n"
  },
  {
    "path": "cardviewlibrary/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">CardViewLibrary</string>\n</resources>\n"
  },
  {
    "path": "cardviewlibrary/src/test/java/com/bigman/wmzx/cardviewlibrary/ExampleUnitTest.java",
    "content": "package com.bigman.wmzx.cardviewlibrary;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * @see <a href=\"http://d.android.com/tools/testing\">Testing documentation</a>\n */\npublic class ExampleUnitTest {\n    @Test\n    public void addition_isCorrect() throws Exception {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Tue Jul 10 15:07:19 CST 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.1-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app', ':cardviewlibrary'\n"
  }
]