[
  {
    "path": ".gitignore",
    "content": "# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# IntelliJ\n*.iml\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/gradle.xml\n.idea/assetWizardSettings.xml\n.idea/dictionaries\n.idea/libraries\n.idea/caches\n\n# Keystore files\n# Uncomment the following line if you do not want to check your keystore files in.\n#*.jks\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n\n# Google Services (e.g. APIs or Firebase)\ngoogle-services.json\n\n# Freeline\nfreeline.py\nfreeline/\nfreeline_project_description.json\n\n# fastlane\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\nfastlane/readme.md\n"
  },
  {
    "path": ".idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <Objective-C-extensions>\n      <file>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Import\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Macro\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Typedef\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Enum\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Constant\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Global\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Struct\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"FunctionPredecl\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Function\" />\n      </file>\n      <class>\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Property\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"Synthesize\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InitMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"StaticMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"InstanceMethod\" />\n        <option name=\"com.jetbrains.cidr.lang.util.OCDeclarationKind\" value=\"DeallocMethod\" />\n      </class>\n      <extensions>\n        <pair source=\"cpp\" header=\"h\" fileNamingConvention=\"NONE\" />\n        <pair source=\"c\" header=\"h\" fileNamingConvention=\"NONE\" />\n      </extensions>\n    </Objective-C-extensions>\n  </code_scheme>\n</component>"
  },
  {
    "path": ".idea/compiler.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CompilerConfiguration\">\n    <bytecodeTargetLevel target=\"1.8\" />\n  </component>\n</project>"
  },
  {
    "path": ".idea/jarRepositories.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RemoteRepositoriesConfiguration\">\n    <remote-repository>\n      <option name=\"id\" value=\"central\" />\n      <option name=\"name\" value=\"Maven Central repository\" />\n      <option name=\"url\" value=\"https://repo1.maven.org/maven2\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"jboss.community\" />\n      <option name=\"name\" value=\"JBoss Community repository\" />\n      <option name=\"url\" value=\"https://repository.jboss.org/nexus/content/repositories/public/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"BintrayJCenter\" />\n      <option name=\"name\" value=\"BintrayJCenter\" />\n      <option name=\"url\" value=\"https://jcenter.bintray.com/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"Google\" />\n      <option name=\"name\" value=\"Google\" />\n      <option name=\"url\" value=\"https://dl.google.com/dl/android/maven2/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"F:\\AndroidSDK\\extras\\m2repository\" />\n      <option name=\"name\" value=\"F:\\AndroidSDK\\extras\\m2repository\" />\n      <option name=\"url\" value=\"file:/$PROJECT_DIR$/../../AndroidSDK/extras/m2repository/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"F:\\AndroidSDK\\extras\\google\\m2repository\" />\n      <option name=\"name\" value=\"F:\\AndroidSDK\\extras\\google\\m2repository\" />\n      <option name=\"url\" value=\"file:/$PROJECT_DIR$/../../AndroidSDK/extras/google/m2repository/\" />\n    </remote-repository>\n    <remote-repository>\n      <option name=\"id\" value=\"F:\\AndroidSDK\\extras\\android\\m2repository\" />\n      <option name=\"name\" value=\"F:\\AndroidSDK\\extras\\android\\m2repository\" />\n      <option name=\"url\" value=\"file:/$PROJECT_DIR$/../../AndroidSDK/extras/android/m2repository/\" />\n    </remote-repository>\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=\"5\">\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=\"javax.annotation.CheckForNull\" />\n          <item index=\"3\" class=\"java.lang.String\" itemvalue=\"edu.umd.cs.findbugs.annotations.Nullable\" />\n          <item index=\"4\" 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\" default=\"true\" 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</project>"
  },
  {
    "path": ".idea/modules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n      <module fileurl=\"file://$PROJECT_DIR$/GenerateQRcode.iml\" filepath=\"$PROJECT_DIR$/GenerateQRcode.iml\" />\n      <module fileurl=\"file://$PROJECT_DIR$/.idea/modules/app/GenerateQRcode.app.iml\" filepath=\"$PROJECT_DIR$/.idea/modules/app/GenerateQRcode.app.iml\" />\n    </modules>\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": ".idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$\" vcs=\"Git\" />\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.\n"
  },
  {
    "path": "README.md",
    "content": "# GenerateQRCode\n自定义二维码生成：一般二维码、彩色二维码、带logo二维码或带logo彩色二维码、黑色色块用图片代替的二维码\n\n## 效果图\n\n一般二维码\n<div>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/一般二维码.jpg\" width=\"30%\" height=\"35%\">\n  <br><br>\n彩色二维码<br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/绿色二维码.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/蓝色二维码.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/黄色二维码.jpg\" width=\"30%\" height=\"35%\">\n</div>\n\n带logo二维码<br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/logo1.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/logo2.jpg\" width=\"30%\" height=\"35%\">\n\n带logo彩色二维码<br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/带logo蓝色.jpg\" width=\"35%\" height=\"35%\">\n\n黑色色块用图片代替的二维码<br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/黑色色块用图片代替1.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/黑色色块用图片代替2.jpg\" width=\"30%\" height=\"35%\">\n\n黑色色块用图片代替且带logo<br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/黑色色块用图片代替还带logo.jpg\" width=\"35%\" height=\"35%\">\n\n<br>\n\n### 动态更换logo和黑色色块\n\n增加拍照或从相册选取图片功能\n<br><br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/choose.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/takephoto.jpg\" width=\"30%\" height=\"35%\">\n\n<br><br>\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/album.jpg\" width=\"30%\" height=\"35%\">\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/result.jpg\" width=\"30%\" height=\"35%\">\n\n<br><br>\n\n### 二维码保存和分享\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/choose_save.jpg\" width=\"30%\" height=\"35%\"> <img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/save.jpg\" width=\"30%\" height=\"35%\">\n\n<br>\n\n<img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/share_list.jpg\" width=\"30%\" height=\"35%\"> <img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/share.jpg\" width=\"30%\" height=\"35%\">\n\n***\n更多技术干货，欢迎关注我的公众号：程序员大佬超\n<br><img src=\"https://github.com/yangxch/GenerateQRCode/raw/master/screenshot/qrcode_chaoyoung.jpg\" width=\"20%\" height=\"20%\">\n\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 27\n    defaultConfig {\n        applicationId \"com.example.xch.generateqrcode\"\n        minSdkVersion 15\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    implementation 'com.android.support.constraint:constraint-layout:1.1.3'\n    androidTestImplementation 'com.android.support.test:runner:1.0.2'\n    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'\n\n//    implementation 'com.google.zxing:core:3.3.0'\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "app/release/output.json",
    "content": "[{\"outputType\":{\"type\":\"APK\"},\"apkInfo\":{\"type\":\"MAIN\",\"splits\":[],\"versionCode\":1,\"versionName\":\"1.0\",\"enabled\":true,\"outputFile\":\"app-release.apk\",\"fullName\":\"release\",\"baseName\":\"release\"},\"path\":\"app-release.apk\",\"properties\":{}}]"
  },
  {
    "path": "app/src/androidTest/java/com/example/xch/generateqrcode/ExampleInstrumentedTest.java",
    "content": "package com.example.xch.generateqrcode;\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() {\n        // Context of the app under test.\n        Context appContext = InstrumentationRegistry.getTargetContext();\n\n        assertEquals(\"com.example.xch.generateqrcode\", appContext.getPackageName());\n    }\n}\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.xch.generateqrcode\">\n\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/icon\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <provider\n            android:name=\"android.support.v4.content.FileProvider\"\n            android:authorities=\"com.example.xch.generateqrcode.fileprovider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/file_paths\" />\n        </provider>\n    </application>\n\n</manifest>"
  },
  {
    "path": "app/src/main/java/com/example/xch/generateqrcode/ImageUtil.java",
    "content": "package com.example.xch.generateqrcode;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.net.Uri;\nimport android.os.Environment;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\n\npublic class ImageUtil {\n    /**\n     * 保存图片到指定路径\n     *\n     * @param context\n     * @param bitmap   要保存的图片\n     * @param fileName 自定义图片名称\n     * @return\n     */\n    public static boolean saveImageToGallery(Context context, Bitmap bitmap, String fileName) {\n        // 保存图片至指定路径\n        String storePath = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + \"qrcode\";\n        File appDir = new File(storePath);\n        if (!appDir.exists()) {\n            appDir.mkdir();\n        }\n        File file = new File(appDir, fileName);\n        try {\n            FileOutputStream fos = new FileOutputStream(file);\n            //通过io流的方式来压缩保存图片(80代表压缩20%)\n            boolean isSuccess = bitmap.compress(Bitmap.CompressFormat.JPEG, 80, fos);\n            fos.flush();\n            fos.close();\n\n            //发送广播通知系统图库刷新数据\n            Uri uri = Uri.fromFile(file);\n            context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri));\n            if (isSuccess) {\n                return true;\n            } else {\n                return false;\n            }\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n        return false;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/example/xch/generateqrcode/MainActivity.java",
    "content": "package com.example.xch.generateqrcode;\n\nimport android.Manifest;\nimport android.annotation.SuppressLint;\nimport android.content.ContentUris;\nimport android.content.DialogInterface;\nimport android.content.Intent;\nimport android.content.pm.PackageManager;\nimport android.database.Cursor;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.Color;\nimport android.net.Uri;\nimport android.os.Build;\nimport android.provider.DocumentsContract;\nimport android.provider.MediaStore;\nimport android.support.v4.app.ActivityCompat;\nimport android.support.v4.content.ContextCompat;\nimport android.support.v4.content.FileProvider;\nimport android.support.v7.app.AlertDialog;\nimport android.support.v7.app.AppCompatActivity;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.View;\nimport android.widget.AdapterView;\nimport android.widget.Button;\nimport android.widget.EditText;\nimport android.widget.ImageView;\nimport android.widget.Spinner;\nimport android.widget.Toast;\n\n\nimport java.io.File;\nimport java.io.IOException;\n\npublic class MainActivity extends AppCompatActivity implements View.OnClickListener {\n    private Button btn_generate;\n    private EditText et_content;\n    private ImageView iv_qrcode;\n    private ImageView picture_logo, picture_black;//logo，代替黑色色块的图片\n\n    private EditText et_width, et_height;\n    private Spinner sp_error_correction_level, sp_margin, sp_color_black, sp_color_white;\n    private String content;//二维码内容\n    private int width, height;//宽度，高度\n    private String error_correction_level, margin;//容错率，空白边距\n    private int color_black, color_white;//黑色色块，白色色块\n\n    public static final int TAKE_PHOTO = 1;//拍照\n    public static final int CHOOSE_PHOTO = 2;//从相册选择图片\n    private Uri imageUri;\n    private Bitmap logoBitmap;//logo图片\n    private Bitmap blackBitmap;//代替黑色色块的图片\n    private int remark;//标记返回的是logo还是代替黑色色块图片\n\n    private Bitmap qrcode_bitmap;//生成的二维码\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        et_content = findViewById(R.id.et_content);\n        btn_generate = findViewById(R.id.btn_generate);\n        iv_qrcode = findViewById(R.id.iv_qrcode);\n        picture_logo = findViewById(R.id.picture_logo);\n        picture_black = findViewById(R.id.picture_black);\n        et_width = findViewById(R.id.et_width);\n        et_height = findViewById(R.id.et_height);\n        sp_error_correction_level = findViewById(R.id.sp_error_correction_level);\n        sp_margin = findViewById(R.id.sp_margin);\n        sp_color_black = findViewById(R.id.sp_color_black);\n        sp_color_white = findViewById(R.id.sp_color_white);\n        btn_generate.setOnClickListener(this);\n        picture_logo.setOnClickListener(this);\n        picture_black.setOnClickListener(this);\n        iv_qrcode.setOnLongClickListener(new View.OnLongClickListener() {\n            @Override\n            public boolean onLongClick(View v) {\n                imgChooseDialog();\n                return true;\n            }\n        });\n\n        sp_error_correction_level.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n                error_correction_level = getResources().getStringArray(R.array.spinarr_error_correction)[position];\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> parent) {\n\n            }\n        });\n        sp_margin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n                margin = getResources().getStringArray(R.array.spinarr_margin)[position];\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> parent) {\n\n            }\n        });\n        sp_color_black.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n                String str_color_black = getResources().getStringArray(R.array.spinarr_color_black)[position];\n                if (str_color_black.equals(\"黑色\")) {\n                    color_black = Color.BLACK;\n                } else if (str_color_black.equals(\"白色\")) {\n                    color_black = Color.WHITE;\n                } else if (str_color_black.equals(\"蓝色\")) {\n                    color_black = Color.BLUE;\n                } else if (str_color_black.equals(\"绿色\")) {\n                    color_black = Color.GREEN;\n                } else if (str_color_black.equals(\"黄色\")) {\n                    color_black = Color.YELLOW;\n                } else if (str_color_black.equals(\"红色\")) {\n                    color_black = Color.RED;\n                } else if (str_color_black.equals(\"紫色\")) {\n                    color_black = Color.parseColor(\"#9370DB\");\n                } else if (str_color_black.equals(\"粉红色\")) {\n                    color_black = Color.parseColor(\"#ffc0cb\");\n                } else if (str_color_black.equals(\"薄荷色\")) {\n                    color_black = Color.parseColor(\"#BDFCC9\");\n                } else {\n                    color_black = Color.BLACK;\n                }\n\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> parent) {\n\n            }\n        });\n        sp_color_white.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n            @Override\n            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n                String str_color_white = getResources().getStringArray(R.array.spinarr_color_white)[position];\n                if (str_color_white.equals(\"黑色\")) {\n                    color_white = Color.BLACK;\n                } else if (str_color_white.equals(\"白色\")) {\n                    color_white = Color.WHITE;\n                } else if (str_color_white.equals(\"蓝色\")) {\n                    color_white = Color.BLUE;\n                } else if (str_color_white.equals(\"绿色\")) {\n                    color_white = Color.GREEN;\n                } else if (str_color_white.equals(\"黄色\")) {\n                    color_white = Color.YELLOW;\n                } else if (str_color_white.equals(\"红色\")) {\n                    color_white = Color.RED;\n                } else if (str_color_white.equals(\"紫色\")) {\n                    color_white = Color.parseColor(\"#9370DB\");\n                } else if (str_color_white.equals(\"粉红色\")) {\n                    color_white = Color.parseColor(\"#ffc0cb\");\n                } else if (str_color_white.equals(\"薄荷色\")) {\n                    color_white = Color.parseColor(\"#BDFCC9\");\n                } else {\n                    color_white = Color.WHITE;\n                }\n            }\n\n            @Override\n            public void onNothingSelected(AdapterView<?> parent) {\n\n            }\n        });\n    }\n\n    @Override\n    public void onClick(View v) {\n        switch (v.getId()) {\n            case R.id.btn_generate://生成\n                generateQrcodeAndDisplay();\n                break;\n            case R.id.picture_logo://选取logo\n                remark = 0;\n                showChooseDialog();\n                break;\n            case R.id.picture_black://选取代替黑色色块的图片\n                remark = 1;\n                showChooseDialog();\n                break;\n            default:\n                break;\n        }\n    }\n\n    /**\n     * 保存图片至本地\n     * @param bitmap\n     */\n    private void saveImg(Bitmap bitmap){\n        String fileName = \"qr_\"+System.currentTimeMillis() + \".jpg\";\n        boolean isSaveSuccess = ImageUtil.saveImageToGallery(MainActivity.this, bitmap,fileName);\n        if (isSaveSuccess) {\n            Toast.makeText(MainActivity.this, \"图片已保存至本地\", Toast.LENGTH_LONG).show();\n        } else {\n            Toast.makeText(MainActivity.this, \"保存图片失败，请稍后重试\", Toast.LENGTH_SHORT).show();\n        }\n    }\n\n    /**\n     * 分享图片(直接将bitamp转换为Uri)\n     * @param bitmap\n     */\n    private void shareImg(Bitmap bitmap){\n        Uri uri = Uri.parse(MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, null,null));\n        Intent intent = new Intent();\n        intent.setAction(Intent.ACTION_SEND);\n        intent.setType(\"image/*\");//设置分享内容的类型\n        intent.putExtra(Intent.EXTRA_STREAM, uri);\n        intent = Intent.createChooser(intent, \"分享\");\n        startActivity(intent);\n    }\n\n    /**\n     * 生成二维码并显示\n     */\n    private void generateQrcodeAndDisplay() {\n        content = et_content.getText().toString();\n        String str_width = et_width.getText().toString();\n        String str_height = et_height.getText().toString();\n        if (str_width.length() <= 0 || str_height.length() <= 0) {\n            width = 650;\n            height = 650;\n        } else {\n            width = Integer.parseInt(str_width);\n            height = Integer.parseInt(str_height);\n        }\n\n        if (content.length() <= 0) {\n            Toast.makeText(this, \"你没有输入二维码内容哟！\", Toast.LENGTH_SHORT).show();\n            return;\n        }\n        qrcode_bitmap = QRCodeUtil.createQRCodeBitmap(content, width, height, \"UTF-8\",\n                error_correction_level, margin, color_black, color_white, logoBitmap, 0.2F, blackBitmap);\n        iv_qrcode.setImageBitmap(qrcode_bitmap);\n    }\n\n    /**\n     * 弹出选择框（拍照或从相册选取图片）\n     *\n     * @author xch\n     */\n    private void showChooseDialog() {\n        AlertDialog.Builder choiceBuilder = new AlertDialog.Builder(this);\n        choiceBuilder.setCancelable(false);\n        choiceBuilder\n                .setTitle(\"选择图片\")\n                .setSingleChoiceItems(new String[]{\"拍照上传\", \"从相册选择\"}, -1,\n                        new DialogInterface.OnClickListener() {\n                            @Override\n                            public void onClick(DialogInterface dialog, int which) {\n                                switch (which) {\n                                    case 0://拍照\n                                        takePhoto();\n                                        break;\n                                    case 1:// 从相册选择\n                                        choosePhotoFromAlbum();\n                                        break;\n                                    default:\n                                        break;\n                                }\n                                dialog.dismiss();\n                            }\n                        })\n                .setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n                    public void onClick(DialogInterface dialog, int which) {\n\n                    }\n                });\n\n        choiceBuilder.create();\n        choiceBuilder.show();\n    }\n\n    /**\n     * 长按二维码图片弹出选择框（保存或分享）\n     */\n    private void imgChooseDialog(){\n        AlertDialog.Builder choiceBuilder = new AlertDialog.Builder(MainActivity.this);\n        choiceBuilder.setCancelable(false);\n        choiceBuilder\n                .setTitle(\"选择\")\n                .setSingleChoiceItems(new String[]{\"存储至手机\", \"分享\"}, -1,\n                        new DialogInterface.OnClickListener() {\n                            @Override\n                            public void onClick(DialogInterface dialog, int which) {\n                                switch (which) {\n                                    case 0://存储\n                                        saveImg(qrcode_bitmap);\n                                        break;\n                                    case 1:// 分享\n                                        shareImg(qrcode_bitmap);\n                                        break;\n                                    default:\n                                        break;\n                                }\n                                dialog.dismiss();\n                            }\n                        })\n                .setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n                    public void onClick(DialogInterface dialog, int which) {\n                    }\n                });\n        choiceBuilder.create();\n        choiceBuilder.show();\n    }\n\n    /**\n     * 拍照\n     */\n    private void takePhoto() {\n        // 创建File对象，用于存储拍照后的图片\n        File outputImage = new File(getExternalCacheDir(), \"output_image.jpg\");\n        try {\n            if (outputImage.exists()) {\n                outputImage.delete();\n            }\n            outputImage.createNewFile();\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n        if (Build.VERSION.SDK_INT < 24) {\n            imageUri = Uri.fromFile(outputImage);\n        } else {\n            imageUri = FileProvider.getUriForFile(MainActivity.this, \"com.example.xch.generateqrcode.fileprovider\", outputImage);\n        }\n        // 启动相机程序\n        Intent intent = new Intent(\"android.media.action.IMAGE_CAPTURE\");\n        intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);\n        startActivityForResult(intent, TAKE_PHOTO);\n    }\n\n    /**\n     * 从相册选取图片\n     */\n    private void choosePhotoFromAlbum() {\n        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n            ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);\n        } else {\n            openAlbum();\n        }\n    }\n\n    /**\n     * /打开相册\n     */\n    private void openAlbum() {\n        Intent intent = new Intent(\"android.intent.action.GET_CONTENT\");\n        intent.setType(\"image/*\");\n        startActivityForResult(intent, CHOOSE_PHOTO);\n    }\n\n    @Override\n    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n        switch (requestCode) {\n            case 1:\n                if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                    openAlbum();\n                } else {\n                    Toast.makeText(this, \"你拒绝了权限申请，可能无法打开相册哟\", Toast.LENGTH_SHORT).show();\n                }\n                break;\n            default:\n        }\n    }\n\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        switch (requestCode) {\n            case TAKE_PHOTO:\n                if (resultCode == RESULT_OK) {\n                    try {\n                        if (remark == 0) {//logo\n                            logoBitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(imageUri));\n                            // 将拍摄的照片显示出来\n                            picture_logo.setImageBitmap(logoBitmap);\n                        } else if (remark == 1) {//black\n                            blackBitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(imageUri));\n                            picture_black.setImageBitmap(blackBitmap);\n                        } else {\n                        }\n                    } catch (Exception e) {\n                        e.printStackTrace();\n                    }\n                }\n                break;\n            case CHOOSE_PHOTO:\n                if (resultCode == RESULT_OK) {\n                    // 判断手机系统版本号\n                    if (Build.VERSION.SDK_INT >= 19) {\n                        // 4.4及以上系统使用这个方法处理图片\n                        handleImageOnKitKat(data);\n                    } else {\n                        // 4.4以下系统使用这个方法处理图片\n                        handleImageBeforeKitKat(data);\n                    }\n                }\n                break;\n            default:\n                break;\n        }\n    }\n\n    /**\n     * 4.4以后\n     *\n     * @param data\n     */\n    @SuppressLint(\"NewApi\")\n    private void handleImageOnKitKat(Intent data) {\n        String imagePath = null;\n        Uri uri = data.getData();\n        Log.d(\"TAG\", \"handleImageOnKitKat: uri is \" + uri);\n        if (DocumentsContract.isDocumentUri(this, uri)) {\n            // 如果是document类型的Uri，则通过document id处理\n            String docId = DocumentsContract.getDocumentId(uri);\n            if (\"com.android.providers.media.documents\".equals(uri.getAuthority())) {\n                String id = docId.split(\":\")[1]; // 解析出数字格式的id\n                String selection = MediaStore.Images.Media._ID + \"=\" + id;\n                imagePath = getImagePath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, selection);\n            } else if (\"com.android.providers.downloads.documents\".equals(uri.getAuthority())) {\n                Uri contentUri = ContentUris.withAppendedId(Uri.parse(\"content://downloads/public_downloads\"), Long.valueOf(docId));\n                imagePath = getImagePath(contentUri, null);\n            }\n        } else if (\"content\".equalsIgnoreCase(uri.getScheme())) {\n            // 如果是content类型的Uri，则使用普通方式处理\n            imagePath = getImagePath(uri, null);\n        } else if (\"file\".equalsIgnoreCase(uri.getScheme())) {\n            // 如果是file类型的Uri，直接获取图片路径即可\n            imagePath = uri.getPath();\n        }\n        displayImage(imagePath); // 根据图片路径显示图片\n    }\n\n    /**\n     * 4.4版本以前，直接获取真实路径\n     *\n     * @param data\n     */\n    private void handleImageBeforeKitKat(Intent data) {\n        Uri uri = data.getData();\n        String imagePath = getImagePath(uri, null);\n        displayImage(imagePath);\n    }\n\n    private String getImagePath(Uri uri, String selection) {\n        String path = null;\n        // 通过Uri和selection来获取真实的图片路径\n        Cursor cursor = getContentResolver().query(uri, null, selection, null, null);\n        if (cursor != null) {\n            if (cursor.moveToFirst()) {\n                path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n            }\n            cursor.close();\n        }\n        return path;\n    }\n\n    /**\n     * 显示图片\n     *\n     * @param imagePath 图片路径\n     */\n    private void displayImage(String imagePath) {\n        if (imagePath != null) {\n\n            if (remark == 0) {//logo\n                logoBitmap = BitmapFactory.decodeFile(imagePath);\n                // 显示图片\n                picture_logo.setImageBitmap(logoBitmap);\n            } else if (remark == 1) {//black\n                blackBitmap = BitmapFactory.decodeFile(imagePath);\n                picture_black.setImageBitmap(blackBitmap);\n            } else {\n            }\n        } else {\n            Toast.makeText(this, \"获取图片失败\", Toast.LENGTH_SHORT).show();\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/example/xch/generateqrcode/QRCodeUtil.java",
    "content": "package com.example.xch.generateqrcode;\n\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Matrix;\nimport android.support.annotation.Nullable;\nimport android.text.TextUtils;\n\nimport com.google.zxing.BarcodeFormat;\nimport com.google.zxing.EncodeHintType;\nimport com.google.zxing.WriterException;\nimport com.google.zxing.common.BitMatrix;\nimport com.google.zxing.qrcode.QRCodeWriter;\n\nimport java.util.Hashtable;\n\npublic class QRCodeUtil {\n    /**\n     *  生成自定义二维码\n     *\n     * @param content                字符串内容\n     * @param width                  二维码宽度\n     * @param height                 二维码高度\n     * @param character_set          编码方式（一般使用UTF-8）\n     * @param error_correction_level 容错率 L：7% M：15% Q：25% H：35%\n     * @param margin                 空白边距（二维码与边框的空白区域）\n     * @param color_black            黑色色块\n     * @param color_white            白色色块\n     * @param logoBitmap             logo图片（传null时不添加logo）\n     * @param logoPercent            logo所占百分比\n     * @param bitmap_black           用来代替黑色色块的图片（传null时不代替）\n     * @return\n     */\n    public static Bitmap createQRCodeBitmap(String content, int width, int height, String character_set, String error_correction_level,\n                                            String margin, int color_black, int color_white, Bitmap logoBitmap, float logoPercent, Bitmap bitmap_black) {\n        // 字符串内容判空\n        if (TextUtils.isEmpty(content)) {\n            return null;\n        }\n        // 宽和高>=0\n        if (width < 0 || height < 0) {\n            return null;\n        }\n        try {\n            /** 1.设置二维码相关配置,生成BitMatrix(位矩阵)对象 */\n            Hashtable<EncodeHintType, String> hints = new Hashtable<>();\n            // 字符转码格式设置\n            if (!TextUtils.isEmpty(character_set)) {\n                hints.put(EncodeHintType.CHARACTER_SET, character_set);\n            }\n            // 容错率设置\n            if (!TextUtils.isEmpty(error_correction_level)) {\n                hints.put(EncodeHintType.ERROR_CORRECTION, error_correction_level);\n            }\n            // 空白边距设置\n            if (!TextUtils.isEmpty(margin)) {\n                hints.put(EncodeHintType.MARGIN, margin);\n            }\n            /** 2.将配置参数传入到QRCodeWriter的encode方法生成BitMatrix(位矩阵)对象 */\n            BitMatrix bitMatrix = new QRCodeWriter().encode(content, BarcodeFormat.QR_CODE, width, height, hints);\n\n            /** 3.创建像素数组,并根据BitMatrix(位矩阵)对象为数组元素赋颜色值 */\n            if (bitmap_black != null) {\n                //从当前位图按一定的比例创建一个新的位图\n                bitmap_black = Bitmap.createScaledBitmap(bitmap_black, width, height, false);\n            }\n            int[] pixels = new int[width * height];\n            for (int y = 0; y < height; y++) {\n                for (int x = 0; x < width; x++) {\n                    //bitMatrix.get(x,y)方法返回true是黑色色块，false是白色色块\n                    if (bitMatrix.get(x, y)) {// 黑色色块像素设置\n                        if (bitmap_black != null) {//图片不为null，则将黑色色块换为新位图的像素。\n                            pixels[y * width + x] = bitmap_black.getPixel(x, y);\n                        } else {\n                            pixels[y * width + x] = color_black;\n                        }\n                    } else {\n                        pixels[y * width + x] = color_white;// 白色色块像素设置\n                    }\n                }\n            }\n\n            /** 4.创建Bitmap对象,根据像素数组设置Bitmap每个像素点的颜色值,并返回Bitmap对象 */\n            Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n            bitmap.setPixels(pixels, 0, width, 0, 0, width, height);\n\n            /** 5.为二维码添加logo图标 */\n            if (logoBitmap != null) {\n                return addLogo(bitmap, logoBitmap, logoPercent);\n            }\n            return bitmap;\n        } catch (WriterException e) {\n            e.printStackTrace();\n            return null;\n        }\n    }\n\n    /**\n     * 向二维码中间添加logo图片(图片合成)\n     *\n     * @param srcBitmap   原图片（生成的简单二维码图片）\n     * @param logoBitmap  logo图片\n     * @param logoPercent 百分比 (用于调整logo图片在原图片中的显示大小, 取值范围[0,1] )\n     *                    原图片是二维码时,建议使用0.2F,百分比过大可能导致二维码扫描失败。\n     * @return\n     */\n    @Nullable\n    private static Bitmap addLogo(@Nullable Bitmap srcBitmap, @Nullable Bitmap logoBitmap, float logoPercent) {\n        if (srcBitmap == null) {\n            return null;\n        }\n        if (logoBitmap == null) {\n            return srcBitmap;\n        }\n        //传值不合法时使用0.2F\n        if (logoPercent < 0F || logoPercent > 1F) {\n            logoPercent = 0.2F;\n        }\n\n        /** 1. 获取原图片和Logo图片各自的宽、高值 */\n        int srcWidth = srcBitmap.getWidth();\n        int srcHeight = srcBitmap.getHeight();\n        int logoWidth = logoBitmap.getWidth();\n        int logoHeight = logoBitmap.getHeight();\n\n        /** 2. 计算画布缩放的宽高比 */\n        float scaleWidth = srcWidth * logoPercent / logoWidth;\n        float scaleHeight = srcHeight * logoPercent / logoHeight;\n\n        /** 3. 使用Canvas绘制,合成图片 */\n        Bitmap bitmap = Bitmap.createBitmap(srcWidth, srcHeight, Bitmap.Config.ARGB_8888);\n        Canvas canvas = new Canvas(bitmap);\n        canvas.drawBitmap(srcBitmap, 0, 0, null);\n        canvas.scale(scaleWidth, scaleHeight, srcWidth / 2, srcHeight / 2);\n        canvas.drawBitmap(logoBitmap, srcWidth / 2 - logoWidth / 2, srcHeight / 2 - logoHeight / 2, null);\n\n        return bitmap;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android: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": "app/src/main/res/drawable/list_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<inset xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:insetLeft=\"1.0px\"\n    android:insetRight=\"1.0px\" >\n\n    <selector>\n        <item android:state_pressed=\"true\">\n           \n            <shape>\n                <solid android:color=\"@color/orange\" />\n\n                <corners\n                    android:bottomLeftRadius=\"7.0dip\"\n                    android:bottomRightRadius=\"7.0dip\"\n                    android:radius=\"2.0dip\"\n                    android:topLeftRadius=\"7.0dip\"\n                    android:topRightRadius=\"7.0dip\" />\n\n                <stroke\n                    android:width=\"1dp\"\n                    android:color=\"#eededede\" />               \n            </shape>\n           \n        </item>\n        <item>\n            <shape>\n                <solid android:color=\"@color/white\" />\n\n                <corners\n                    android:bottomLeftRadius=\"7.0dip\"\n                    android:bottomRightRadius=\"7.0dip\"\n                    android:radius=\"2.0dip\"\n                    android:topLeftRadius=\"7.0dip\"\n                    android:topRightRadius=\"7.0dip\" />\n\n                <stroke\n                    android:width=\"1dp\"\n                    android:color=\"#eededede\" />\n            </shape>\n        </item>\n    </selector>\n\n</inset>"
  },
  {
    "path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android: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": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/activity_bg_color\"\n    android:orientation=\"vertical\"\n    tools:context=\".MainActivity\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"二维码内容：\" />\n\n        <EditText\n            android:id=\"@+id/et_content\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"3dp\"\n        android:layout_marginRight=\"3dp\"\n        android:layout_marginBottom=\"8dp\"\n        android:background=\"@drawable/list_bg\"\n        android:orientation=\"vertical\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"二维码宽度：\" />\n\n            <EditText\n                android:id=\"@+id/et_width\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:hint=\"650\"\n                android:inputType=\"number\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"二维码高度：\" />\n\n            <EditText\n                android:id=\"@+id/et_height\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:hint=\"650\"\n                android:inputType=\"number\" />\n\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"容错率：\" />\n\n            <Spinner\n                android:id=\"@+id/sp_error_correction_level\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:entries=\"@array/spinarr_error_correction\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"52dp\"\n                android:text=\"空白边距：\" />\n\n            <Spinner\n                android:id=\"@+id/sp_margin\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:entries=\"@array/spinarr_margin\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\">\n\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"黑色色块：\" />\n\n            <Spinner\n                android:id=\"@+id/sp_color_black\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:entries=\"@array/spinarr_color_black\" />\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"4dp\"\n                android:text=\"白色色块：\" />\n\n            <Spinner\n                android:id=\"@+id/sp_color_white\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:entries=\"@array/spinarr_color_white\" />\n\n        </LinearLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\">\n\n            <TextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginBottom=\"5dp\"\n                android:gravity=\"center\"\n                android:text=\"选取logo\" />\n\n            <ImageView\n                android:id=\"@+id/picture_logo\"\n                android:layout_width=\"100dp\"\n                android:layout_height=\"100dp\"\n                android:scaleType=\"fitXY\"\n                android:layout_gravity=\"center_horizontal\"\n                android:src=\"@mipmap/pic\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\">\n\n            <TextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginBottom=\"5dp\"\n                android:gravity=\"center\"\n                android:text=\"选取代替黑色色块的图片\" />\n\n            <ImageView\n                android:id=\"@+id/picture_black\"\n                android:layout_width=\"100dp\"\n                android:layout_height=\"100dp\"\n                android:scaleType=\"fitXY\"\n                android:layout_gravity=\"center_horizontal\"\n                android:src=\"@mipmap/pic\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <Button\n        android:id=\"@+id/btn_generate\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:layout_marginTop=\"10dp\"\n        android:text=\"生成二维码\" />\n\n    <ImageView\n        android:id=\"@+id/iv_qrcode\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_marginTop=\"10dp\" />\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "app/src/main/res/values/array.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"spinarr_error_correction\">\n        <item>H</item>\n        <item>Q</item>\n        <item>M </item>\n        <item>L </item>\n    </string-array>\n\n    <string-array name=\"spinarr_margin\">\n        <item>1</item>\n        <item>2</item>\n        <item>3</item>\n        <item>4</item>\n        <item>5</item>\n        <item>6</item>\n    </string-array>\n\n    <string-array name=\"spinarr_color_black\">\n        <item>黑色</item>\n        <item>白色</item>\n        <item>蓝色</item>\n        <item>绿色</item>\n        <item>黄色</item>\n        <item>红色</item>\n        <item>紫色</item>\n        <item>粉红色</item>\n        <item>薄荷色</item>\n    </string-array>\n\n    <string-array name=\"spinarr_color_white\">\n        <item>白色</item>\n        <item>黑色</item>\n        <item>蓝色</item>\n        <item>绿色</item>\n        <item>黄色</item>\n        <item>红色</item>\n        <item>紫色</item>\n        <item>粉红色</item>\n        <item>薄荷色</item>\n    </string-array>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"colorPrimaryDark\">#303F9F</color>\n    <color name=\"colorAccent\">#FF4081</color>\n\n    <color name=\"activity_bg_color\">#fff5f5f5</color>\n    <color name=\"orange\">#FFE4CA</color>\n    <color name=\"white\">#ffffff</color>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">超越二维码生成器</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/xml/file_paths.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <!--path设为空值表示将整个sd卡共享-->\n    <external-path\n        name=\"my_images\"\n        path=\"\" />\n</paths>"
  },
  {
    "path": "app/src/test/java/com/example/xch/generateqrcode/ExampleUnitTest.java",
    "content": "package com.example.xch.generateqrcode;\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() {\n        assertEquals(4, 2 + 2);\n    }\n}"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    \n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:4.1.2'\n        \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": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Feb 18 11:01:43 CST 2021\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-6.5-bin.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\n"
  }
]