[
  {
    "path": ".gitignore",
    "content": ".gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n**/*.iml\n.idea\n\n\n"
  },
  {
    "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 2014 Chaobin WU\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"
  },
  {
    "path": "README.md",
    "content": "Support\n========\n\nCustom Android support library, include some useful utils and widget.\n\n\tsupport内是自定义的一些东西，sammple中包含support的实现demo样例，\n\nDownload\n-------\nDownload the latest repo or grab the stable released version via Maven:\n\nClone the master branch:\n\n```\n\tgit clone https://github.com/avenwu/support.git\n```\n\nor Gradle:\n\n```Groovy\n\tcompile 'com.github.avenwu:support:0.1.1'\n```\n\n\nLicense\n=======\n\n    Copyright 2014 Chaobin Wu.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n---\n\n实战案例\n-------\n\n### 卡片翻转优化\n\n![device-2016-01-19-162559.mp4.gif](images/device-2016-01-19-162559.mp4.gif)\n\n### TextView缩略\n通过控制文本展示实现单击展开和收缩文本，并在收缩状态显示提示图标\n\n![TextView](http://7u2jir.com1.z0.glb.clouddn.com/expand_text.gif)\n\n### 字体设置汇总\n通过不同方式实现自定义字体的设置，主要区别在于调用层\n\n![字体设置汇总](http://7u2jir.com1.z0.glb.clouddn.com/device-2015-10-08-173228.png)\n\n\n### 巧用BitmapShader\n通过为Paint画笔设置Shader，可以再画布上绘制许多有意思的东西\n\n![BitmapShader](http://7u2jir.com1.z0.glb.clouddn.com/bitmapshader_imageview.gif)\n\n\n### Property自定义属性动画\n基于Property的自定义属性动画\n\n![Property动画](http://7u2jir.com1.z0.glb.clouddn.com/property_animation.gif)\n\n### 自定义ResideMenu\nresidemenu是是侧滑菜单的一种，但是视觉效果更特别，此次实现是基于android v4中SlidePanelLayout扩展而来，主要是为了减少非核心代码的开发工作。\n\n详细实现请看:[基于SlidePanelLayout实现ResideMenu](http://avenwu.net/2015/02/24/custom_slide_panel_layout_as_reside_style_on_dribble_and_qq)\n\n对于普通侧滑菜单的实现也可以参照我之前的一片文章[自定义侧滑菜单](http://avenwu.net/customlayout/2014/12/16/sliding_menu/)\n\n![自定义ResideMenu](http://7u2jir.com1.z0.glb.clouddn.com/custom_residemenu.gif)\n\n### RadioGroup仿iOS Segmented Control\n这个没什么好说的用的实际上是RadioGroup，但是加强了封装和配置，所以使用会方便一些，否则每次需要类似UI效果都从新写是很累的事情。\n\n![RadioGroup仿iOS Segmented Control ](http://7u2jir.com1.z0.glb.clouddn.com/styled_radiogroup.png)\n\n### 流式标签生成控件\n这个东西还是比较有意思的，看图说话，通过EditText和TextView以及ViewGroup的有机结合，就可以做出这个效果不一般的输入交互控件。\n\n详细技术实现请看:[流式标签生成控件](http://avenwu.net/customlayout/2015/01/18/tag_layout)\n\n![流式标签生成控件](http://7u2jir.com1.z0.glb.clouddn.com/tag_input_layout_demo.gif)\n\n### qq消息气泡【二次贝塞尔曲线多边形】\n这个实际上是做为分析QQ红点气泡的一部分，及气泡拖拽的原理。\n\n![多边形气泡](http://7u2jir.com1.z0.glb.clouddn.com/polygon_bezier.gif)\n\n\n### 侧滑菜单\n简单的侧滑效果实现并不难，需要处理两块view容器的相对关系，但是有效果并不代表能使用，可实用的组件还需要考虑很多，下面的demo实际上主要目的在于处理菜单和内容区的位置关系，用的是scroll移动的方法，结合Scroller，所以导致变化的实际上是菜单容器的内容而不是菜单,所以support里还有另外一个自定义侧滑菜单解决这个问题。更多技术实现参考对应的文章:[自定义侧滑菜单](http://avenwu.net/customlayout/2014/12/16/sliding_menu/)\n\n![侧滑菜单](http://7u2jir.com1.z0.glb.clouddn.com/drawermenu.gif)\n\n### 下拉刷新列表\n下拉刷新的本质上是LinearLayout嵌套ListView+View（刷新的头部视图），通过TouchEvent的分发控制，动态改变视图的Top位置。\n\n![下拉刷新列表](http://7u2jir.com1.z0.glb.clouddn.com/pulltorefresh.gif)\n\n\n### 圆形排行View\n这个实际上最开是的时候已经作为一个单独的项目开发，并且已经上传值maven，所以也可用gradle导入。\n\n[IndexImageView项目首页](http://avenwu.net/IndexImageView/) \n这个项目源灵感来自搜狐视屏客户端，看好声音的时候看到人气选手的头像是一个圆形带排行数的视图，感觉有点意思，索性花了点时间自己写了一个，同时学习如何将开源项目发布到Maven Central，这样就可以通过gradle方便的获取maven依赖库。  \n![Screenshot](https://github.com/avenwu/IndexImageView/raw/master/device-2014-10-21-164818.png)\n\n\n\n\n\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.3.0'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Apr 10 15:27:10 PDT 2013\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.2.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.\n# Default value: -Xmx10248m -XX:MaxPermSize=256m\n# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8\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"
  },
  {
    "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# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\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\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\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\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "sample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "sample/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.1\"\n\n    defaultConfig {\n        applicationId \"com.avenwu.deepinandroid\"\n        minSdkVersion 8\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    lintOptions {\n        abortOnError false\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    packagingOptions {\n        exclude 'META-INF/services/javax.annotation.processing.Processor'\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    compile project(':support')\n    compile 'com.jakewharton:butterknife:6.0.0'\n    compile 'com.github.avenwu:IndexImageView:1.0.1'\n    compile 'com.drewnoakes:metadata-extractor:2.7.2'\n    compile 'com.android.support:support-v4:23.1.0'\n    compile 'com.android.support:appcompat-v7:23.1.0'\n    compile 'com.android.support:percent:23.1.0'\n    compile 'com.squareup.retrofit:retrofit:1.6.0'\n}\n"
  },
  {
    "path": "sample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in F:\\Android\\sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "sample/src/androidTest/java/com/avenwu/deepinandroid/ApplicationTest.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\nimport android.util.Log;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n\n    final static char ASSIC_START = '!';\n    final static char ASSIC_END = '~';\n\n    final static char UNICODE_START = '！';\n    final static char UNICODE_END = '～';\n\n    final static long DIFF = UNICODE_START - ASSIC_START;\n\n    public void testEncodeFormat() {\n        String res = \"，！@#%&*（）？；\";\n        String des = \",!@#%&*()?;\";\n        StringBuilder builder = new StringBuilder();\n        for (int i = 0; i < res.length(); i++) {\n            char c = res.charAt(i);\n            Log.e(\"TEST_UNICODE\", \"\" + c);\n            if (isEXPANDUNICODE(c)) {\n                c = unicode2Assic(c);\n                Log.e(\"TEST_UNICODE\", \"translated:\" + c);\n            }\n            builder.append(c);\n        }\n        assertEquals(des, builder.toString());\n    }\n\n    boolean isBasicASSIC(char c) {\n        return c >= ASSIC_START && c <= ASSIC_END;\n    }\n\n    boolean isEXPANDUNICODE(char c) {\n        return c >= UNICODE_START && c <= UNICODE_END;\n    }\n\n    char unicode2Assic(char c) {\n        return (char) (c - DIFF);\n    }\n}"
  },
  {
    "path": "sample/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.avenwu.deepinandroid\" >\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/AppTheme\" >\n        <activity\n            android:name=\".MainActivity\"\n            android:label=\"@string/app_name\" >\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity android:name=\".ShortcutDemo\" />\n        <activity android:name=\".RefreshWidgetActivity\" />\n        <activity android:name=\".QQDraggingCircleDemo\" />\n        <activity\n            android:name=\".TagInputDemo\"\n            android:windowSoftInputMode=\"stateVisible\" />\n        <activity android:name=\".BusEventDemo\" />\n        <activity android:name=\".ColorFilterDemo\" />\n        <activity\n            android:name=\".MarkdownDemo\"\n            android:label=\"@string/title_activity_markdown_demo\" />\n        <activity android:name=\".StyledRadioButtonDemo\" />\n        <activity\n            android:name=\".SlidePanelDemo\"\n            android:theme=\"@style/Theme.AppCompat.NoActionBar\" />\n        <activity android:name=\".AnimatedSubActivity\" />\n        <activity\n            android:name=\".ScaleSubActivity\"\n            android:theme=\"@style/Transparent\" />\n        <activity android:name=\".CustomTabActivity\" />\n        <activity\n            android:name=\".FeatureActivity\"\n            android:configChanges=\"orientation|keyboardHidden|screenSize\"\n            android:label=\"@string/title_activity_feature\"\n            android:theme=\"@style/FullscreenTheme\" >\n        </activity>\n        <activity\n            android:name=\".TypefaceActivity\"\n            android:label=\"@string/title_activity_typeface\" >\n        </activity>\n        <activity android:name=\".CustomProgressActivity\"\n            android:label=\"Progress\"/>\n        <activity android:name=\".CustomTextViewActivity\"\n            android:label=\"TextView\"/>\n        <activity android:name=\".CustomDrawableDemo\"\n            android:label=\"Custom Drawable\"/>\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "sample/src/main/assets/github-markdown.css",
    "content": "@font-face {\n  font-family: octicons-anchor;\n  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff');\n}\n\n.markdown-body {\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n  color: #333;\n  overflow: hidden;\n  font-family: \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, freesans, sans-serif;\n  font-size: 16px;\n  line-height: 1.6;\n  word-wrap: break-word;\n}\n\n.markdown-body a {\n  background: transparent;\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n  outline: 0;\n}\n\n.markdown-body strong {\n  font-weight: bold;\n}\n\n.markdown-body h1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n.markdown-body img {\n  border: 0;\n}\n\n.markdown-body hr {\n  -moz-box-sizing: content-box;\n  box-sizing: content-box;\n  height: 0;\n}\n\n.markdown-body pre {\n  overflow: auto;\n}\n\n.markdown-body code,\n.markdown-body kbd,\n.markdown-body pre {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n.markdown-body input {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\n\n.markdown-body html input[disabled] {\n  cursor: default;\n}\n\n.markdown-body input {\n  line-height: normal;\n}\n\n.markdown-body input[type=\"checkbox\"] {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n  padding: 0;\n}\n\n.markdown-body table {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\n.markdown-body td,\n.markdown-body th {\n  padding: 0;\n}\n\n.markdown-body * {\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body input {\n  font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n}\n\n.markdown-body a {\n  color: #4183c4;\n  text-decoration: none;\n}\n\n.markdown-body a:hover,\n.markdown-body a:focus,\n.markdown-body a:active {\n  text-decoration: underline;\n}\n\n.markdown-body hr {\n  height: 0;\n  margin: 15px 0;\n  overflow: hidden;\n  background: transparent;\n  border: 0;\n  border-bottom: 1px solid #ddd;\n}\n\n.markdown-body hr:before {\n  display: table;\n  content: \"\";\n}\n\n.markdown-body hr:after {\n  display: table;\n  clear: both;\n  content: \"\";\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  margin-top: 15px;\n  margin-bottom: 15px;\n  line-height: 1.1;\n}\n\n.markdown-body h1 {\n  font-size: 30px;\n}\n\n.markdown-body h2 {\n  font-size: 21px;\n}\n\n.markdown-body h3 {\n  font-size: 16px;\n}\n\n.markdown-body h4 {\n  font-size: 14px;\n}\n\n.markdown-body h5 {\n  font-size: 12px;\n}\n\n.markdown-body h6 {\n  font-size: 11px;\n}\n\n.markdown-body blockquote {\n  margin: 0;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body ol ol,\n.markdown-body ul ol {\n  list-style-type: lower-roman;\n}\n\n.markdown-body ul ul ol,\n.markdown-body ul ol ol,\n.markdown-body ol ul ol,\n.markdown-body ol ol ol {\n  list-style-type: lower-alpha;\n}\n\n.markdown-body dd {\n  margin-left: 0;\n}\n\n.markdown-body code {\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 0;\n  font: 12px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n}\n\n.markdown-body kbd {\n  background-color: #e7e7e7;\n  background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);\n  background-image: linear-gradient(#fefefe, #e7e7e7);\n  background-repeat: repeat-x;\n  border-radius: 2px;\n  border: 1px solid #cfcfcf;\n  color: #000;\n  padding: 3px 5px;\n  line-height: 10px;\n  font: 11px Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\n  display: inline-block;\n}\n\n.markdown-body>*:first-child {\n  margin-top: 0 !important;\n}\n\n.markdown-body>*:last-child {\n  margin-bottom: 0 !important;\n}\n\n.markdown-body .anchor {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  display: block;\n  padding-right: 6px;\n  padding-left: 30px;\n  margin-left: -30px;\n}\n\n.markdown-body .anchor:focus {\n  outline: none;\n}\n\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n  position: relative;\n  margin-top: 1em;\n  margin-bottom: 16px;\n  font-weight: bold;\n  line-height: 1.4;\n}\n\n.markdown-body h1 .octicon-link,\n.markdown-body h2 .octicon-link,\n.markdown-body h3 .octicon-link,\n.markdown-body h4 .octicon-link,\n.markdown-body h5 .octicon-link,\n.markdown-body h6 .octicon-link {\n  display: none;\n  color: #000;\n  vertical-align: middle;\n}\n\n.markdown-body h1:hover .anchor,\n.markdown-body h2:hover .anchor,\n.markdown-body h3:hover .anchor,\n.markdown-body h4:hover .anchor,\n.markdown-body h5:hover .anchor,\n.markdown-body h6:hover .anchor {\n  height: 1em;\n  padding-left: 8px;\n  margin-left: -30px;\n  line-height: 1;\n  text-decoration: none;\n}\n\n.markdown-body h1:hover .anchor .octicon-link,\n.markdown-body h2:hover .anchor .octicon-link,\n.markdown-body h3:hover .anchor .octicon-link,\n.markdown-body h4:hover .anchor .octicon-link,\n.markdown-body h5:hover .anchor .octicon-link,\n.markdown-body h6:hover .anchor .octicon-link {\n  display: inline-block;\n}\n\n.markdown-body h1 {\n  padding-bottom: 0.3em;\n  font-size: 2.25em;\n  line-height: 1.2;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h2 {\n  padding-bottom: 0.3em;\n  font-size: 1.75em;\n  line-height: 1.225;\n  border-bottom: 1px solid #eee;\n}\n\n.markdown-body h3 {\n  font-size: 1.5em;\n  line-height: 1.43;\n}\n\n.markdown-body h4 {\n  font-size: 1.25em;\n}\n\n.markdown-body h5 {\n  font-size: 1em;\n}\n\n.markdown-body h6 {\n  font-size: 1em;\n  color: #777;\n}\n\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n  margin-top: 0;\n  margin-bottom: 16px;\n}\n\n.markdown-body hr {\n  height: 4px;\n  padding: 0;\n  margin: 16px 0;\n  background-color: #e7e7e7;\n  border: 0 none;\n}\n\n.markdown-body ul,\n.markdown-body ol {\n  padding-left: 2em;\n}\n\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.markdown-body li>p {\n  margin-top: 16px;\n}\n\n.markdown-body dl {\n  padding: 0;\n}\n\n.markdown-body dl dt {\n  padding: 0;\n  margin-top: 16px;\n  font-size: 1em;\n  font-style: italic;\n  font-weight: bold;\n}\n\n.markdown-body dl dd {\n  padding: 0 16px;\n  margin-bottom: 16px;\n}\n\n.markdown-body blockquote {\n  padding: 0 15px;\n  color: #777;\n  border-left: 4px solid #ddd;\n}\n\n.markdown-body blockquote>:first-child {\n  margin-top: 0;\n}\n\n.markdown-body blockquote>:last-child {\n  margin-bottom: 0;\n}\n\n.markdown-body table {\n  display: block;\n  width: 100%;\n  overflow: auto;\n  word-break: normal;\n  word-break: keep-all;\n}\n\n.markdown-body table th {\n  font-weight: bold;\n}\n\n.markdown-body table th,\n.markdown-body table td {\n  padding: 6px 13px;\n  border: 1px solid #ddd;\n}\n\n.markdown-body table tr {\n  background-color: #fff;\n  border-top: 1px solid #ccc;\n}\n\n.markdown-body table tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n.markdown-body img {\n  max-width: 100%;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n\n.markdown-body code {\n  padding: 0;\n  padding-top: 0.2em;\n  padding-bottom: 0.2em;\n  margin: 0;\n  font-size: 85%;\n  background-color: rgba(0,0,0,0.04);\n  border-radius: 3px;\n}\n\n.markdown-body code:before,\n.markdown-body code:after {\n  letter-spacing: -0.2em;\n  content: \"\\00a0\";\n}\n\n.markdown-body pre>code {\n  padding: 0;\n  margin: 0;\n  font-size: 100%;\n  word-break: normal;\n  white-space: pre;\n  background: transparent;\n  border: 0;\n}\n\n.markdown-body .highlight {\n  margin-bottom: 16px;\n}\n\n.markdown-body .highlight pre,\n.markdown-body pre {\n  padding: 16px;\n  overflow: auto;\n  font-size: 85%;\n  line-height: 1.45;\n  background-color: #f7f7f7;\n  border-radius: 3px;\n}\n\n.markdown-body .highlight pre {\n  margin-bottom: 0;\n  word-break: normal;\n}\n\n.markdown-body pre {\n  word-wrap: normal;\n}\n\n.markdown-body pre code {\n  display: inline;\n  max-width: initial;\n  padding: 0;\n  margin: 0;\n  overflow: initial;\n  line-height: inherit;\n  word-wrap: normal;\n  background-color: transparent;\n  border: 0;\n}\n\n.markdown-body pre code:before,\n.markdown-body pre code:after {\n  content: normal;\n}\n\n.markdown-body .highlight {\n  background: #fff;\n}\n\n.markdown-body .highlight .mf,\n.markdown-body .highlight .mh,\n.markdown-body .highlight .mi,\n.markdown-body .highlight .mo,\n.markdown-body .highlight .il,\n.markdown-body .highlight .m {\n  color: #945277;\n}\n\n.markdown-body .highlight .s,\n.markdown-body .highlight .sb,\n.markdown-body .highlight .sc,\n.markdown-body .highlight .sd,\n.markdown-body .highlight .s2,\n.markdown-body .highlight .se,\n.markdown-body .highlight .sh,\n.markdown-body .highlight .si,\n.markdown-body .highlight .sx,\n.markdown-body .highlight .s1 {\n  color: #df5000;\n}\n\n.markdown-body .highlight .kc,\n.markdown-body .highlight .kd,\n.markdown-body .highlight .kn,\n.markdown-body .highlight .kp,\n.markdown-body .highlight .kr,\n.markdown-body .highlight .kt,\n.markdown-body .highlight .k,\n.markdown-body .highlight .o {\n  font-weight: bold;\n}\n\n.markdown-body .highlight .kt {\n  color: #458;\n}\n\n.markdown-body .highlight .c,\n.markdown-body .highlight .cm,\n.markdown-body .highlight .c1 {\n  color: #998;\n  font-style: italic;\n}\n\n.markdown-body .highlight .cp,\n.markdown-body .highlight .cs {\n  color: #999;\n  font-weight: bold;\n}\n\n.markdown-body .highlight .cs {\n  font-style: italic;\n}\n\n.markdown-body .highlight .n {\n  color: #333;\n}\n\n.markdown-body .highlight .na,\n.markdown-body .highlight .nv,\n.markdown-body .highlight .vc,\n.markdown-body .highlight .vg,\n.markdown-body .highlight .vi {\n  color: #008080;\n}\n\n.markdown-body .highlight .nb {\n  color: #0086B3;\n}\n\n.markdown-body .highlight .nc {\n  color: #458;\n  font-weight: bold;\n}\n\n.markdown-body .highlight .no {\n  color: #094e99;\n}\n\n.markdown-body .highlight .ni {\n  color: #800080;\n}\n\n.markdown-body .highlight .ne {\n  color: #990000;\n  font-weight: bold;\n}\n\n.markdown-body .highlight .nf {\n  color: #945277;\n  font-weight: bold;\n}\n\n.markdown-body .highlight .nn {\n  color: #555;\n}\n\n.markdown-body .highlight .nt {\n  color: #000080;\n}\n\n.markdown-body .highlight .err {\n  color: #a61717;\n  background-color: #e3d2d2;\n}\n\n.markdown-body .highlight .gd {\n  color: #000;\n  background-color: #fdd;\n}\n\n.markdown-body .highlight .gd .x {\n  color: #000;\n  background-color: #faa;\n}\n\n.markdown-body .highlight .ge {\n  font-style: italic;\n}\n\n.markdown-body .highlight .gr {\n  color: #aa0000;\n}\n\n.markdown-body .highlight .gh {\n  color: #999;\n}\n\n.markdown-body .highlight .gi {\n  color: #000;\n  background-color: #dfd;\n}\n\n.markdown-body .highlight .gi .x {\n  color: #000;\n  background-color: #afa;\n}\n\n.markdown-body .highlight .go {\n  color: #888;\n}\n\n.markdown-body .highlight .gp {\n  color: #555;\n}\n\n.markdown-body .highlight .gs {\n  font-weight: bold;\n}\n\n.markdown-body .highlight .gu {\n  color: #800080;\n  font-weight: bold;\n}\n\n.markdown-body .highlight .gt {\n  color: #aa0000;\n}\n\n.markdown-body .highlight .ow {\n  font-weight: bold;\n}\n\n.markdown-body .highlight .w {\n  color: #bbb;\n}\n\n.markdown-body .highlight .sr {\n  color: #017936;\n}\n\n.markdown-body .highlight .ss {\n  color: #8b467f;\n}\n\n.markdown-body .highlight .bp {\n  color: #999;\n}\n\n.markdown-body .highlight .gc {\n  color: #999;\n  background-color: #EAF2F5;\n}\n\n.markdown-body .octicon {\n  font: normal normal 16px octicons-anchor;\n  line-height: 1;\n  display: inline-block;\n  text-decoration: none;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.markdown-body .octicon-link:before {\n  content: '\\f05c';\n}\n\n.markdown-body .task-list-item {\n  list-style-type: none;\n}\n\n.markdown-body .task-list-item+.task-list-item {\n  margin-top: 3px;\n}\n\n.markdown-body .task-list-item input {\n  float: left;\n  margin: 0.3em 0 0.25em -1.6em;\n  vertical-align: middle;\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/AnimatedSubActivity.java",
    "content": "/*\n * Copyright (C) 2013 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\npackage com.avenwu.deepinandroid;\n\nimport android.app.Activity;\nimport android.os.Bundle;\n\n/**\n * See WindowAnimations.java for comments on the overall application.\n *\n * This is a sub-activity which provides custom animation behavior. When this activity\n * is exited, the user will see the behavior specified in the overridePendingTransition() call.\n */\npublic class AnimatedSubActivity extends Activity {\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_window_anim_sub);\n    }\n\n    @Override\n    public void finish() {\n        super.finish();\n        overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_right);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/BitmapShaderFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * Created by chaobin on 4/6/15.\n */\npublic class BitmapShaderFragment extends Fragment {\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.bitmap_shader_layout, null);\n        view.setOnClickListener(null);\n        return view;\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/BreathLightViewDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * Created by chaobin on 3/3/15.\n */\npublic class BreathLightViewDemo extends Fragment {\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.ripple_layout, null);\n        view.setOnClickListener(null);\n        return view;\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/BusEventDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport com.avenwu.deepinandroid.eventbus.Bus;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.util.Log;\nimport android.view.View;\nimport android.widget.Toast;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic class BusEventDemo extends ActionBarActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.eventbus_layout);\n    }\n\n    @Override\n    protected void onStart() {\n        super.onStart();\n        Bus.getDefault().register(this);\n    }\n\n    public void onSendClick(View view) {\n        Bus.getDefault().post(\"Hello world\");\n    }\n\n    public void onEvent(String event) {\n        Log.d(\"BusEventDemo\", \"onEvent hit\");\n        Toast.makeText(this, \"onEvent hit:\" + event, Toast.LENGTH_SHORT).show();\n    }\n\n    @Override\n    protected void onStop() {\n        super.onStop();\n        Bus.getDefault().unregister(this);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CameraMatrixFragmentDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * Created by aven on 1/20/16.\n */\npublic class CameraMatrixFragmentDemo extends Fragment {\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.camera_matrix_layout, null);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/ColorFilterDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Color;\nimport android.graphics.PorterDuff;\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.View;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.ImageView;\nimport android.widget.Spinner;\nimport android.widget.Toast;\n\nimport java.lang.reflect.Field;\n\nimport butterknife.ButterKnife;\nimport butterknife.InjectView;\n\n/**\n * Created by chaobin on 2/3/15.\n */\n\npublic class ColorFilterDemo extends ActionBarActivity implements AdapterView.OnItemSelectedListener {\n    @InjectView(R.id.spinner)\n    Spinner mPorterDuffSpinner;\n    @InjectView(R.id.iv_preview)\n    ImageView mPreviewView;\n    @InjectView(R.id.iv_image)\n    ImageView mImage;\n    static final int MASK_HINT_COLOR = 0x99000000;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.filter_layout);\n        ButterKnife.inject(this);\n        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n                R.array.porter_duff_array, android.R.layout.simple_spinner_item);\n        adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n        mPorterDuffSpinner.setPrompt(\"Select the PorterDuff\");\n        mPorterDuffSpinner.setAdapter(adapter);\n        mPorterDuffSpinner.setOnItemSelectedListener(this);\n        int defaultSelection = 0;\n        try {\n            Field field = PorterDuff.Mode.class.getDeclaredField(\"nativeInt\");\n            field.setAccessible(true);\n            defaultSelection = field.getInt(PorterDuff.Mode.DARKEN);\n        } catch (NoSuchFieldException | IllegalAccessException e) {\n            e.printStackTrace();\n        }\n        mPorterDuffSpinner.setSelection(defaultSelection);\n    }\n\n    @Override\n    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n        PorterDuff.Mode mode = PorterDuff.Mode.class.getEnumConstants()[position];\n        mPreviewView.setColorFilter(Color.GREEN, mode);\n        mImage.setColorFilter(MASK_HINT_COLOR, mode);\n        Toast.makeText(this, \"Select \" + mode, Toast.LENGTH_SHORT).show();\n    }\n\n    @Override\n    public void onNothingSelected(AdapterView<?> parent) {\n\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/Content.java",
    "content": "package com.avenwu.deepinandroid;\n\npublic interface Content {\n    public String getContent();\n}"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CurtainLayoutFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * Created by aven on 12/25/15.\n */\npublic class CurtainLayoutFragment extends Fragment {\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        return View.inflate(getActivity(), R.layout.curtain_demo, null);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CustomDrawableDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.util.TypedValue;\nimport android.widget.RadioButton;\nimport android.widget.RadioGroup;\n\nimport net.avenwu.support.widget.SegmentDrawable;\n\npublic class CustomDrawableDemo extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.custom_drawable_layout);\n        final int color = 0xff35b558;\n        int strokeWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2f, getResources().getDisplayMetrics());\n        int corner = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 5f, getResources().getDisplayMetrics());\n\n\n        SegmentDrawable drawable1 = new SegmentDrawable(SegmentDrawable.Style.LEFT_EDGE);\n        drawable1.setStrokeWidth(strokeWidth);\n        drawable1.setColor(color);\n        drawable1.setCornerRadius(corner);\n        findViewById(R.id.label).setBackgroundDrawable(drawable1);\n\n        SegmentDrawable drawable2 = new SegmentDrawable(SegmentDrawable.Style.MIDDLE);\n        drawable2.setStrokeWidth(strokeWidth);\n        drawable2.setColor(color);\n        drawable2.setCornerRadius(corner);\n\n        findViewById(R.id.label2).setBackgroundDrawable(drawable2);\n\n        SegmentDrawable drawable3 = new SegmentDrawable(SegmentDrawable.Style.RIGHT_EDGE);\n        drawable3.setStrokeWidth(strokeWidth);\n        drawable3.setColor(color);\n        drawable3.setCornerRadius(corner);\n\n        findViewById(R.id.label3).setBackgroundDrawable(drawable3);\n\n        RadioGroup group = (RadioGroup) findViewById(R.id.container);\n        int count = group.getChildCount();\n\n        for (int i = 0; i < count; i++) {\n            RadioButton child = (RadioButton) group.getChildAt(i);\n\n            SegmentDrawable drawable;\n            if (i == 0) {\n                drawable = new SegmentDrawable(SegmentDrawable.Style.LEFT_EDGE);\n                child.setChecked(true);\n            } else if (i == count - 1) {\n                drawable = new SegmentDrawable(SegmentDrawable.Style.RIGHT_EDGE);\n            } else {\n                drawable = new SegmentDrawable(SegmentDrawable.Style.MIDDLE);\n            }\n            drawable.setColor(color);\n            drawable.setStrokeWidth(strokeWidth);\n            drawable.setCornerRadius(corner);\n\n            child.setButtonDrawable(null);\n            child.setBackgroundDrawable(drawable.newStateListDrawable());\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CustomProgressActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\n\n/**\n * Created by aven on 10/20/15.\n */\npublic class CustomProgressActivity extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_progress_layout);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CustomTabActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentActivity;\nimport android.support.v4.app.FragmentTabHost;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.TabWidget;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport net.avenwu.support.widget.SimpleTab;\n\n/**\n * Created by aven on 5/3/15.\n */\npublic class CustomTabActivity extends FragmentActivity {\n    SimpleTab mSimpleTab;\n    FragmentTabHost mTabHost;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.custom_tab_activity);\n        ViewGroup viewGroup = (ViewGroup) findViewById(R.id.container);\n        mSimpleTab = new SimpleTab.Builder(this)\n                .newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_1, R.drawable.ic_launcher))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_2, R.drawable.ic_launcher))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_3, R.drawable.ic_launcher))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(R.string.tab_4, R.drawable.ic_launcher))\n                .setOnTabClickListener(new SimpleTab.OnTabClickListener() {\n                    @Override\n                    public void onItemClick(View view, SimpleTab.Item item, int position) {\n                        Toast.makeText(CustomTabActivity.this, \"position=\" + position, Toast\n                                .LENGTH_SHORT).show();\n                    }\n                })\n                .create();\n        mSimpleTab.injectInto(viewGroup);\n//        TabWidget\n        mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);\n        mTabHost.setup(this, getSupportFragmentManager(), android.R.id.tabcontent);\n\n        mTabHost.addTab(\n                mTabHost.newTabSpec(\"tab1\").setIndicator(\"Tab 1\", null).setIndicator(getTabIndicator(this, R.string.tab_1, R.drawable.ic_launcher)),\n                FragmentTab.class, null);\n        mTabHost.addTab(\n                mTabHost.newTabSpec(\"tab2\").setIndicator(\"Tab 2\", null).setIndicator\n                        (getTabIndicator(this, R.string.tab_2, R.drawable.ic_launcher)),\n                FragmentTab.class, null);\n        mTabHost.addTab(\n                mTabHost.newTabSpec(\"tab3\").setIndicator(\"Tab 3\", null).setIndicator\n                        (getTabIndicator(this, R.string.tab_3, R.drawable.ic_launcher)),\n                FragmentTab.class, null);\n        mTabHost.addTab(\n                mTabHost.newTabSpec(\"tab4\").setIndicator(\"Tab 3\", null).setIndicator\n                        (getTabIndicator(this, R.string.tab_4, R.drawable.ic_launcher)),\n                FragmentTab.class, null);\n    }\n\n    private View getTabIndicator(Context context, int title, int icon) {\n        View view = LayoutInflater.from(context).inflate(R.layout.fragment_tab_item, null);\n        ImageView iv = (ImageView) view.findViewById(R.id.imageView);\n        iv.setImageResource(icon);\n        TextView tv = (TextView) view.findViewById(R.id.textView);\n        tv.setText(title);\n        return view;\n    }\n    public static class FragmentTab extends Fragment {\n\n        @Override\n        public void onCreate(Bundle savedInstanceState) {\n            super.onCreate(savedInstanceState);\n        }\n\n        @Override\n        public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                                 Bundle savedInstanceState) {\n            View v = inflater.inflate(R.layout.fragment_tab_host, container, false);\n            TextView tv = (TextView) v.findViewById(R.id.text);\n            tv.setText(this.getTag() + \" Content\");\n            return v;\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/CustomTextViewActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.text.Html;\nimport android.text.Spanned;\nimport android.widget.TextView;\n\n/**\n * Created by chaobin on 11/18/15.\n */\npublic class CustomTextViewActivity extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.textview_layout);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/DrawerDemoFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.CompoundButton;\nimport android.widget.FrameLayout;\nimport android.widget.Switch;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport com.github.avenwu.imageview.IndexImageView;\n\nimport net.avenwu.support.widget.DrawerFrame;\n\n/**\n * Created by Chaobin Wu on 2014/10/10.\n */\npublic class DrawerDemoFragment extends Fragment {\n\tDrawerFrame drawerFrame;\n\n\tpublic DrawerDemoFragment() {\n\t}\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.activity_my, container);\n\t\tdrawerFrame = (DrawerFrame) view.findViewById(R.id.view);\n\t\tSwitch s = (Switch) view.findViewById(R.id.switch1);\n\t\ts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked) {\n\t\t\t\t\tdrawerFrame.showMenuSmoothly();\n\t\t\t\t} else {\n\t\t\t\t\tdrawerFrame.dismissSmoothly();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTextView menu = new TextView(getActivity());\n\t\tmenu.setText(\"Menu Layout\");\n\t\tmenu.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));\n\t\tmenu.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getActivity(), \"Menu clicked\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t\tFrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n\t\tmenu.setLayoutParams(layoutParams);\n\t\tmenu.setGravity(Gravity.CENTER | Gravity.CENTER_VERTICAL);\n\t\tdrawerFrame.setMenuView(menu);\n\t\tIndexImageView imageView = new IndexImageView(getActivity());\n\t\timageView.setImageResource(R.drawable.ic_launcher);\n\t\timageView.setIndexEnable(true);\n\t\timageView.setText(\"121\");\n\t\timageView.setTextDimension(40);\n\t\tFrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(200, 200);\n\t\tlayoutParams2.gravity = Gravity.CENTER;\n\t\timageView.setLayoutParams(layoutParams2);\n\t\tdrawerFrame.setContentView(imageView);\n\t\timageView.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getActivity(), \"Image cliked\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t\treturn view;\n\t}\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/ExifViewerFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.media.ExifInterface;\nimport android.os.AsyncTask;\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.os.AsyncTaskCompat;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\nimport com.drew.imaging.ImageMetadataReader;\nimport com.drew.imaging.ImageProcessingException;\nimport com.drew.metadata.Directory;\nimport com.drew.metadata.Metadata;\nimport com.drew.metadata.Tag;\n\nimport net.avenwu.support.widget.FlatTabGroup;\n\nimport java.io.IOException;\nimport java.lang.reflect.Field;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.Map;\n\n/**\n * Created by chaobin on 3/4/15.\n */\npublic class ExifViewerFragment extends Fragment {\n    ImageView mImageView;\n    TextView mTextView;\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.exif_layout, null);\n        mImageView = (ImageView) view.findViewById(R.id.image);\n        mTextView = (TextView) view.findViewById(R.id.text);\n        FlatTabGroup tabs = (FlatTabGroup) view.findViewById(R.id.tabs);\n        tabs.setSelection(0);\n        tabs.setOnTabCheckedListener(new FlatTabGroup.OnTabCheckedListener() {\n            @Override\n            public void onChecked(FlatTabGroup group, int position) {\n                switch (position) {\n                    case 0:\n                        decodeWith(new AssetsImageExifDecoder());\n                        break;\n                    case 1:\n                        decodeWith(new ExternalImageExifDecoder());\n                        break;\n                }\n            }\n        });\n        return view;\n    }\n\n    private void decodeWith(ExifDecoder decoder) {\n        AsyncTaskCompat.executeParallel(new AsyncTask<ExifDecoder, Void, ExifBean>() {\n            @Override\n            protected ExifBean doInBackground(ExifDecoder... params) {\n                return new ExifBean(params[0].decodeBitmap(), params[0].extractExif());\n            }\n\n            @Override\n            protected void onPostExecute(ExifBean exifBean) {\n                if (exifBean.bitmap != null) {\n                    mImageView.setImageBitmap(exifBean.bitmap);\n                }\n                if (exifBean.value != null) {\n                    mTextView.setText(exifBean.value);\n                }\n            }\n        }, decoder);\n    }\n\n    interface ExifDecoder {\n        Bitmap decodeBitmap();\n\n        String extractExif();\n    }\n\n    /**\n     * ExifInterface seems not support image in assets\n     */\n    class AssetsImageExifDecoder implements ExifDecoder {\n        final String ASSETS_IMAGE_PATH = \"image2.jpg\";\n\n        @Override\n        public Bitmap decodeBitmap() {\n            try {\n                return BitmapFactory.decodeStream(getResources().getAssets().open(ASSETS_IMAGE_PATH));\n            } catch (IOException e) {\n                Log.d(\"ExifViewerFragment\", \"AssetsImageExifDecoder decodeBitmap failed\");\n                e.printStackTrace();\n            }\n            return null;\n        }\n\n        @Override\n        public String extractExif() {\n            try {\n                Metadata metadata = ImageMetadataReader.readMetadata(getResources().getAssets().open(ASSETS_IMAGE_PATH));\n                Iterator<Directory> iterator = metadata.getDirectories().iterator();\n                final String output = \"%s=%s\";\n                StringBuilder builder = new StringBuilder();\n                while (iterator.hasNext()) {\n                    Directory d = iterator.next();\n                    for (Tag tag : d.getTags()) {\n                        builder.append(String.format(output, tag.getTagName(), tag.getDescription()))\n                                .append(\"\\n\");\n                    }\n                }\n                return builder.toString();\n            } catch (ImageProcessingException e) {\n                e.printStackTrace();\n                Log.d(\"ExifViewerFragment\", \"get attributes failed\");\n            } catch (IOException e) {\n                e.printStackTrace();\n                Log.d(\"ExifViewerFragment\", \"get attributes failed\");\n            }\n\n            return null;\n        }\n    }\n\n    class ExternalImageExifDecoder implements ExifDecoder {\n        //TODO replace with your own image path\n        final String EXTRANAL_IMAGE_PATH = \"/storage/sdcard1/DCIM/Camera/IMG_20150304_162932.jpg\";\n\n        @Override\n        public Bitmap decodeBitmap() {\n            return BitmapFactory.decodeFile(EXTRANAL_IMAGE_PATH);\n        }\n\n        @Override\n        public String extractExif() {\n            try {\n                ExifInterface exifInterface = new ExifInterface(EXTRANAL_IMAGE_PATH);\n                StringBuilder builder = new StringBuilder();\n                final String output = \"%s=%s\";\n                try {\n                    Field field = exifInterface.getClass().getDeclaredField(\"mAttributes\");\n                    field.setAccessible(true);\n                    HashMap<String, String> attrs = (HashMap<String, String>) field.get(exifInterface);\n                    for (Map.Entry<String, String> entry : attrs.entrySet()) {\n                        builder.append(String.format(output, entry.getKey(), entry.getValue())).append(\"\\n\");\n                    }\n                } catch (NoSuchFieldException e) {\n                    e.printStackTrace();\n                } catch (IllegalAccessException e) {\n                    e.printStackTrace();\n                }\n                return builder.toString();\n            } catch (IOException e) {\n                Log.d(\"ExifViewerFragment\", \"get attributes failed\");\n                e.printStackTrace();\n            }\n            return null;\n        }\n    }\n\n    class ExifBean {\n        Bitmap bitmap;\n        String value;\n\n        public ExifBean(Bitmap bitmap, String value) {\n            this.bitmap = bitmap;\n            this.value = value;\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/FeatureActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentPagerAdapter;\nimport android.support.v4.view.ViewPager;\nimport android.support.v7.app.AppCompatActivity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.TextView;\n\npublic class FeatureActivity extends AppCompatActivity {\n    View mLeft, mRight;\n    ViewPager viewPager;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        setContentView(R.layout.feature_layout);\n        viewPager = (ViewPager) findViewById(R.id.viewpager);\n        viewPager.setAdapter(new Adapter(getSupportFragmentManager()));\n        mLeft = findViewById(R.id.iv_left);\n        mRight = findViewById(R.id.iv_right);\n        mLeft.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                viewPager.setCurrentItem(viewPager.getCurrentItem() + 1);\n            }\n        });\n        mRight.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                viewPager.setCurrentItem(viewPager.getCurrentItem() - 1);\n            }\n        });\n        viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n            @Override\n            public void onPageScrolled(int i, float v, int i1) {\n\n            }\n\n            @Override\n            public void onPageSelected(int i) {\n                mLeft.setVisibility(i == 0 ? View.GONE : View.VISIBLE);\n                mRight.setVisibility(i == 2 ? View.GONE : View.VISIBLE);\n            }\n\n            @Override\n            public void onPageScrollStateChanged(int i) {\n\n            }\n        });\n\n    }\n\n    class Adapter extends FragmentPagerAdapter {\n        public Adapter(FragmentManager fm) {\n            super(fm);\n        }\n\n        @Override\n        public Fragment getItem(int i) {\n            Fragment fragment = new FragmentItem();\n            Bundle bundle = new Bundle();\n            switch (i) {\n                case 0:\n                    bundle.putString(KEY_LABEL, getString(R.string.page_1_text));\n                    bundle.putInt(KEY_IMAGE_ID, R.drawable.page_1_image);\n                    bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_1_dark));\n                    bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_1));\n                    break;\n                case 1:\n                    bundle.putString(KEY_LABEL, getString(R.string.page_2_text));\n                    bundle.putInt(KEY_IMAGE_ID, R.drawable.page_2_image);\n                    bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_2_dark));\n                    bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_2));\n                    break;\n                case 2:\n                    bundle.putString(KEY_LABEL, getString(R.string.page_3_text));\n                    bundle.putInt(KEY_IMAGE_ID, R.drawable.page_3_image);\n                    bundle.putInt(KEY_COLOR_ABOVE, getResources().getColor(R.color.page_3_dark));\n                    bundle.putInt(KEY_COLOR_BELOW, getResources().getColor(R.color.page_3));\n                    break;\n            }\n            fragment.setArguments(bundle);\n            return fragment;\n        }\n\n        @Override\n        public int getCount() {\n            return 3;\n        }\n    }\n\n    public static final String KEY_LABEL = \"key_label\";\n    public static final String KEY_IMAGE_ID = \"key_image_id\";\n    public static final String KEY_COLOR_ABOVE = \"key_color_above\";\n    public static final String KEY_COLOR_BELOW = \"key_color_below\";\n\n    public static class FragmentItem extends Fragment {\n        public FragmentItem() {\n        }\n\n        @Nullable\n        @Override\n        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n            View view = inflater.inflate(R.layout.feature_item_layout, null);\n            String label = getArguments().getString(KEY_LABEL);\n            ((TextView) view.findViewById(R.id.tv_label)).setText(label);\n            int color1 = getArguments().getInt(KEY_COLOR_ABOVE);\n            view.findViewById(R.id.ll_above).setBackgroundColor(color1);\n            int color2 = getArguments().getInt(KEY_COLOR_BELOW);\n            view.findViewById(R.id.ll_below).setBackgroundColor(color2);\n            int image = getArguments().getInt(KEY_IMAGE_ID);\n            ((ImageView) view.findViewById(R.id.iv_image)).setImageResource(image);\n            return view;\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/FlipFragmentDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport net.avenwu.support.widget.FlipLayout;\n\n/**\n * Created by aven on 1/19/16.\n */\npublic class FlipFragmentDemo extends Fragment {\n    FlipLayout mFlipLayout;\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.flip_layout, null);\n    }\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n        mFlipLayout = (FlipLayout) view.findViewById(R.id.flip_layout);\n        mFlipLayout.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                mFlipLayout.flip();\n            }\n        });\n        mFlipLayout.setViewOrder(view.findViewById(R.id.iv_image1), view.findViewById(R.id.iv_image2));\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/GradientColorFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n/**\n * Created by chaobin on 3/6/15.\n */\npublic class GradientColorFragment extends Fragment {\n    @Override\n    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.gradient_layout, null);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/LargeHeightImageDisplayFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.content.res.AssetManager;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapFactory;\nimport android.graphics.BitmapRegionDecoder;\nimport android.graphics.Color;\nimport android.graphics.Rect;\nimport android.os.AsyncTask;\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.os.AsyncTaskCompat;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.ScrollView;\n\nimport java.io.IOException;\n\n/**\n * Created by chaobin on 3/2/15.\n */\npublic class LargeHeightImageDisplayFragment extends Fragment {\n    private static final String TAG = LargeHeightImageDisplayFragment.class.getSimpleName();\n    private ViewGroup mContainer;\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n        ScrollView scrollView = new ScrollView(getActivity());\n        scrollView.setBackgroundColor(Color.WHITE);\n        scrollView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n        LinearLayout linearLayout = new LinearLayout(getActivity());\n        linearLayout.setOrientation(LinearLayout.VERTICAL);\n        linearLayout.setLayoutParams(new ScrollView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n        mContainer = linearLayout;\n        scrollView.addView(linearLayout);\n        return scrollView;\n    }\n\n    AsyncTask<Context, Bitmap, Object> mDecodeTask;\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        mDecodeTask = new AsyncTask<Context, Bitmap, Object>() {\n            @Override\n            protected Object doInBackground(Context... params) {\n                Log.d(TAG, \"Start decode image...\");\n                BitmapRegionDecoder decoder = null;\n                try {\n                    //TODO According to api document both jpeg and png are supported, however jpeg image just failed to be decoded on this case\n                    decoder = BitmapRegionDecoder.newInstance(params[0].getAssets().open(\"image.png\", AssetManager.ACCESS_RANDOM), false);\n                    final int screenWidth = params[0].getResources().getDisplayMetrics().widthPixels;\n                    final int imageWidth = decoder.getWidth();\n                    final int imageHeight = decoder.getHeight();\n                    final int eachHeight = (int) (screenWidth * ((imageWidth + 0.5f) / screenWidth));\n                    int heightRemained = imageHeight;\n                    Rect corpRect = new Rect(0, 0, imageWidth, 0);\n                    //TODO the while case is only for test, should only load specific bitmap data when scrolled to be visible\n                    while (heightRemained > 0 && !isCancelled()) {\n                        Log.d(TAG, \"clip image\");\n                        if (heightRemained >= eachHeight) {\n                            corpRect.set(corpRect.left, corpRect.bottom, corpRect.right, corpRect.bottom + eachHeight);\n                            heightRemained -= eachHeight;\n                        } else {\n                            corpRect.set(corpRect.left, corpRect.bottom, corpRect.right, corpRect.bottom + heightRemained);\n                            heightRemained = 0;\n                        }\n                        Log.d(TAG, \"corptBitmap, \" + corpRect.toString());\n                        Bitmap corptBitmap = decoder.decodeRegion(corpRect, null);\n                        publishProgress(corptBitmap);\n                    }\n                    Log.d(TAG, \"Image decode finished\");\n                } catch (IOException e) {\n                    Log.d(TAG, \"Image decode failed\");\n                    e.printStackTrace();\n                } finally {\n                    if (decoder != null) {\n                        decoder.recycle();\n                    }\n                }\n                return null;\n            }\n\n            @Override\n            protected void onProgressUpdate(Bitmap... values) {\n                if (getActivity() != null && !isRemoving() && values[0] != null) {\n                    ImageView imageView = new ImageView(getActivity());\n                    imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);\n                    imageView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n                    imageView.setImageBitmap(values[0]);\n                    mContainer.addView(imageView);\n                }\n            }\n        };\n        AsyncTaskCompat.executeParallel(mDecodeTask, getActivity());\n    }\n\n    @Override\n    public void onDestroyView() {\n        if (mContainer != null) {\n            mContainer.removeAllViews();\n        }\n        if (mDecodeTask != null) {\n            mDecodeTask.cancel(true);\n        }\n        super.onDestroyView();\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/LinearGradientView.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.LinearGradient;\nimport android.graphics.Paint;\nimport android.graphics.Shader;\nimport android.util.AttributeSet;\nimport android.view.View;\n\n/**\n * Created by chaobin on 3/6/15.\n */\npublic class LinearGradientView extends View {\n    Paint mPaint;\n    LinearGradient mGradient;\n\n    public LinearGradientView(Context context) {\n        this(context, null);\n    }\n\n    public LinearGradientView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public LinearGradientView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        mGradient = new LinearGradient(0, 0, 500, 0, new int[]{\n                Color.RED, Color.YELLOW, Color.GREEN\n        }, null, Shader.TileMode.CLAMP);\n        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mPaint.setShader(mGradient);\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        canvas.drawRect(0, 0, 500, 500, mPaint);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/MainActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.content.Intent;\nimport android.graphics.drawable.RippleDrawable;\nimport android.os.Bundle;\nimport android.support.v4.app.DialogFragment;\nimport android.support.v4.app.Fragment;\nimport android.support.v7.app.ActionBarActivity;\nimport android.support.v7.app.AppCompatActivity;\nimport android.view.View;\nimport android.widget.Toast;\n\nimport com.avenwu.annotation.PrintMe;\n\n@PrintMe\npublic class MainActivity extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n    }\n\n    public void showShortcut(View view) {\n        startActivity(new Intent(this, ShortcutDemo.class));\n    }\n\n    @PrintMe\n    public void showDrawerFrame(View view) {\n//        Intent intent = new Intent(this, RefreshWidgetActivity.class);\n//        intent.putExtra(\"fragment\", DrawerDemoFragment.class);\n//        startActivity(intent);\n    }\n\n    @PrintMe\n    public void showRefreshLayout(View view) {\n//        Intent intent = new Intent(this, RefreshWidgetActivity.class);\n//        intent.putExtra(\"fragment\", RefreshDemoFragment.class);\n//        startActivity(intent);\n    }\n\n    public void openActivity(View view) {\n        try {\n            startActivity(new Intent(this, Class.forName((String) view.getTag())));\n        } catch (ClassNotFoundException e) {\n            error(e);\n        }\n    }\n\n    public void openFragment(View view) {\n        try {\n            getSupportFragmentManager().beginTransaction()\n                    .add(R.id.container, (Fragment) Class.forName((String) view.getTag()).newInstance(), \"fragment\")\n                    .addToBackStack(null)\n                    .commitAllowingStateLoss();\n        } catch (InstantiationException e) {\n            error(e);\n        } catch (IllegalAccessException e) {\n            error(e);\n        } catch (ClassNotFoundException e) {\n            error(e);\n        }\n    }\n\n    private void error(Exception e) {\n        e.printStackTrace();\n        Toast.makeText(this, e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/MarkdownDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;\nimport android.support.v4.app.FragmentPagerAdapter;\nimport android.support.v4.app.FragmentTransaction;\nimport android.support.v4.view.ViewPager;\nimport android.support.v7.app.ActionBar;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.webkit.WebView;\nimport android.widget.EditText;\n\nimport org.markdown4j.Markdown4jProcessor;\n\nimport java.io.IOException;\nimport java.util.Locale;\n\nimport butterknife.ButterKnife;\nimport butterknife.InjectView;\n\n\npublic class MarkdownDemo extends ActionBarActivity implements ActionBar.TabListener, Content {\n\n    SectionsPagerAdapter mSectionsPagerAdapter;\n    ViewPager mViewPager;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_markdown_demo);\n\n        // Set up the action bar.\n        final ActionBar actionBar = getSupportActionBar();\n        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n\n        // Create the adapter that will return a fragment for each of the three\n        // primary sections of the activity.\n        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());\n\n        // Set up the ViewPager with the sections adapter.\n        mViewPager = (ViewPager) findViewById(R.id.pager);\n        mViewPager.setAdapter(mSectionsPagerAdapter);\n\n        // When swiping between different sections, select the corresponding\n        // tab. We can also use ActionBar.Tab#select() to do this if we have\n        // a reference to the Tab.\n        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {\n            @Override\n            public void onPageSelected(int position) {\n                actionBar.setSelectedNavigationItem(position);\n            }\n        });\n\n        // For each of the sections in the app, add a tab to the action bar.\n        for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {\n            actionBar.addTab(\n                    actionBar.newTab()\n                            .setText(mSectionsPagerAdapter.getPageTitle(i))\n                            .setTabListener(this));\n        }\n    }\n\n\n    @Override\n    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n        mViewPager.setCurrentItem(tab.getPosition());\n    }\n\n    @Override\n    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n    }\n\n    @Override\n    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n    }\n\n    private static String makeFragmentName(int viewId, long id) {\n        return \"android:switcher:\" + viewId + \":\" + id;\n    }\n\n    @Override\n    public String getContent() {\n        Fragment fragment = getSupportFragmentManager().findFragmentByTag(makeFragmentName(mViewPager.getId(), 0));\n        if (fragment instanceof Content) {\n            return ((Content) fragment).getContent();\n        }\n        return \"\";\n    }\n\n    /**\n     * A {@link FragmentPagerAdapter} that returns a fragment corresponding to\n     * one of the sections/tabs/pages.\n     */\n    public class SectionsPagerAdapter extends FragmentPagerAdapter {\n\n        public SectionsPagerAdapter(FragmentManager fm) {\n            super(fm);\n        }\n\n        @Override\n        public Fragment getItem(int position) {\n            switch (position) {\n                case 0:\n                    return new EditFragment();\n                default:\n                    return new PreviewFragment();\n            }\n        }\n\n        @Override\n        public int getCount() {\n            return 2;\n        }\n\n        @Override\n        public CharSequence getPageTitle(int position) {\n            Locale l = Locale.getDefault();\n            switch (position) {\n                case 0:\n                    return getString(R.string.title_section1).toUpperCase(l);\n                case 1:\n                    return getString(R.string.title_section2).toUpperCase(l);\n            }\n            return null;\n        }\n    }\n\n    /**\n     * A placeholder fragment containing a simple view.\n     */\n    public static class EditFragment extends Fragment implements Content {\n        @InjectView(R.id.edt_input)\n        EditText mInputView;\n//        String TEMPLATE_DATA = \"#Hello\\nThis is simple text in format of markdown.\\n- li\\n- li\";\n        String TEMPLATE_DATA = \"# Mou\\n\" +\n        \"\\n\" +\n        \"![Mou icon](http://25.io/mou/Mou_128.png)\\n\" +\n        \"\\n\" +\n        \"## Overview\\n\" +\n        \"\\n\" +\n        \"**Mou**, the missing Markdown editor for *web developers*.\\n\" +\n        \"\\n\" +\n        \"### Syntax\\n\" +\n        \"\\n\" +\n        \"#### Strong and Emphasize \\n\" +\n        \"\\n\" +\n        \"**strong** or __strong__ ( Cmd + B )\\n\" +\n        \"\\n\" +\n        \"*emphasize* or _emphasize_ ( Cmd + I )\\n\" +\n        \"\\n\" +\n        \"**Sometimes I want a lot of text to be bold.\\n\" +\n        \"Like, seriously, a _LOT_ of text**\\n\" +\n        \"\\n\" +\n        \"#### Blockquotes\\n\" +\n        \"\\n\" +\n        \"> Right angle brackets &gt; are used for block quotes.\\n\" +\n        \"\\n\" +\n        \"#### Links and Email\\n\" +\n        \"\\n\" +\n        \"An email <example@example.com> link.\\n\" +\n        \"\\n\" +\n        \"Simple inline link <http://chenluois.com>, another inline link [Smaller](http://25.io/smaller/), one more inline link with title [Resize](http://resizesafari.com \\\"a Safari extension\\\").\\n\" +\n        \"\\n\" +\n        \"A [reference style][id] link. Input id, then anywhere in the doc, define the link with corresponding id:\\n\" +\n        \"\\n\" +\n        \"[id]: http://25.io/mou/ \\\"Markdown editor on Mac OS X\\\"\\n\" +\n        \"\\n\" +\n        \"Titles ( or called tool tips ) in the links are optional.\\n\" +\n        \"\\n\" +\n        \"#### Images\\n\" +\n        \"\\n\" +\n        \"An inline image ![Smaller icon](http://25.io/smaller/favicon.ico \\\"Title here\\\"), title is optional.\\n\" +\n        \"\\n\" +\n        \"A ![Resize icon][2] reference style image.\\n\" +\n        \"\\n\" +\n        \"[2]: http://resizesafari.com/favicon.ico \\\"Title\\\"\\n\" +\n        \"\\n\" +\n        \"#### Inline code and Block code\\n\" +\n        \"\\n\" +\n        \"Inline code are surround by `backtick` key. To create a block code:\\n\" +\n        \"\\n\" +\n        \"\\tIndent each line by at least 1 tab, or 4 spaces.\\n\" +\n        \"    var Mou = exactlyTheAppIwant; \\n\" +\n        \"\\n\" +\n        \"####  Ordered Lists\\n\" +\n        \"\\n\" +\n        \"Ordered lists are created using \\\"1.\\\" + Space:\\n\" +\n        \"\\n\" +\n        \"1. Ordered list item\\n\" +\n        \"2. Ordered list item\\n\" +\n        \"3. Ordered list item\\n\" +\n        \"\\n\" +\n        \"#### Unordered Lists\\n\" +\n        \"\\n\" +\n        \"Unordered list are created using \\\"*\\\" + Space:\\n\" +\n        \"\\n\" +\n        \"* Unordered list item\\n\" +\n        \"* Unordered list item\\n\" +\n        \"* Unordered list item \\n\" +\n        \"\\n\" +\n        \"Or using \\\"-\\\" + Space:\\n\" +\n        \"\\n\" +\n        \"- Unordered list item\\n\" +\n        \"- Unordered list item\\n\" +\n        \"- Unordered list item\\n\" +\n        \"\\n\" +\n        \"#### Hard Linebreak\\n\" +\n        \"\\n\" +\n        \"End a line with two or more spaces will create a hard linebreak, called `<br />` in HTML. ( Control + Return )  \\n\" +\n        \"Above line ended with 2 spaces.\\n\" +\n        \"\\n\" +\n        \"#### Horizontal Rules\\n\" +\n        \"\\n\" +\n        \"Three or more asterisks or dashes:\\n\" +\n        \"\\n\" +\n        \"***\\n\" +\n        \"\\n\" +\n        \"---\\n\" +\n        \"\\n\" +\n        \"- - - -\\n\" +\n        \"\\n\" +\n        \"#### Headers\\n\" +\n        \"\\n\" +\n        \"Setext-style:\\n\" +\n        \"\\n\" +\n        \"This is H1\\n\" +\n        \"==========\\n\" +\n        \"\\n\" +\n        \"This is H2\\n\" +\n        \"----------\\n\" +\n        \"\\n\" +\n        \"atx-style:\\n\" +\n        \"\\n\" +\n        \"# This is H1\\n\" +\n        \"## This is H2\\n\" +\n        \"### This is H3\\n\" +\n        \"#### This is H4\\n\" +\n        \"##### This is H5\\n\" +\n        \"###### This is H6\\n\" +\n        \"\\n\" +\n        \"\\n\" +\n        \"### Extra Syntax\\n\" +\n        \"\\n\" +\n        \"#### Footnotes\\n\" +\n        \"\\n\" +\n        \"Footnotes work mostly like reference-style links. A footnote is made of two things: a marker in the text that will become a superscript number; a footnote definition that will be placed in a list of footnotes at the end of the document. A footnote looks like this:\\n\" +\n        \"\\n\" +\n        \"That's some text with a footnote.[^1]\\n\" +\n        \"\\n\" +\n        \"[^1]: And that's the footnote.\\n\" +\n        \"\\n\" +\n        \"\\n\" +\n        \"#### Strikethrough\\n\" +\n        \"\\n\" +\n        \"Wrap with 2 tilde characters:\\n\" +\n        \"\\n\" +\n        \"~~Strikethrough~~\\n\" +\n        \"\\n\" +\n        \"\\n\" +\n        \"#### Fenced Code Blocks\\n\" +\n        \"\\n\" +\n        \"Start with a line containing 3 or more backticks, and ends with the first line with the same number of backticks:\\n\" +\n        \"\\n\" +\n        \"```\\n\" +\n        \"Fenced code blocks are like Stardard Markdown’s regular code\\n\" +\n        \"blocks, except that they’re not indented and instead rely on\\n\" +\n        \"a start and end fence lines to delimit the code block.\\n\" +\n        \"```\\n\" +\n        \"\\n\" +\n        \"\\n\" +\n        \"### Shortcuts\\n\" +\n        \"\\n\" +\n        \"#### View\\n\" +\n        \"\\n\" +\n        \"* Toggle live preview: Shift + Cmd + I\\n\" +\n        \"* Toggle Words Counter: Shift + Cmd + W\\n\" +\n        \"* Toggle Transparent: Shift + Cmd + T\\n\" +\n        \"* Toggle Floating: Shift + Cmd + F\\n\" +\n        \"* Left/Right = 1/1: Cmd + 0\\n\" +\n        \"* Left/Right = 3/1: Cmd + +\\n\" +\n        \"* Left/Right = 1/3: Cmd + -\\n\" +\n        \"* Toggle Writing orientation: Cmd + L\\n\" +\n        \"* Toggle fullscreen: Control + Cmd + F\\n\" +\n        \"\\n\" +\n        \"#### Actions\\n\" +\n        \"\\n\" +\n        \"* Copy HTML: Option + Cmd + C\\n\" +\n        \"* Strong: Select text, Cmd + B\\n\" +\n        \"* Emphasize: Select text, Cmd + I\\n\" +\n        \"* Inline Code: Select text, Cmd + K\\n\" +\n        \"* Strikethrough: Select text, Cmd + U\\n\" +\n        \"* Link: Select text, Control + Shift + L\\n\" +\n        \"* Image: Select text, Control + Shift + I\\n\" +\n        \"* Select Word: Control + Option + W\\n\" +\n        \"* Select Line: Shift + Cmd + L\\n\" +\n        \"* Select All: Cmd + A\\n\" +\n        \"* Deselect All: Cmd + D\\n\" +\n        \"* Convert to Uppercase: Select text, Control + U\\n\" +\n        \"* Convert to Lowercase: Select text, Control + Shift + U\\n\" +\n        \"* Convert to Titlecase: Select text, Control + Option + U\\n\" +\n        \"* Convert to List: Select lines, Control + L\\n\" +\n        \"* Convert to Blockquote: Select lines, Control + Q\\n\" +\n        \"* Convert to H1: Cmd + 1\\n\" +\n        \"* Convert to H2: Cmd + 2\\n\" +\n        \"* Convert to H3: Cmd + 3\\n\" +\n        \"* Convert to H4: Cmd + 4\\n\" +\n        \"* Convert to H5: Cmd + 5\\n\" +\n        \"* Convert to H6: Cmd + 6\\n\" +\n        \"* Convert Spaces to Tabs: Control + [\\n\" +\n        \"* Convert Tabs to Spaces: Control + ]\\n\" +\n        \"* Insert Current Date: Control + Shift + 1\\n\" +\n        \"* Insert Current Time: Control + Shift + 2\\n\" +\n        \"* Insert entity <: Control + Shift + ,\\n\" +\n        \"* Insert entity >: Control + Shift + .\\n\" +\n        \"* Insert entity &: Control + Shift + 7\\n\" +\n        \"* Insert entity Space: Control + Shift + Space\\n\" +\n        \"* Insert Scriptogr.am Header: Control + Shift + G\\n\" +\n        \"* Shift Line Left: Select lines, Cmd + [\\n\" +\n        \"* Shift Line Right: Select lines, Cmd + ]\\n\" +\n        \"* New Line: Cmd + Return\\n\" +\n        \"* Comment: Cmd + /\\n\" +\n        \"* Hard Linebreak: Control + Return\\n\" +\n        \"\\n\" +\n        \"#### Edit\\n\" +\n        \"\\n\" +\n        \"* Auto complete current word: Esc\\n\" +\n        \"* Find: Cmd + F\\n\" +\n        \"* Close find bar: Esc\\n\" +\n        \"\\n\" +\n        \"#### Post\\n\" +\n        \"\\n\" +\n        \"* Post on Scriptogr.am: Control + Shift + S\\n\" +\n        \"* Post on Tumblr: Control + Shift + T\\n\" +\n        \"\\n\" +\n        \"#### Export\\n\" +\n        \"\\n\" +\n        \"* Export HTML: Option + Cmd + E\\n\" +\n        \"* Export PDF:  Option + Cmd + P\\n\" +\n        \"\\n\" +\n        \"\\n\" +\n        \"### And more?\\n\" +\n        \"\\n\" +\n        \"Don't forget to check Preferences, lots of useful options are there.\\n\" +\n        \"\\n\" +\n        \"Follow [@Mou](https://twitter.com/mou) on Twitter for the latest news.\\n\" +\n        \"\\n\" +\n        \"For feedback, use the menu `Help` - `Send Feedback`\";\n\n        public EditFragment() {\n        }\n\n        @Override\n        public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                                 Bundle savedInstanceState) {\n            View rootView = inflater.inflate(R.layout.markdown_edit, container, false);\n            ButterKnife.inject(this, rootView);\n            mInputView.setText(TEMPLATE_DATA);\n            return rootView;\n        }\n\n        @Override\n        public String getContent() {\n            return mInputView.getText().toString();\n        }\n    }\n\n    public static class PreviewFragment extends Fragment {\n        private WebView mWebView;\n        private boolean mIsWebViewAvailable;\n        private Markdown4jProcessor mProcessor;\n\n        @Override\n        public View onCreateView(LayoutInflater inflater, ViewGroup container,\n                                 Bundle savedInstanceState) {\n            if (mWebView != null) {\n                mWebView.destroy();\n            }\n            mWebView = new WebView(getActivity());\n            mIsWebViewAvailable = true;\n            mProcessor = new Markdown4jProcessor();\n            return mWebView;\n        }\n\n        @Override\n        public void onPause() {\n            super.onPause();\n            mWebView.onPause();\n        }\n\n        @Override\n        public void onResume() {\n            mWebView.onResume();\n            super.onResume();\n        }\n\n        @Override\n        public void setUserVisibleHint(boolean isVisibleToUser) {\n            super.setUserVisibleHint(isVisibleToUser);\n            if (isVisibleToUser) {\n                String data = ((Content) getActivity()).getContent();\n                mWebView.loadData(renderMarkdownString(data), \"text/html\", \"UTF-8\");\n            }\n        }\n\n        String mTemplate = \"<link rel=\\\"stylesheet\\\" href=\\\"file:///android_asset/github-markdown.css\\\"/><div class=\\\"markdown-body\\\">%s</div>\";\n\n        String renderMarkdownString(String raw) {\n            try {\n                return String.format(mTemplate, mProcessor.process(raw));\n            } catch (IOException e) {\n                e.printStackTrace();\n                return String.format(mTemplate, raw);\n            }\n        }\n\n        @Override\n        public void onDestroyView() {\n            mIsWebViewAvailable = false;\n            super.onDestroyView();\n        }\n\n        @Override\n        public void onDestroy() {\n            if (mWebView != null) {\n                mWebView.destroy();\n                mWebView = null;\n            }\n            super.onDestroy();\n        }\n\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/QQDraggingCircleDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.widget.SeekBar;\n\nimport net.avenwu.support.widget.PolygonWithQuadraticBezirView;\n\nimport butterknife.ButterKnife;\nimport butterknife.InjectView;\n\n/**\n * Created by chaobin on 12/25/14.\n */\npublic class QQDraggingCircleDemo extends ActionBarActivity {\n    @InjectView(R.id.shape2)\n    PolygonWithQuadraticBezirView mShape2;\n    @InjectView(R.id.shape1)\n    PolygonWithQuadraticBezirView mShape1;\n    @InjectView(R.id.seekBarX)\n    SeekBar mSeekX;\n    @InjectView(R.id.seekBarY)\n    SeekBar mSeekY;\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.qq_dragging_circle_layout);\n        ButterKnife.inject(this);\n        mShape2.setFilled(true);\n        mSeekX.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n            @Override\n            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n                mShape1.moveHorizontal(progress / 100.0f);\n                mShape2.moveHorizontal(progress / 100.0f);\n            }\n\n            @Override\n            public void onStartTrackingTouch(SeekBar seekBar) {\n\n            }\n\n            @Override\n            public void onStopTrackingTouch(SeekBar seekBar) {\n\n            }\n        });\n        mSeekY.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n            @Override\n            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n                mShape1.moveVertical(progress / 100.0f);\n                mShape2.moveVertical(progress / 100.0f);\n            }\n\n            @Override\n            public void onStartTrackingTouch(SeekBar seekBar) {\n\n            }\n\n            @Override\n            public void onStopTrackingTouch(SeekBar seekBar) {\n\n            }\n        });\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/RefreshDemoFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.FrameLayout;\nimport android.widget.SimpleAdapter;\n\nimport net.avenwu.support.widget.RefreshLayout;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\n/**\n * Created by Chaobin Wu on 2014/10/10.\n */\npublic class RefreshDemoFragment extends Fragment {\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tRefreshLayout view = new RefreshLayout(getActivity());\n\t\tview.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n\t\tview.setBackgroundColor(getResources().getColor(android.R.color.holo_purple));\n\t\tList<Map<String, String>> data = new ArrayList<Map<String, String>>(30);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tMap<String, String> item = new HashMap<String, String>(2);\n\t\t\titem.put(\"index\", i + \"\");\n\t\t\titem.put(\"text\", \"This is content \" + i);\n\t\t\tdata.add(item);\n\t\t}\n\t\tview.setAdapter(new SimpleAdapter(getActivity(), data, android.R.layout.simple_list_item_2,\n\t\t\t\tnew String[]{\"index\", \"text\"}, new int[]{android.R.id.text1, android.R.id.text2}));\n\t\treturn view;\n\t}\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/RefreshWidgetActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v7.app.ActionBarActivity;\n\npublic class RefreshWidgetActivity extends ActionBarActivity {\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_refresh_widget);\n\t\ttry {\n\t\t\tgetSupportFragmentManager().beginTransaction()\n\t\t\t\t\t.replace(R.id.container, (Fragment) (((Class) getIntent().getSerializableExtra(\"fragment\")).newInstance()))\n\t\t\t\t\t.commitAllowingStateLoss();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/ScaleSubActivity.java",
    "content": "/*\n * Copyright (C) 2013 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\npackage com.avenwu.deepinandroid;\n\nimport android.app.Activity;\nimport android.os.Bundle;\nimport android.view.ViewTreeObserver;\nimport android.view.animation.DecelerateInterpolator;\nimport android.widget.ImageView;\n\n/**\n * See WindowAnimations.java for comments on the overall application.\n * <p/>\n * This is a sub-activity which provides custom animation behavior. When this activity\n * is exited, the user will see the behavior specified in the overridePendingTransition() call.\n */\npublic class ScaleSubActivity extends Activity {\n    int leftDeta, topDeta;\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_window_scale_sub);\n        final int left = getIntent().getIntExtra(\"left\", 0);\n        final int top = getIntent().getIntExtra(\"top\", 0);\n        final int width = getIntent().getIntExtra(\"width\", 0);\n        final int height = getIntent().getIntExtra(\"height\", 0);\n        final ImageView imageView = (ImageView) findViewById(R.id.image);\n        ViewTreeObserver observer = imageView.getViewTreeObserver();\n        observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {\n            @Override\n            public boolean onPreDraw() {\n                int[] position = new int[2];\n                imageView.getLocationOnScreen(position);\n                imageView.getViewTreeObserver().removeOnPreDrawListener(this);\n                leftDeta = left - position[0];\n                topDeta = top - position[1];\n                float widthScale = (float) width / imageView.getWidth();\n                float heightScale = (float) height / imageView.getHeight();\n                imageView.setPivotX(0);\n                imageView.setPivotY(0);\n                imageView.setTranslationX(leftDeta);\n                imageView.setTranslationY(topDeta);\n                imageView.setScaleX(widthScale);\n                imageView.setScaleY(heightScale);\n                imageView.animate().setDuration(5000).setInterpolator(new DecelerateInterpolator())\n                        .translationX(0).translationX(0).scaleX(1).scaleY(1).start();\n                return true;\n            }\n        });\n    }\n\n    @Override\n    public void finish() {\n        super.finish();\n        overridePendingTransition(0, 0);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/ShortcutDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.graphics.drawable.AnimationDrawable;\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.Menu;\nimport android.view.MenuItem;\nimport android.view.View;\nimport android.widget.ImageView;\n\n\npublic class ShortcutDemo extends ActionBarActivity {\n\tpublic static String INSTALL_SHORTCUT = \"com.android.launcher.action.INSTALL_SHORTCUT\";\n\tpublic static String UNINSTALL_SHORTCUT = \"com.android.launcher.action.UNINSTALL_SHORTCUT\";\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.shorcut_layout);\n\t\tfindViewById(R.id.imageView).setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAnimationDrawable animationDrawable = (AnimationDrawable) ((ImageView) v).getDrawable();\n\t\t\t\tanimationDrawable.start();\n\t\t\t}\n\t\t});\n\t\tfindViewById(R.id.btn_install).setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tshortcutAdd(\"测试\", count++, ShortcutDemo.class);\n\t\t\t}\n\t\t});\n\t\tfindViewById(R.id.btn_uninstall).setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tshortcutDel(\"测试\", ShortcutDemo.class);\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic static int count = 0;\n\n\tprivate void shortcutAdd(String name, int number, Class<? extends Activity> cls) {\n\t\t// Intent to be send, when shortcut is pressed by user (\"launched\")\n\t\tIntent shortcutIntent = new Intent(getApplicationContext(), cls);\n\t\tshortcutIntent.setAction(Intent.ACTION_MAIN);\n\t\tshortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n\n\t\t// Create bitmap with number in it -> very default. You probably want to give it a more stylish look\n\t\tBitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(0xFF808080); // gray\n\t\tpaint.setTextAlign(Paint.Align.CENTER);\n\t\tpaint.setTextSize(50);\n\t\tnew Canvas(bitmap).drawText(\"\" + number, 50, 50, paint);\n\n\t\t// Decorate the shortcut\n\t\tIntent addIntent = new Intent();\n\t\taddIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);\n\t\taddIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);\n\t\taddIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap);\n\n\t\t// Inform launcher to create shortcut\n\t\taddIntent.setAction(INSTALL_SHORTCUT);\n\t\tgetApplicationContext().sendBroadcast(addIntent);\n\t}\n\n\tprivate void shortcutDel(String name, Class<? extends Activity> cls) {\n\t\t// Intent to be send, when shortcut is pressed by user (\"launched\")\n\t\tIntent shortcutIntent = new Intent(getApplicationContext(), cls);\n\t\tshortcutIntent.setAction(Intent.ACTION_MAIN);\n\t\tshortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n\n\t\t// Decorate the shortcut\n\t\tIntent delIntent = new Intent();\n\t\tdelIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);\n\t\tdelIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);\n\n\t\t// Inform launcher to remove shortcut\n\t\tdelIntent.setAction(UNINSTALL_SHORTCUT);\n\t\tgetApplicationContext().sendBroadcast(delIntent);\n\t}\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/SlideMenuFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.widget.DrawerLayout;\nimport android.support.v4.widget.SlidingPaneLayout;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport net.avenwu.support.widget.DrawerFrameV2;\n\n/**\n * Created by chaobin on 2/16/15.\n */\npublic class SlideMenuFragment extends Fragment {\n    @Override\n    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n        DrawerFrameV2 view =\n                (DrawerFrameV2) inflater.inflate(R.layout.slide_layout, null);\n        return view;\n//        DrawerLayout\n//        SlidingPaneLayout\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/SlidePanelDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.ListView;\n\n/**\n * Created by chaobin on 2/18/15.\n */\npublic class SlidePanelDemo extends ActionBarActivity {\n    int[] mColors = {Color.RED, Color.BLUE, Color.CYAN, Color.GREEN, Color.YELLOW};\n    ViewGroup mContentView;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.slidepanel_layout);\n        mContentView = (ViewGroup) findViewById(R.id.fl_container);\n//        ListView menuList = (ListView) findViewById(R.id.lv_memu_list);\n//        menuList.setAdapter(new ArrayAdapter<String>(\n//                this,\n//                android.R.layout.simple_list_item_1,\n//                android.R.id.text1,\n//                new String[]{\"RED\", \"BLUE\", \"CYAN\", \"GREEN\", \"YELLOW\"}\n//        ));\n//        menuList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n//            @Override\n//            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n//                mContentView.setBackgroundColor(mColors[position]);\n//            }\n//        });\n        mContentView.setBackgroundColor(0xff03a9f4);\n\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/StackZFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.view.ViewCompat;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\n\n/**\n * Created by aven on 1/27/16.\n */\npublic class StackZFragment extends Fragment {\n\n    @Nullable\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        return inflater.inflate(R.layout.fragment_stack_z, null);\n    }\n\n    @Override\n    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n        super.onViewCreated(view, savedInstanceState);\n        int count = ((ViewGroup) view).getChildCount();\n        for (int i = 0; i < count; i++) {\n            View card = ((ViewGroup) view).getChildAt(i);\n            ViewCompat.setTranslationZ(card, (i + 1) * 8 * getResources().getDisplayMetrics().density);\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/StyledRadioButtonDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.widget.LinearLayout;\n\nimport net.avenwu.support.widget.FlatTabGroup;\n\nimport butterknife.InjectView;\n\n/**\n * Created by chaobin on 2/4/15.\n */\npublic class StyledRadioButtonDemo extends ActionBarActivity {\n    @InjectView(R.id.ll_container)\n    LinearLayout mContainer;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.styled_radio_button);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/TagInputDemo.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.os.Bundle;\nimport android.support.v7.app.ActionBarActivity;\nimport android.view.View;\nimport android.widget.TextView;\n\nimport net.avenwu.support.widget.TagFlowLayout;\n\n/**\n * Created by chaobin on 1/14/15.\n */\npublic class TagInputDemo extends ActionBarActivity {\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n//        setContentView(new TagInputLayout(this));\n        setContentView(R.layout.test_tag_input_layout);\n//        ((TagInputLayout) findViewById(R.id.tags)).setDecorator(new TagInputLayout.SimpleDecorator(this) {\n//            Drawable[] mDrawable = new Drawable[]{\n//                    getResources().getDrawable(R.drawable.b1),\n//                    getResources().getDrawable(R.drawable.b2)\n//            };\n//\n//            @Override\n//            public Drawable[] getBackgroundDrawable() {\n//                return mDrawable;\n//            }\n//        });\n    }\n\n    public void onGetTags(View view) {\n        TextView tv = (TextView) findViewById(R.id.tv_tags);\n        tv.setText(\"All tags:\\n\");\n        for (CharSequence tag : ((TagFlowLayout) findViewById(R.id.tags)).getTagArray()) {\n            tv.append(tag);\n            tv.append(\"  \");\n        }\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/TypefaceActivity.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.content.Context;\nimport android.graphics.Typeface;\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\nimport android.widget.TextView;\n\nimport net.avenwu.support.util.TypefaceContextWrapper;\nimport net.avenwu.support.util.TypefaceUtils;\n\npublic class TypefaceActivity extends AppCompatActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_typeface);\n        //1. 直接设置TextView setTypeface\n        final Typeface typeface = Typeface.createFromAsset(getAssets(), \"fonts/Oswald-Stencbab\" +\n            \".ttf\");\n        TextView textView = (TextView) findViewById(R.id.tv_label_font);\n        textView.setTypeface(typeface);\n\n        //2. 缓存/复用Typeface，避免内存浪费\n        TypefaceUtils.setTypeface(this, (TextView) findViewById(R.id.tv_label_font_2),\n            \"fonts/Roboto-Bold.ttf\");\n\n        //3. 自定义LayoutInflator\n\n\n    }\n\n    @Override\n    protected void attachBaseContext(Context newBase) {\n        super.attachBaseContext(TypefaceContextWrapper.wrap(newBase));\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/WindowAnimationFragment.java",
    "content": "package com.avenwu.deepinandroid;\n\nimport android.app.ActivityOptions;\nimport android.content.Intent;\nimport android.graphics.BitmapFactory;\nimport android.graphics.drawable.BitmapDrawable;\nimport android.graphics.drawable.TransitionDrawable;\nimport android.os.Build;\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\n\n/**\n * Created by aven on 4/26/15.\n */\npublic class WindowAnimationFragment extends Fragment {\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.animation_layout, null);\n        view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n                    // Using the AnimatedSubActivity also allows us to animate exiting that\n                    // activity - see that activity for details\n                    Intent subActivity = new Intent(v.getContext(),\n                            AnimatedSubActivity.class);\n                    // The enter/exit animations for the two activities are specified by xml resources\n                    Bundle translateBundle =\n                            ActivityOptions.makeCustomAnimation(v.getContext(),\n                                    R.anim.slide_in_left, R.anim.slide_out_left).toBundle();\n                    getActivity().startActivity(subActivity, translateBundle);\n                } else {\n                    getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);\n                    getActivity().startActivity(new Intent(v.getContext(),\n                            AnimatedSubActivity.class));\n                }\n\n            }\n        });\n        view.findViewById(R.id.image).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent subActivity = new Intent(v.getContext(),\n                        AnimatedSubActivity.class);\n//                Bundle scaleBundle = ActivityOptions.makeScaleUpAnimation(\n//                        v, 0, 0, v.getWidth(), v.getHeight()).toBundle();\n//                getActivity().startActivity(subActivity, scaleBundle);\n                v.setDrawingCacheEnabled(true);\n                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n                    getActivity().startActivity(subActivity, ActivityOptions.makeThumbnailScaleUpAnimation(v, v.getDrawingCache(), 0, 0).toBundle());\n                } else {\n                    getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left);\n                    getActivity().startActivity(new Intent(v.getContext(),\n                            AnimatedSubActivity.class));\n                }\n            }\n        });\n        return view;\n    }\n\n    @Override\n    public void onViewCreated(View view, Bundle savedInstanceState) {\n        ImageView imageView = (ImageView) view.findViewById(R.id.image2);\n        BitmapDrawable[] bitmapDrawable = new BitmapDrawable[2];\n        bitmapDrawable[0] = new BitmapDrawable(getResources(), BitmapFactory.decodeResource(getResources(), R.drawable.image1));\n        bitmapDrawable[1] = new BitmapDrawable(getResources(), BitmapFactory.decodeResource(getResources(), R.drawable.image2));\n        final TransitionDrawable drawable = new TransitionDrawable(bitmapDrawable);\n        imageView.setImageDrawable(drawable);\n        imageView.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                if (currentDrawable == 0) {\n                    drawable.startTransition(500);\n                    currentDrawable = 1;\n                } else {\n                    drawable.reverseTransition(500);\n                    currentDrawable = 0;\n                }\n            }\n        });\n        view.findViewById(R.id.image3).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                int[] position = new int[2];\n                v.getLocationOnScreen(position);\n                startActivity(new Intent(getActivity(), ScaleSubActivity.class)\n                        .putExtra(\"left\", position[0]).putExtra(\"top\", position[1])\n                        .putExtra(\"width\", v.getWidth()).putExtra(\"height\", v.getHeight()));\n            }\n        });\n    }\n\n    int currentDrawable = 0;\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Bus.java",
    "content": "package com.avenwu.deepinandroid.eventbus;\n\nimport android.os.Looper;\n\nimport java.lang.reflect.Method;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.concurrent.CopyOnWriteArrayList;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic class Bus {\n\n    static volatile Bus sInstance;\n\n    Finder mFinder;\n\n    Map<Class<?>, CopyOnWriteArrayList<Subscriber>> mSubscriberMap;\n\n    PostHandler mPostHandler;\n\n    private Bus() {\n        mFinder = new NameBasedFinder();\n        mSubscriberMap = new HashMap<>();\n        mPostHandler = new PostHandler(Looper.getMainLooper(), this);\n    }\n\n    public static Bus getDefault() {\n        if (sInstance == null) {\n            synchronized (Bus.class) {\n                if (sInstance == null) {\n                    sInstance = new Bus();\n                }\n            }\n        }\n        return sInstance;\n    }\n\n    public void register(Object subscriber) {\n        List<Method> methods = mFinder.findSubscriber(subscriber.getClass());\n        if (methods == null || methods.size() < 1) {\n            return;\n        }\n        CopyOnWriteArrayList<Subscriber> subscribers = mSubscriberMap.get(subscriber.getClass());\n        if (subscribers == null) {\n            subscribers = new CopyOnWriteArrayList<>();\n            mSubscriberMap.put(methods.get(0).getParameterTypes()[0], subscribers);\n        }\n        for (Method method : methods) {\n            Subscriber newSubscriber = new Subscriber(subscriber, method);\n            subscribers.add(newSubscriber);\n        }\n    }\n\n    public void unregister(Object subscriber) {\n        CopyOnWriteArrayList<Subscriber> subscribers = mSubscriberMap.remove(subscriber.getClass());\n        if (subscribers != null) {\n            for (Subscriber s : subscribers) {\n                s.mMethod = null;\n                s.mSubscriber = null;\n            }\n        }\n    }\n\n    public void post(Object event) {\n        //TODO post with handler\n        mPostHandler.enqueue(event);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Finder.java",
    "content": "package com.avenwu.deepinandroid.eventbus;\n\nimport java.lang.reflect.Method;\nimport java.util.List;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic interface Finder {\n\n    List<Method> findSubscriber(Class<?> subscriber);\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/NameBasedFinder.java",
    "content": "package com.avenwu.deepinandroid.eventbus;\n\nimport android.util.Log;\n\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic class NameBasedFinder implements Finder {\n\n    @Override\n    public List<Method> findSubscriber(Class<?> subscriber) {\n        List<Method> methods = new ArrayList<>();\n        for (Method method : subscriber.getDeclaredMethods()) {\n            if (method.getName().startsWith(\"onEvent\") && method.getParameterTypes().length == 1) {\n                methods.add(method);\n                Log.d(\"findSubscriber\", \"add method:\" + method.getName());\n            }\n        }\n        return methods;\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/PostHandler.java",
    "content": "package com.avenwu.deepinandroid.eventbus;\n\n\nimport android.os.Handler;\nimport android.os.Looper;\nimport android.os.Message;\n\nimport java.util.concurrent.CopyOnWriteArrayList;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic class PostHandler extends Handler {\n\n    final Bus mBus;\n\n    public PostHandler(Looper looper, Bus bus) {\n        super(looper);\n        mBus = bus;\n    }\n\n    @Override\n    public void handleMessage(Message msg) {\n        CopyOnWriteArrayList<Subscriber> subscribers = mBus.mSubscriberMap.get(msg.obj.getClass());\n        for (Subscriber subscriber : subscribers) {\n            subscriber.mMethod.setAccessible(true);\n            try {\n                subscriber.mMethod.invoke(subscriber.mSubscriber, msg.obj);\n            } catch (Exception e) {\n                e.printStackTrace();\n            }\n        }\n    }\n\n    void enqueue(Object event) {\n        Message message = obtainMessage();\n        message.obj = event;\n        sendMessage(message);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/eventbus/Subscriber.java",
    "content": "package com.avenwu.deepinandroid.eventbus;\n\nimport java.lang.reflect.Method;\n\n/**\n * Created by chaobin on 1/29/15.\n */\npublic class Subscriber {\n\n    Object mSubscriber;\n\n    Method mMethod;\n\n    Class<?> mEventType;\n\n    public Subscriber(Object subscriber, Method method) {\n        mSubscriber = subscriber;\n        mMethod = method;\n        mEventType = method.getParameterTypes()[0];\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHider.java",
    "content": "package com.avenwu.deepinandroid.util;\n\nimport android.app.Activity;\nimport android.os.Build;\nimport android.view.View;\n\n/**\n * A utility class that helps with showing and hiding system UI such as the\n * status bar and navigation/system bar. This class uses backward-compatibility\n * techniques described in <a href=\n * \"http://developer.android.com/training/backward-compatible-ui/index.html\">\n * Creating Backward-Compatible UIs</a> to ensure that devices running any\n * version of Android OS are supported. More specifically, there are separate\n * implementations of this abstract class: for newer devices,\n * {@link #getInstance} will return a {@link SystemUiHiderHoneycomb} instance,\n * while on older devices {@link #getInstance} will return a\n * {@link SystemUiHiderBase} instance.\n * <p/>\n * For more on system bars, see <a href=\n * \"http://developer.android.com/design/get-started/ui-overview.html#system-bars\"\n * > System Bars</a>.\n *\n * @see android.view.View#setSystemUiVisibility(int)\n * @see android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN\n */\npublic abstract class SystemUiHider {\n    /**\n     * When this flag is set, the\n     * {@link android.view.WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN}\n     * flag will be set on older devices, making the status bar \"float\" on top\n     * of the activity layout. This is most useful when there are no controls at\n     * the top of the activity layout.\n     * <p/>\n     * This flag isn't used on newer devices because the <a\n     * href=\"http://developer.android.com/design/patterns/actionbar.html\">action\n     * bar</a>, the most important structural element of an Android app, should\n     * be visible and not obscured by the system UI.\n     */\n    public static final int FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES = 0x1;\n\n    /**\n     * When this flag is set, {@link #show()} and {@link #hide()} will toggle\n     * the visibility of the status bar. If there is a navigation bar, show and\n     * hide will toggle low profile mode.\n     */\n    public static final int FLAG_FULLSCREEN = 0x2;\n\n    /**\n     * When this flag is set, {@link #show()} and {@link #hide()} will toggle\n     * the visibility of the navigation bar, if it's present on the device and\n     * the device allows hiding it. In cases where the navigation bar is present\n     * but cannot be hidden, show and hide will toggle low profile mode.\n     */\n    public static final int FLAG_HIDE_NAVIGATION = FLAG_FULLSCREEN | 0x4;\n\n    /**\n     * The activity associated with this UI hider object.\n     */\n    protected Activity mActivity;\n\n    /**\n     * The view on which {@link View#setSystemUiVisibility(int)} will be called.\n     */\n    protected View mAnchorView;\n\n    /**\n     * The current UI hider flags.\n     *\n     * @see #FLAG_FULLSCREEN\n     * @see #FLAG_HIDE_NAVIGATION\n     * @see #FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES\n     */\n    protected int mFlags;\n\n    /**\n     * The current visibility callback.\n     */\n    protected OnVisibilityChangeListener mOnVisibilityChangeListener = sDummyListener;\n\n    /**\n     * Creates and returns an instance of {@link SystemUiHider} that is\n     * appropriate for this device. The object will be either a\n     * {@link SystemUiHiderBase} or {@link SystemUiHiderHoneycomb} depending on\n     * the device.\n     *\n     * @param activity   The activity whose window's system UI should be\n     *                   controlled by this class.\n     * @param anchorView The view on which\n     *                   {@link View#setSystemUiVisibility(int)} will be called.\n     * @param flags      Either 0 or any combination of {@link #FLAG_FULLSCREEN},\n     *                   {@link #FLAG_HIDE_NAVIGATION}, and\n     *                   {@link #FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES}.\n     */\n    public static SystemUiHider getInstance(Activity activity, View anchorView, int flags) {\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            return new SystemUiHiderHoneycomb(activity, anchorView, flags);\n        } else {\n            return new SystemUiHiderBase(activity, anchorView, flags);\n        }\n    }\n\n    protected SystemUiHider(Activity activity, View anchorView, int flags) {\n        mActivity = activity;\n        mAnchorView = anchorView;\n        mFlags = flags;\n    }\n\n    /**\n     * Sets up the system UI hider. Should be called from\n     * {@link Activity#onCreate}.\n     */\n    public abstract void setup();\n\n    /**\n     * Returns whether or not the system UI is visible.\n     */\n    public abstract boolean isVisible();\n\n    /**\n     * Hide the system UI.\n     */\n    public abstract void hide();\n\n    /**\n     * Show the system UI.\n     */\n    public abstract void show();\n\n    /**\n     * Toggle the visibility of the system UI.\n     */\n    public void toggle() {\n        if (isVisible()) {\n            hide();\n        } else {\n            show();\n        }\n    }\n\n    /**\n     * Registers a callback, to be triggered when the system UI visibility\n     * changes.\n     */\n    public void setOnVisibilityChangeListener(OnVisibilityChangeListener listener) {\n        if (listener == null) {\n            listener = sDummyListener;\n        }\n\n        mOnVisibilityChangeListener = listener;\n    }\n\n    /**\n     * A dummy no-op callback for use when there is no other listener set.\n     */\n    private static OnVisibilityChangeListener sDummyListener = new OnVisibilityChangeListener() {\n        @Override\n        public void onVisibilityChange(boolean visible) {\n        }\n    };\n\n    /**\n     * A callback interface used to listen for system UI visibility changes.\n     */\n    public interface OnVisibilityChangeListener {\n        /**\n         * Called when the system UI visibility has changed.\n         *\n         * @param visible True if the system UI is visible.\n         */\n        public void onVisibilityChange(boolean visible);\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderBase.java",
    "content": "package com.avenwu.deepinandroid.util;\n\nimport android.app.Activity;\nimport android.view.View;\nimport android.view.WindowManager;\n\n/**\n * A base implementation of {@link SystemUiHider}. Uses APIs available in all\n * API levels to show and hide the status bar.\n */\npublic class SystemUiHiderBase extends SystemUiHider {\n    /**\n     * Whether or not the system UI is currently visible. This is a cached value\n     * from calls to {@link #hide()} and {@link #show()}.\n     */\n    private boolean mVisible = true;\n\n    /**\n     * Constructor not intended to be called by clients. Use\n     * {@link SystemUiHider#getInstance} to obtain an instance.\n     */\n    protected SystemUiHiderBase(Activity activity, View anchorView, int flags) {\n        super(activity, anchorView, flags);\n    }\n\n    @Override\n    public void setup() {\n        if ((mFlags & FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES) == 0) {\n            mActivity.getWindow().setFlags(\n                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN\n                            | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,\n                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN\n                            | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);\n        }\n    }\n\n    @Override\n    public boolean isVisible() {\n        return mVisible;\n    }\n\n    @Override\n    public void hide() {\n        if ((mFlags & FLAG_FULLSCREEN) != 0) {\n            mActivity.getWindow().setFlags(\n                    WindowManager.LayoutParams.FLAG_FULLSCREEN,\n                    WindowManager.LayoutParams.FLAG_FULLSCREEN);\n        }\n        mOnVisibilityChangeListener.onVisibilityChange(false);\n        mVisible = false;\n    }\n\n    @Override\n    public void show() {\n        if ((mFlags & FLAG_FULLSCREEN) != 0) {\n            mActivity.getWindow().setFlags(\n                    0,\n                    WindowManager.LayoutParams.FLAG_FULLSCREEN);\n        }\n        mOnVisibilityChangeListener.onVisibilityChange(true);\n        mVisible = true;\n    }\n}\n"
  },
  {
    "path": "sample/src/main/java/com/avenwu/deepinandroid/util/SystemUiHiderHoneycomb.java",
    "content": "package com.avenwu.deepinandroid.util;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.os.Build;\nimport android.view.View;\nimport android.view.WindowManager;\n\n/**\n * An API 11+ implementation of {@link SystemUiHider}. Uses APIs available in\n * Honeycomb and later (specifically {@link View#setSystemUiVisibility(int)}) to\n * show and hide the system UI.\n */\n@TargetApi(Build.VERSION_CODES.HONEYCOMB)\npublic class SystemUiHiderHoneycomb extends SystemUiHiderBase {\n    /**\n     * Flags for {@link View#setSystemUiVisibility(int)} to use when showing the\n     * system UI.\n     */\n    private int mShowFlags;\n\n    /**\n     * Flags for {@link View#setSystemUiVisibility(int)} to use when hiding the\n     * system UI.\n     */\n    private int mHideFlags;\n\n    /**\n     * Flags to test against the first parameter in\n     * {@link android.view.View.OnSystemUiVisibilityChangeListener#onSystemUiVisibilityChange(int)}\n     * to determine the system UI visibility state.\n     */\n    private int mTestFlags;\n\n    /**\n     * Whether or not the system UI is currently visible. This is cached from\n     * {@link android.view.View.OnSystemUiVisibilityChangeListener}.\n     */\n    private boolean mVisible = true;\n\n    /**\n     * Constructor not intended to be called by clients. Use\n     * {@link SystemUiHider#getInstance} to obtain an instance.\n     */\n    protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {\n        super(activity, anchorView, flags);\n\n        mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;\n        mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;\n        mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;\n\n        if ((mFlags & FLAG_FULLSCREEN) != 0) {\n            // If the client requested fullscreen, add flags relevant to hiding\n            // the status bar. Note that some of these constants are new as of\n            // API 16 (Jelly Bean). It is safe to use them, as they are inlined\n            // at compile-time and do nothing on pre-Jelly Bean devices.\n            mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;\n            mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n                    | View.SYSTEM_UI_FLAG_FULLSCREEN;\n        }\n\n        if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {\n            // If the client requested hiding navigation, add relevant flags.\n            mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;\n            mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n                    | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n            mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n        }\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void setup() {\n        mAnchorView.setOnSystemUiVisibilityChangeListener(mSystemUiVisibilityChangeListener);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void hide() {\n        mAnchorView.setSystemUiVisibility(mHideFlags);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public void show() {\n        mAnchorView.setSystemUiVisibility(mShowFlags);\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    public boolean isVisible() {\n        return mVisible;\n    }\n\n    private View.OnSystemUiVisibilityChangeListener mSystemUiVisibilityChangeListener\n            = new View.OnSystemUiVisibilityChangeListener() {\n        @Override\n        public void onSystemUiVisibilityChange(int vis) {\n            // Test against mTestFlags to see if the system UI is visible.\n            if ((vis & mTestFlags) != 0) {\n                if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n                    // Pre-Jelly Bean, we must manually hide the action bar\n                    // and use the old window flags API.\n                    mActivity.getActionBar().hide();\n                    mActivity.getWindow().setFlags(\n                            WindowManager.LayoutParams.FLAG_FULLSCREEN,\n                            WindowManager.LayoutParams.FLAG_FULLSCREEN);\n                }\n\n                // Trigger the registered listener and cache the visibility\n                // state.\n                mOnVisibilityChangeListener.onVisibilityChange(false);\n                mVisible = false;\n\n            } else {\n                mAnchorView.setSystemUiVisibility(mShowFlags);\n                if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n                    // Pre-Jelly Bean, we must manually show the action bar\n                    // and use the old window flags API.\n                    mActivity.getActionBar().show();\n                    mActivity.getWindow().setFlags(\n                            0,\n                            WindowManager.LayoutParams.FLAG_FULLSCREEN);\n                }\n\n                // Trigger the registered listener and cache the visibility\n                // state.\n                mOnVisibilityChangeListener.onVisibilityChange(true);\n                mVisible = true;\n            }\n        }\n    };\n}\n"
  },
  {
    "path": "sample/src/main/res/anim/scale_up_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<scale xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"-100%p\" android:toXDelta=\"0\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/anim/scale_up_rightt.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<scale xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"-100%p\" android:toXDelta=\"0\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/anim/slide_in_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"100%p\" android:toXDelta=\"0\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/anim/slide_in_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"-50%p\" android:toXDelta=\"0\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/anim/slide_out_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"0\" android:toXDelta=\"-50%p\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/anim/slide_out_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2013 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<translate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:fromXDelta=\"0\" android:toXDelta=\"100%p\"\n        android:duration=\"500\" />\n"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@android:color/holo_red_dark\" android:state_checked=\"true\" />\n    <item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color_blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n<item android:color=\"@color/tab_blue\" android:state_checked=\"true\" />\n<item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color_green.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/tab_green\" android:state_checked=\"true\" />\n    <item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color_light_blue.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/tab_light_blue\" android:state_checked=\"true\" />\n    <item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color_orange.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/tab_orange\" android:state_checked=\"true\" />\n    <item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/color/radio_button_color_purple.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"@color/tab_purple\" android:state_checked=\"true\" />\n    <item android:color=\"@android:color/white\" />\n</selector>"
  },
  {
    "path": "sample/src/main/res/drawable/animate_drawable.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<animation-list xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:oneshot=\"false\">\n    <item android:drawable=\"@drawable/sun\" android:duration=\"200\" />\n    <item android:drawable=\"@drawable/rain\" android:duration=\"200\" />\n    <item android:drawable=\"@drawable/snow\" android:duration=\"200\" />\n    <item android:drawable=\"@drawable/heavy_cloud\" android:duration=\"200\" />\n</animation-list>"
  },
  {
    "path": "sample/src/main/res/drawable/flat_round_shape_left.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_checked=\"true\">\n        <shape android:shape=\"rectangle\">\n            <corners android:topLeftRadius=\"5dp\" android:bottomLeftRadius=\"5dp\" />\n            <solid android:color=\"@android:color/white\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\" />\n        </shape>\n    </item>\n    <item>\n        <shape android:shape=\"rectangle\">\n            <corners android:topLeftRadius=\"5dp\" android:bottomLeftRadius=\"5dp\" />\n            <solid android:color=\"@android:color/transparent\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\" />\n        </shape>\n    </item>\n\n</selector>"
  },
  {
    "path": "sample/src/main/res/drawable/flat_round_shape_middle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_checked=\"true\">\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@android:color/white\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\"/>\n        </shape>\n    </item>\n    <item>\n        <shape android:shape=\"rectangle\">\n            <solid android:color=\"@android:color/transparent\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\"/>\n        </shape>\n    </item>\n\n</selector>"
  },
  {
    "path": "sample/src/main/res/drawable/flat_round_shape_right.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:state_checked=\"true\">\n        <shape android:shape=\"rectangle\">\n            <corners android:topRightRadius=\"5dp\" android:bottomRightRadius=\"5dp\" />\n            <solid android:color=\"@android:color/white\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\" />\n        </shape>\n    </item>\n    <item>\n        <shape android:shape=\"rectangle\">\n            <corners android:topRightRadius=\"5dp\" android:bottomRightRadius=\"5dp\" />\n            <solid android:color=\"@android:color/transparent\" />\n            <stroke android:color=\"@android:color/white\" android:width=\"1dp\" />\n        </shape>\n    </item>\n\n</selector>"
  },
  {
    "path": "sample/src/main/res/layout/activity_main.xml",
    "content": "<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\">\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n            android:paddingRight=\"@dimen/activity_horizontal_margin\"\n            android:paddingTop=\"@dimen/activity_vertical_margin\"\n            android:paddingBottom=\"@dimen/activity_vertical_margin\">\n\n            <!--<Button-->\n            <!--style=\"@style/DemoItemStyle\"-->\n            <!--android:text=\"@string/install_shortcut\"-->\n            <!--android:onClick=\"showShortcut\"/>-->\n\n            <!--<Button-->\n            <!--style=\"@style/DemoItemStyle\"-->\n            <!--android:text=\"@string/widget_drawerframe\"-->\n            <!--android:onClick=\"openFragment\" -->\n            <!--android:tag=\"com.avenwu.deepinandroid.DrawerDemoFragment\" />-->\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/widget_refresh_layout\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.RefreshDemoFragment\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/quadratic_bezier_polygon\"\n                android:tag=\"com.avenwu.deepinandroid.QQDraggingCircleDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/tag_input\"\n                android:tag=\"com.avenwu.deepinandroid.TagInputDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/busevent\"\n                android:tag=\"com.avenwu.deepinandroid.BusEventDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/colorfilter\"\n                android:tag=\"com.avenwu.deepinandroid.ColorFilterDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/title_activity_markdown_demo\"\n                android:tag=\"com.avenwu.deepinandroid.MarkdownDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"@string/flat_button\"\n                android:tag=\"com.avenwu.deepinandroid.StyledRadioButtonDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:onClick=\"openFragment\"\n                android:text=\"@string/slide_menu\"\n                android:tag=\"com.avenwu.deepinandroid.SlideMenuFragment\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"自定义ResideMenu\"\n                android:tag=\"com.avenwu.deepinandroid.SlidePanelDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"长图分页加载\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.LargeHeightImageDisplayFragment\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Exif信息\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.ExifViewerFragment\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Gradient渐变\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.GradientColorFragment\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"呼吸灯\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.BreathLightViewDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"BitmapShader\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.BitmapShaderFragment\" />\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"WindowAnimation\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.WindowAnimationFragment\"\n                android:visibility=\"gone\"/>\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Custom Tab\"\n                android:tag=\"com.avenwu.deepinandroid.CustomTabActivity\"\n                android:visibility=\"gone\"/>\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"功能引导页\"\n                android:tag=\"com.avenwu.deepinandroid.FeatureActivity\"/>\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"字体设置\"\n                android:tag=\"com.avenwu.deepinandroid.TypefaceActivity\"/>\n            <!--<Button-->\n                <!--style=\"@style/DemoItemStyle\"-->\n                <!--android:text=\"Progress\"-->\n                <!--android:tag=\"com.avenwu.deepinandroid.CustomProgressActivity\"/>-->\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"ExTextView\"\n                android:tag=\"com.avenwu.deepinandroid.CustomTextViewActivity\"/>\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"拉幕弹层\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.CurtainLayoutFragment\" />\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Flip 3D\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.FlipFragmentDemo\" />\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Matrix + Camera\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.CameraMatrixFragmentDemo\" />\n\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"Translation Z\"\n                android:onClick=\"openFragment\"\n                android:tag=\"com.avenwu.deepinandroid.StackZFragment\" />\n            <Button\n                style=\"@style/DemoItemStyle\"\n                android:text=\"自定义Drawable\"\n                android:tag=\"com.avenwu.deepinandroid.CustomDrawableDemo\" />\n        </LinearLayout>\n    </ScrollView>\n\n    <FrameLayout\n        android:id=\"@+id/container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" />\n</FrameLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_markdown_demo.xml",
    "content": "<android.support.v4.view.ViewPager xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\" android:id=\"@+id/pager\"\n    android:layout_width=\"match_parent\" android:layout_height=\"match_parent\"\n    tools:context=\"com.avenwu.deepinandroid.MarkdownDemo\" />\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_my.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                xmlns:tools=\"http://schemas.android.com/tools\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n                android:paddingRight=\"@dimen/activity_horizontal_margin\"\n                android:paddingTop=\"@dimen/activity_vertical_margin\"\n                android:paddingBottom=\"@dimen/activity_vertical_margin\"\n                tools:context=\".MyActivity\">\n\n    <net.avenwu.support.widget.DrawerFrame\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:id=\"@+id/view\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"\n        android:visibility=\"visible\"/>\n\n    <Switch\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Toggle Menu\"\n        android:id=\"@+id/switch1\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:textOn=\"Open\"\n        android:textOff=\"Closed\"/>\n\n\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_progress_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <net.avenwu.support.widget.ExProgressView2\n        android:layout_width=\"300dp\"\n        android:layout_height=\"300dp\"\n        android:layout_centerInParent=\"true\" />\n</RelativeLayout>"
  },
  {
    "path": "sample/src/main/res/layout/activity_refresh_widget.xml",
    "content": "<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/container\"\n    android:layout_height=\"match_parent\"\n    android:layout_width=\"match_parent\"/>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_typeface.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              xmlns:tools=\"http://schemas.android.com/tools\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:orientation=\"vertical\"\n              android:paddingBottom=\"@dimen/activity_vertical_margin\"\n              android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n              android:paddingRight=\"@dimen/activity_horizontal_margin\"\n              android:paddingTop=\"@dimen/activity_vertical_margin\"\n              tools:context=\"com.avenwu.deepinandroid.TypefaceActivity\">\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"24sp\"\n        android:text=\"@string/hello_world\"/>\n\n    <TextView\n        android:id=\"@+id/tv_label_font\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"24sp\"\n        android:text=\"1. Text in Oswald-Stencbab set by setTypeface\"/>\n\n    <TextView\n        android:id=\"@+id/tv_label_font_2\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"24sp\"\n        android:text=\"2. Text in Roboto-Bold set by utils\"/>\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textSize=\"24sp\"\n        android:text=\"3. Text in RobotoCondensed-Regular set by custom LayoutInflator\"/>\n\n</LinearLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_window_anim_sub.xml",
    "content": "<!-- Copyright (C) 2013 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<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:background=\"#888\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" >\n\n    <ImageView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:src=\"@drawable/image2\"/>\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_window_scale_sub.xml",
    "content": "<!-- Copyright (C) 2013 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<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:background=\"#888\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" >\n\n    <ImageView\n        android:id=\"@+id/image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:src=\"@drawable/image1\"\n        android:layout_centerInParent=\"true\"\n        android:scaleType=\"centerInside\"/>\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/animation_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:orientation=\"vertical\">\n\n    <Button\n        android:id=\"@+id/button\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"侧滑进入\" />\n\n    <ImageView\n        android:id=\"@+id/image\"\n        android:layout_width=\"50dp\"\n        android:layout_height=\"80dp\"\n        android:src=\"@drawable/image2\" />\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:text=\"Click to transit the image drawable\" />\n\n    <ImageView\n        android:id=\"@+id/image2\"\n        android:layout_width=\"50dp\"\n        android:layout_height=\"80dp\" />\n    <ImageView\n        android:id=\"@+id/image3\"\n        android:layout_width=\"50dp\"\n        android:layout_height=\"80dp\"\n        android:src=\"@drawable/image1\"\n        android:layout_gravity=\"right\"/>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/bitmap_shader_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"horizontal\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:gravity=\"center\">\n\n    <ImageView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"wrap_content\"\n        android:src=\"@drawable/image1\"\n        android:scaleType=\"centerCrop\" />\n\n    <net.avenwu.support.widget.ShaderImageView\n        android:layout_width=\"200dp\"\n        android:layout_height=\"wrap_content\"\n        android:src=\"@drawable/image1\"\n        android:scaleType=\"centerCrop\" />\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/breath_light_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"呼吸灯\"\n        android:textAppearance=\"?android:textAppearanceLarge\"\n        android:layout_margin=\"16dp\"/>\n\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/camera_matrix_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:clickable=\"true\"\n    android:background=\"#fff\">\n\n    <net.avenwu.support.widget.MatrixFrameLayout\n        android:layout_width=\"300dp\"\n        android:layout_height=\"450dp\"\n        android:layout_gravity=\"center\"\n        android:layout_marginTop=\"30dp\">\n\n        <ImageView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:src=\"@drawable/image2\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:text=\"This is label\"\n            android:textSize=\"40sp\" />\n    </net.avenwu.support.widget.MatrixFrameLayout>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/chat_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"50dp\"\n    android:background=\"#fff000\"\n    android:orientation=\"horizontal\"\n    android:weightSum=\"6\">\n\n    <ImageView\n        android:layout_width=\"30dp\"\n        android:layout_height=\"30dp\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginLeft=\"5dp\"\n        android:layout_marginRight=\"5dp\"\n        android:src=\"@drawable/ic_launcher\"/>\n\n    <TextView\n        android:layout_width=\"0dp\"\n        android:layout_height=\"30dp\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_weight=\"5\"\n        android:background=\"#ff00ff\"/>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/curtain_demo.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@android:color/black\"\n    android:orientation=\"vertical\">\n    <net.avenwu.support.widget.CurtainLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"></net.avenwu.support.widget.CurtainLayout>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/custom_drawable_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    tools:context=\".CustomDrawableDemo\">\n\n    <TextView\n        android:id=\"@+id/label\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:gravity=\"center\"\n        android:text=\"Hello World!\" />\n\n    <TextView\n        android:id=\"@+id/label2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:layout_below=\"@+id/label\"\n        android:layout_marginTop=\"20dp\"\n        android:gravity=\"center\"\n        android:text=\"Hello World!\" />\n\n    <TextView\n        android:id=\"@+id/label3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:layout_below=\"@+id/label2\"\n        android:layout_marginTop=\"20dp\"\n        android:gravity=\"center\"\n        android:text=\"Hello World!\" />\n\n    <RadioGroup\n        android:id=\"@+id/container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:layout_below=\"@+id/label3\"\n        android:layout_marginTop=\"10dp\"\n        android:orientation=\"horizontal\">\n\n        <RadioButton\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_weight=\"1\" />\n\n        <RadioButton\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_weight=\"1\" />\n\n        <RadioButton\n            android:layout_width=\"0dp\"\n            android:layout_height=\"match_parent\"\n            android:layout_weight=\"1\" />\n    </RadioGroup>\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/custom_tab_activity.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    android:id=\"@+id/container\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <net.avenwu.support.widget.SimpleTabLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"/>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <android.support.v4.app.FragmentTabHost\n            android:id=\"@android:id/tabhost\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:orientation=\"vertical\">\n\n                <FrameLayout\n                    android:id=\"@android:id/tabcontent\"\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"0dp\"\n                    android:layout_weight=\"1\"/>\n\n                <TabWidget\n                    android:id=\"@android:id/tabs\"\n                    android:layout_width=\"fill_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_gravity=\"bottom\"\n                    android:divider=\"@null\"/>\n\n            </LinearLayout>\n        </android.support.v4.app.FragmentTabHost>\n    </LinearLayout>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/eventbus_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:padding=\"@dimen/activity_horizontal_margin\">\n\n\n    <Button\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/click_send_message\"\n        android:onClick=\"onSendClick\" />\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/exif_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_height=\"wrap_content\"\n    android:layout_width=\"match_parent\"\n    android:background=\"#fff\">\n\n    <LinearLayout\n        android:orientation=\"vertical\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\">\n\n        <net.avenwu.support.widget.FlatTabGroup\n            android:id=\"@+id/tabs\"\n            android:layout_width=\"match_parent\"\n            app:tab_items=\"@array/exif_tab\"\n            android:layout_height=\"40dp\"\n            app:tab_border_width=\"1dp\"\n            app:tab_border_color=\"@color/tab_green\"\n            app:tab_radius=\"5dp\"\n            app:tab_textSize=\"16sp\"\n            app:tab_textColor=\"@color/tab_orange\"\n            android:paddingTop=\"5dp\"\n            android:paddingBottom=\"5dp\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textAppearance=\"?android:textAppearanceLarge\"\n            android:text=\"Exif info\" />\n\n        <TextView\n            android:id=\"@+id/text\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n\n        <ImageView\n            android:id=\"@+id/image\"\n            android:layout_width=\"300dp\"\n            android:layout_height=\"300dp\"\n            android:scaleType=\"centerInside\"\n            android:layout_gravity=\"center_horizontal\"\n            android:layout_margin=\"16dp\" />\n\n\n    </LinearLayout>\n</ScrollView>\n"
  },
  {
    "path": "sample/src/main/res/layout/feature_item_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:orientation=\"vertical\">\n\n    <RelativeLayout\n        android:id=\"@+id/ll_above\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1\"\n        android:background=\"@color/page_1_dark\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n        <ImageView\n            android:id=\"@+id/iv_image\"\n            android:layout_width=\"300dp\"\n            android:layout_height=\"300dp\"\n            android:layout_alignParentBottom=\"true\"\n            android:scaleType=\"fitEnd\"\n            android:src=\"@drawable/page_1_image\"/>\n    </RelativeLayout>\n\n    <RelativeLayout\n        android:id=\"@+id/ll_below\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_weight=\"1.3\"\n        android:background=\"@color/page_1\"\n        android:gravity=\"center_horizontal\">\n\n        <ImageView\n            android:layout_width=\"40dp\"\n            android:layout_height=\"40dp\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_marginTop=\"20dp\"\n            android:src=\"@drawable/bt_ic_reminder_white_24\"/>\n\n        <TextView\n            android:id=\"@+id/tv_label\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerInParent=\"true\"\n            android:gravity=\"center\"\n            android:text=\"@string/page_1_text\"\n            android:textAppearance=\"?android:textAppearanceMedium\"\n            android:textColor=\"#ffffff\"/>\n    </RelativeLayout>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/feature_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n             android:layout_width=\"match_parent\"\n             android:layout_height=\"match_parent\"\n             android:orientation=\"vertical\">\n\n    <android.support.v4.view.ViewPager\n        android:id=\"@+id/viewpager\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/>\n\n    <RelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:layout_gravity=\"bottom\">\n\n        <ImageView\n            android:id=\"@+id/iv_left\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:scaleType=\"centerInside\"\n            android:src=\"@drawable/ic_left_arrow\"/>\n\n        <ImageView\n            android:id=\"@+id/iv_right\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:layout_alignParentRight=\"true\"\n            android:rotation=\"180\"\n            android:scaleType=\"centerInside\"\n            android:src=\"@drawable/ic_left_arrow\"/>\n    </RelativeLayout>\n</FrameLayout>"
  },
  {
    "path": "sample/src/main/res/layout/filter_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:orientation=\"vertical\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"16dp\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center_vertical\"\n            android:background=\"@android:color/white\"\n            android:padding=\"8dp\">\n\n            <TextView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:textAppearance=\"?android:textAppearanceMedium\"\n                android:text=\"PorterDuff\"\n                android:textStyle=\"bold\" />\n\n            <Spinner\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/spinner\"\n                android:layout_marginLeft=\"10dp\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center_vertical\"\n            android:layout_marginTop=\"10dp\"\n            android:background=\"@android:color/white\"\n            android:padding=\"8dp\">\n\n            <TextView\n                android:layout_width=\"70dp\"\n                android:layout_height=\"wrap_content\"\n                android:textAppearance=\"?android:textAppearanceMedium\"\n                android:text=\"SRC\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"40dp\"\n                android:src=\"@drawable/ic_launcher\"\n                android:layout_marginLeft=\"10dp\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center_vertical\"\n            android:layout_marginTop=\"10dp\"\n            android:background=\"@android:color/white\"\n            android:padding=\"8dp\">\n\n            <TextView\n                android:layout_width=\"70dp\"\n                android:layout_height=\"wrap_content\"\n                android:textAppearance=\"?android:textAppearanceMedium\"\n                android:text=\"PRE\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:id=\"@+id/iv_preview\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"40dp\"\n                android:src=\"@drawable/ic_launcher\"\n                android:layout_marginLeft=\"10dp\" />\n\n        </LinearLayout>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:background=\"#99000000\"\n            android:layout_marginTop=\"10dp\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"What can PorterDuff do?\"\n            android:layout_marginTop=\"10dp\"/>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:layout_marginTop=\"10dp\">\n\n            <ImageView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:src=\"@drawable/ic_watch\" />\n\n            <ImageView\n                android:id=\"@+id/iv_image\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:src=\"@drawable/ic_watch\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:layout_marginTop=\"10dp\">\n\n            <FrameLayout\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\">\n\n                <ImageView\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:src=\"@drawable/ic_watch\" />\n\n                <View\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\"\n                    android:background=\"#99000000\" />\n            </FrameLayout>\n\n            <net.avenwu.support.widget.DimImageView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:src=\"@drawable/ic_watch\" />\n        </LinearLayout>\n    </LinearLayout>\n</ScrollView>"
  },
  {
    "path": "sample/src/main/res/layout/flip_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <net.avenwu.support.widget.FlipLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:id=\"@+id/flip_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <ImageView\n            android:id=\"@+id/iv_image1\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:scaleType=\"centerCrop\"\n            android:src=\"@drawable/image1\" />\n\n        <ImageView\n            android:id=\"@+id/iv_image2\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:scaleType=\"centerCrop\"\n            android:src=\"@drawable/image2\" />\n    </net.avenwu.support.widget.FlipLayout>\n</FrameLayout>"
  },
  {
    "path": "sample/src/main/res/layout/fragment_stack_z.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.percent.PercentFrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:clickable=\"true\">\n\n    <TextView\n        android:id=\"@+id/tv_card_1\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#009688\"\n        android:gravity=\"center\"\n        android:text=\"Card Label\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"24sp\"\n        app:layout_heightPercent=\"40%\"\n        app:layout_marginLeftPercent=\"5%\"\n        app:layout_marginTopPercent=\"10%\"\n        app:layout_widthPercent=\"90%\" />\n\n    <TextView\n        android:id=\"@+id/tv_card_2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#4CAF50\"\n        android:gravity=\"center\"\n        android:text=\"Card Label\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"24sp\"\n        app:layout_heightPercent=\"40%\"\n        app:layout_marginLeftPercent=\"5%\"\n        app:layout_marginTopPercent=\"25%\"\n        app:layout_widthPercent=\"90%\" />\n\n    <TextView\n        android:id=\"@+id/tv_card_3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#8BC34A\"\n        android:gravity=\"center\"\n        android:text=\"Card Label\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"24sp\"\n        app:layout_heightPercent=\"40%\"\n        app:layout_marginLeftPercent=\"5%\"\n        app:layout_marginTopPercent=\"40%\"\n        app:layout_widthPercent=\"90%\" />\n\n    <TextView\n        android:id=\"@+id/tv_card_4\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"#CDDC39\"\n        android:gravity=\"center\"\n        android:text=\"Card Label\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"24sp\"\n        app:layout_heightPercent=\"40%\"\n        app:layout_marginLeftPercent=\"5%\"\n        app:layout_marginTopPercent=\"55%\"\n        app:layout_widthPercent=\"90%\" />\n</android.support.percent.PercentFrameLayout>"
  },
  {
    "path": "sample/src/main/res/layout/fragment_tab_host.xml",
    "content": "<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#eaecee\"\n    android:gravity=\"center_horizontal\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:id=\"@+id/text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_vertical|center_horizontal\"\n        android:text=\"@string/hello_world\"\n        android:textAppearance=\"?android:attr/textAppearanceMedium\"/>\n\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/fragment_tab_item.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:layout_width=\"fill_parent\"\n              android:layout_height=\"fill_parent\"\n              android:orientation=\"vertical\">\n\n    <ImageView\n        android:id=\"@+id/imageView\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_centerHorizontal=\"true\"\n        android:layout_gravity=\"center_horizontal\"/>\n\n    <TextView\n        android:id=\"@+id/textView\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical|center_horizontal\"/>\n\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/gradient_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\">\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"LinearGradient\"\n        android:textAppearance=\"?android:textAppearanceLarge\"\n        android:layout_margin=\"16dp\" />\n\n    <com.avenwu.deepinandroid.LinearGradientView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"16dp\" />\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/markdown_edit.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\"\n    tools:context=\"com.avenwu.deepinandroid.MarkdownDemo.EditFragment\">\n\n    <TextView\n        android:id=\"@+id/section_label\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n\n    <EditText\n        android:id=\"@+id/edt_input\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"top\" />\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/qq_dragging_circle_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:orientation=\"vertical\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\">\n\n    <net.avenwu.support.widget.PolygonWithQuadraticBezirView\n        android:id=\"@+id/shape1\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"200dp\"/>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"#ff222222\"/>\n\n    <net.avenwu.support.widget.PolygonWithQuadraticBezirView\n        android:id=\"@+id/shape2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"200dp\"/>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Move Horizontal\"\n        android:paddingLeft=\"15dp\"\n        android:id=\"@+id/labelX\"/>\n\n    <SeekBar\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/seekBarX\"\n        android:max=\"100\"\n        android:progress=\"50\"/>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Move Vertical\"\n        android:paddingLeft=\"15dp\"\n        android:id=\"@+id/labelY\"/>\n\n    <SeekBar\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/seekBarY\"\n        android:max=\"100\"\n        android:progress=\"50\"/>\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/ripple_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#fff\"\n    android:clickable=\"false\">\n\n    <net.avenwu.support.widget.BreathingLayout\n        android:id=\"@+id/custom\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"300dp\"\n        app:_autoStart=\"true\"\n        app:_rippleEndRadius=\"100dp\"\n        app:_rippleStartRadius=\"20dp\"\n        app:_rippleColor=\"@color/tab_orange\">\n\n        <Button\n            android:id=\"@+id/btnPlay\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Click to Play animation\"\n            android:layout_gravity=\"bottom\"\n            android:layout_margin=\"16dp\"\n            android:visibility=\"gone\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"└(^o^)┘\"\n            android:textStyle=\"bold\"\n            android:textAppearance=\"?android:textAppearanceMedium\"\n            android:layout_gravity=\"center\"\n            android:textColor=\"#fff\"/>\n    </net.avenwu.support.widget.BreathingLayout>\n\n    <net.avenwu.support.widget.BreathingLayout\n        android:layout_width=\"450dp\"\n        android:layout_height=\"100dp\"\n        app:_rippleEndRadius=\"50dp\"\n        app:_rippleTime=\"2000\" />\n\n    <net.avenwu.support.widget.BreathingLayout\n        android:layout_width=\"100dp\"\n        android:layout_height=\"250dp\"\n        app:_rippleColor=\"@color/tab_green\"\n        app:_rippleStartRadius=\"30dp\"\n        app:_rippleTime=\"1500\"/>\n\n    <net.avenwu.support.widget.BreathingLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"500dp\"\n        app:_rippleColor=\"@color/tab_purple\" />\n</RelativeLayout>"
  },
  {
    "path": "sample/src/main/res/layout/shorcut_layout.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\" android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" android:paddingLeft=\"@dimen/activity_horizontal_margin\"\n    android:paddingRight=\"@dimen/activity_horizontal_margin\"\n    android:paddingTop=\"@dimen/activity_vertical_margin\"\n    android:paddingBottom=\"@dimen/activity_vertical_margin\" tools:context=\".MainActivity\">\n\n    <TextView android:text=\"@string/hello_world\" android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n\n    <ImageView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/imageView\"\n        android:layout_centerVertical=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:src=\"@drawable/animate_drawable\"/>\n\n    <Button\n        style=\"?android:attr/buttonStyleSmall\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Install\"\n        android:id=\"@+id/btn_install\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_alignParentStart=\"true\"/>\n\n    <Button\n        style=\"?android:attr/buttonStyleSmall\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Uninstall\"\n        android:id=\"@+id/btn_uninstall\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentEnd=\"true\"/>\n\n</RelativeLayout>\n"
  },
  {
    "path": "sample/src/main/res/layout/slide_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<net.avenwu.support.widget.DrawerFrameV2 xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <FrameLayout\n        android:id=\"@id/main\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:background=\"@android:color/holo_orange_dark\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:text=\"Content\" />\n    </FrameLayout>\n\n    <LinearLayout\n        android:id=\"@id/menu\"\n        android:layout_width=\"200dp\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        android:background=\"@android:color/holo_green_dark\">\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Menu 1\"\n            android:textStyle=\"bold\"\n            android:textColor=\"@android:color/white\"\n            android:textAppearance=\"?android:textAppearanceMedium\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Menu 2\"\n            android:textStyle=\"bold\"\n            android:textColor=\"@android:color/white\"\n            android:textAppearance=\"?android:textAppearanceMedium\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Menu 3\"\n            android:textStyle=\"bold\"\n            android:textColor=\"@android:color/white\"\n            android:textAppearance=\"?android:textAppearanceMedium\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Menu 4\"\n            android:textStyle=\"bold\"\n            android:textColor=\"@android:color/white\"\n            android:textAppearance=\"?android:textAppearanceMedium\" />\n    </LinearLayout>\n\n</net.avenwu.support.widget.DrawerFrameV2>"
  },
  {
    "path": "sample/src/main/res/layout/slidepanel_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<net.avenwu.support.widget.CustomSlidePanelLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@drawable/skin_drawer_bg_l\">\n\n    <!--<ListView-->\n    <!--android:id=\"@+id/lv_memu_list\"-->\n    <!--android:layout_width=\"260dp\"-->\n    <!--android:layout_height=\"match_parent\"-->\n    <!--android:background=\"@null\" />-->\n    <FrameLayout\n        android:layout_width=\"270dp\"\n        android:layout_height=\"match_parent\">\n\n        <ImageView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"center\"\n            android:src=\"@drawable/skin_drawer_l\" />\n    </FrameLayout>\n\n    <FrameLayout\n        android:id=\"@+id/fl_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:text=\"Container to fill content\"\n            android:textStyle=\"bold\"\n            android:textAppearance=\"?android:textAppearanceLarge\" />\n    </FrameLayout>\n</net.avenwu.support.widget.CustomSlidePanelLayout>"
  },
  {
    "path": "sample/src/main/res/layout/styled_radio_button.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        android:orientation=\"vertical\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:id=\"@+id/ll_container\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:orientation=\"vertical\"\n            android:background=\"#ffcc0000\">\n\n            <TextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"RadioGroup with custom style\"\n                android:textColor=\"@android:color/white\"\n                android:layout_marginTop=\"10dp\"\n                android:layout_marginBottom=\"10dp\" />\n\n            <RadioGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"48dp\"\n                android:orientation=\"horizontal\"\n                android:gravity=\"center_vertical\">\n\n                <RadioButton\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"A\"\n                    android:id=\"@+id/radioButton\"\n                    style=\"@style/FlatRadioButtonStyle\"\n                    android:background=\"@drawable/flat_round_shape_left\" />\n\n                <RadioButton\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"B\"\n                    android:id=\"@+id/radioButton2\"\n                    android:checked=\"true\"\n                    style=\"@style/FlatRadioButtonStyle\"\n                    android:background=\"@drawable/flat_round_shape_middle\" />\n\n                <RadioButton\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:text=\"C\"\n                    android:id=\"@+id/radioButton3\"\n                    style=\"@style/FlatRadioButtonStyle\"\n                    android:background=\"@drawable/flat_round_shape_right\" />\n            </RadioGroup>\n\n            <TextView\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"Custom FlatTabGroup extend RadioGroup\"\n                android:textColor=\"@android:color/white\"\n                android:layout_marginTop=\"10dp\" />\n\n        </LinearLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"#ffcc0000\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"@color/tab_orange\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color_orange\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"@color/tab_purple\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color_purple\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"@color/tab_blue\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color_blue\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"@color/tab_light_blue\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color_light_blue\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"20dp\"\n            android:background=\"@color/tab_green\">\n\n            <net.avenwu.support.widget.FlatTabGroup\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"40dp\"\n                app:tab_border_width=\"1dp\"\n                app:tab_border_color=\"@android:color/white\"\n                app:tab_items=\"@array/demo_array\"\n                app:tab_radius=\"5dp\"\n                app:tab_textSize=\"16sp\"\n                app:tab_textColor=\"@color/radio_button_color_green\"\n                android:paddingTop=\"5dp\"\n                android:paddingBottom=\"5dp\" />\n\n        </FrameLayout>\n\n    </LinearLayout>\n</ScrollView>"
  },
  {
    "path": "sample/src/main/res/layout/tag_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"wrap_content\"\n    android:gravity=\"center_vertical\"\n    android:textSize=\"6sp\"\n    android:layout_height=\"50dp\"\n    >\n\n</TextView>"
  },
  {
    "path": "sample/src/main/res/layout/test_tag_input_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <Button\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/get_tags\"\n        android:onClick=\"onGetTags\" />\n\n    <TextView\n        android:id=\"@+id/tv_tags\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\" />\n\n    <!--<ScrollView-->\n        <!--android:layout_width=\"match_parent\"-->\n        <!--android:layout_height=\"match_parent\">-->\n\n        <net.avenwu.support.widget.TagFlowLayout\n            android:id=\"@+id/tags\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"8dp\" />\n    <!--</ScrollView>-->\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/layout/textview_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#f5f5f5\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@android:color/white\"\n        android:padding=\"10dp\"\n        android:text=\"@string/sample_text\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"14sp\"/>\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"30dp\"\n        android:gravity=\"center\"\n        android:text=\"====   我是分割线   =====\"\n        android:textColor=\"@android:color/black\"/>\n\n    <net.avenwu.support.widget.ExTextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@android:color/white\"\n        android:maxLines=\"2\"\n        android:padding=\"10dp\"\n        android:text=\"@string/sample_text\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"14sp\"\n        app:expand_collapse_default=\"true\"\n        app:expand_indicator=\"@drawable/ic_arrow\"\n        app:expand_style=\"end\"/>\n\n\n    <net.avenwu.support.widget.ExTextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:background=\"@android:color/white\"\n        android:lineSpacingMultiplier=\"1.2\"\n        android:maxLines=\"2\"\n        android:padding=\"10dp\"\n        android:text=\"@string/sample_text\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"14sp\"\n        app:expand_collapse_default=\"true\"\n        app:expand_indicator=\"@drawable/ic_arrow\"\n        app:expand_style=\"right\"/>\n\n</LinearLayout>"
  },
  {
    "path": "sample/src/main/res/menu/markdown_menu.xml",
    "content": "<menu 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    tools:context=\"com.avenwu.deepinandroid.MarkdownDemo\">\n    <item android:id=\"@+id/action_settings\" android:title=\"@string/action_settings\"\n        android:orderInCategory=\"100\" app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "sample/src/main/res/menu/menu_main.xml",
    "content": "<menu 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\" tools:context=\".MainActivity\">\n    <item android:id=\"@+id/action_settings\" android:title=\"@string/action_settings\"\n        android:orderInCategory=\"100\" app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "sample/src/main/res/menu/menu_typeface.xml",
    "content": "<menu 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      tools:context=\"com.avenwu.deepinandroid.TypefaceActivity\">\n    <item android:id=\"@+id/action_settings\"\n          android:title=\"@string/action_settings\"\n          android:orderInCategory=\"100\"\n          app:showAsAction=\"never\"/>\n</menu>\n"
  },
  {
    "path": "sample/src/main/res/values/arrays.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"porter_duff_array\">\n        <item>CLEAR</item>\n        <item>SRC</item>\n        <item>DST</item>\n        <item>SRC_OVER</item>\n        <item>DST_OVER</item>\n        <item>SRC_IN</item>\n        <item>DST_IN</item>\n        <item>SRC_OUT</item>\n        <item>DST_OUT</item>\n        <item>SRC_ATOP</item>\n        <item>DST_ATOP</item>\n        <item>XOR</item>\n        <item>DARKEN</item>\n        <item>LIGHTEN</item>\n        <item>MULTIPLY</item>\n        <item>SCREEN</item>\n        <item>ADD</item>\n        <item>OVERLAY</item>\n    </string-array>\n    <string-array name=\"demo_array\">\n        <item>A</item>\n        <item>B</item>\n        <item>C</item>\n    </string-array>\n    <string-array name=\"exif_tab\">\n        <item>Image on sdcard</item>\n        <item>Image inside assets</item>\n    </string-array>\n</resources>"
  },
  {
    "path": "sample/src/main/res/values/attrs.xml",
    "content": "<resources>\n\n    <!-- Declare custom theme attributes that allow changing which styles are\n         used for button bars depending on the API level.\n         ?android:attr/buttonBarStyle is new as of API 11 so this is\n         necessary to support previous API levels. -->\n    <declare-styleable name=\"ButtonBarContainerTheme\">\n        <attr name=\"metaButtonBarStyle\" format=\"reference\" />\n        <attr name=\"metaButtonBarButtonStyle\" format=\"reference\" />\n    </declare-styleable>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"tab_blue\">#283593</color>\n    <color name=\"tab_light_blue\">#03a9f4</color>\n    <color name=\"tab_purple\">#9c27b0</color>\n    <color name=\"tab_green\">#056f00</color>\n    <color name=\"tab_orange\">#ff9800</color>\n    <color name=\"page_1\">#7A5BBD</color>\n    <color name=\"page_1_dark\">#624998</color>\n    <color name=\"page_2\">#4388F0</color>\n    <color name=\"page_2_dark\">#346CBE</color>\n    <color name=\"page_3\">#7BB248</color>\n    <color name=\"page_3_dark\">#628F38</color>\n\n    <color name=\"black_overlay\">#66000000</color>\n\n</resources>"
  },
  {
    "path": "sample/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal_margin\">16dp</dimen>\n    <dimen name=\"activity_vertical_margin\">16dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <string name=\"app_name\">深入理解Android</string>\n    <string name=\"hello_world\">Hello world!</string>\n    <string name=\"action_settings\">Settings</string>\n    <string name=\"install_shortcut\">Shortcut install/uninstall</string>\n    <string name=\"widget_drawerframe\">Widget DrawerFrame</string>\n    <string name=\"widget_refresh_layout\">Widget RefreshLayout</string>\n    <string name=\"quadratic_bezier_polygon\">Quadratic Bezier Polygon</string>\n    <string name=\"tag_input\">Input Tag EditView</string>\n    <string name=\"get_tags\">Get Tags</string>\n    <string name=\"busevent\">Custom BusEvent</string>\n    <string name=\"click_send_message\">Click to send message</string>\n    <string name=\"colorfilter\">ColorFilter</string>\n    <string name=\"title_activity_markdown_demo\">Markdown</string>\n    <string name=\"flat_button\">FlatButton</string>\n    <string name=\"slide_menu\">Slide Menu</string>\n\n\n    <string name=\"title_section1\">Edit</string>\n    <string name=\"title_section2\">Preview</string>\n    <string name=\"tab_1\">Home</string>\n    <string name=\"tab_2\">Hot</string>\n    <string name=\"tab_3\">Activity</string>\n    <string name=\"tab_4\">About</string>\n\n    <string name=\"title_activity_feature\">FeatureActivity</string>\n    <string name=\"dummy_button\">Dummy Button</string>\n    <string name=\"dummy_content\">DUMMY\\nCONTENT</string>\n    <string name=\"title_activity_typeface\">TypefaceActivity</string>\n    <string name=\"sample_text_digt\">219473892740218937498127472349823178461982376401234632,1874632781964923817649237816498723164982371649782364897231</string>\n    <string name=\"sample_text_eng\">ABCDKJBJCSABCJKABSCKJABCKJASBCKJABSCJKASBBBBBBBACBKJVKGVGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHSACASCASCASC</string>\n    <string name=\"sample_text\">作为中国IT职业在线教育第一品牌 , 极客学院（隶属于北京优亿致远无线技术有限公司）始终致力于“让学习更有效”, 帮助IT从业者高效提升职业技能。极客学院坚持以“最快”的更新速度提供“最新”的课程 , 让IT从业者更有效地学习，让每个人都能通过极客学院享受高质量的职业教育。极客学院推出了中国第一个 FlappyBird、Swift、Apple Watch等相关课程 , 几乎垄断了所有最新的技术和最热的应用课程的首发。</string>\n    <string name=\"sample_text_2\">12345678dslkhcjsdklvhdsgvhjkdsgjvlhdsjkvhlsdkgvlsdkgvlsdgvdshhcdks,\n        。，12345678，12345cdjscjdschjkdgscqy8678，12345678，12345678123456781234567812345678，12345678，1234567812345678</string>\n</resources>\n"
  },
  {
    "path": "sample/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    </style>\n\n    <style name=\"StatusTheme\" parent=\"android:Theme.Holo.NoActionBar.TranslucentDecor\">\n        <item name=\"android:windowBackground\">@android:color/holo_green_dark</item>\n    </style>\n\n    <style name=\"DemoItemStyle\">\n        <item name=\"android:layout_width\">match_parent</item>\n        <item name=\"android:layout_height\">wrap_content</item>\n        <item name=\"android:layout_gravity\">center_horizontal</item>\n        <item name=\"android:onClick\">openActivity</item>\n    </style>\n\n    <style name=\"FlatRadioButtonStyle\">\n        <item name=\"android:layout_weight\">1</item>\n        <item name=\"android:button\">@null</item>\n        <item name=\"android:gravity\">center</item>\n        <item name=\"android:textAppearance\">?android:textAppearanceMedium</item>\n        <item name=\"android:textColor\">@color/radio_button_color</item>\n        <item name=\"android:padding\">5dp</item>\n    </style>\n    <style name=\"Transparent\">\n        <item name=\"android:windowNoTitle\">true</item>\n        <item name=\"android:windowBackground\">@color/transparent</item>\n        <item name=\"android:windowIsTranslucent\">true</item>\n    </style>\n\n    <style name=\"FullscreenTheme\" parent=\"Theme.AppCompat.NoActionBar\">\n        <item name=\"android:windowContentOverlay\">@null</item>\n        <item name=\"android:windowBackground\">@null</item>\n        <item name=\"metaButtonBarStyle\">@style/ButtonBar</item>\n        <item name=\"metaButtonBarButtonStyle\">@style/ButtonBarButton</item>\n    </style>\n\n    <!-- Backward-compatible version of ?android:attr/buttonBarStyle -->\n    <style name=\"ButtonBar\">\n        <item name=\"android:paddingLeft\">2dp</item>\n        <item name=\"android:paddingTop\">5dp</item>\n        <item name=\"android:paddingRight\">2dp</item>\n        <item name=\"android:paddingBottom\">0dp</item>\n        <item name=\"android:background\">@android:drawable/bottom_bar</item>\n    </style>\n\n    <!-- Backward-compatible version of ?android:attr/buttonBarButtonStyle -->\n    <style name=\"ButtonBarButton\"/>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values-v11/styles.xml",
    "content": "<resources>\n\n    <style name=\"FullscreenTheme\" parent=\"Theme.AppCompat.NoActionBar\">\n        <item name=\"android:actionBarStyle\">@style/FullscreenActionBarStyle</item>\n        <item name=\"android:windowActionBarOverlay\">true</item>\n        <item name=\"android:windowBackground\">@null</item>\n        <item name=\"metaButtonBarStyle\">?android:attr/buttonBarStyle</item>\n        <item name=\"metaButtonBarButtonStyle\">?android:attr/buttonBarButtonStyle</item>\n    </style>\n\n    <style name=\"FullscreenActionBarStyle\" parent=\"android:Widget.Holo.ActionBar\">\n        <item name=\"android:background\">@color/black_overlay</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values-zh/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n    <string name=\"app_name\">Android深入解析</string>\n    <string name=\"hello_world\">Hello world!</string>\n    <string name=\"action_settings\">设置</string>\n    <string name=\"install_shortcut\">安装、卸载快捷方式</string>\n    <string name=\"widget_drawerframe\">侧滑控件</string>\n    <string name=\"widget_refresh_layout\">下拉控件</string>\n    <string name=\"quadratic_bezier_polygon\">二次贝塞尔曲线</string>\n    <string name=\"tag_input\">标签输入框</string>\n    <string name=\"busevent\">自定义BusEvent</string>\n    <string name=\"click_send_message\">单击发送消息</string>\n    <string name=\"colorfilter\">ColorFilter</string>\n    <string name=\"title_activity_markdown_demo\">Markdown编辑</string>\n    <string name=\"flat_button\">仿iOS Segmented Control</string>\n    <string name=\"slide_menu\">修复版策划控件</string>\n\n\n    <string name=\"title_section1\">编辑</string>\n    <string name=\"title_section2\">预览</string>\n    <string name=\"page_1_text\">重要信息一览无余,不必\\n一一查阅邮件</string>\n    <string name=\"page_2_text\">添加提醒,并使其在\\n收件箱中置顶</string>\n    <string name=\"page_3_text\">功能提示文案\\nxxxxxx</string>\n</resources>\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':sample', ':support'\n"
  },
  {
    "path": "support/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "support/build.gradle",
    "content": "apply plugin: 'com.android.library'\n//apply from: 'custom_mvn_push.gradle'\n\nandroid {\n    compileSdkVersion 22\n    buildToolsVersion \"22.0.1\"\n    lintOptions {\n        abortOnError false\n    }\n\n    defaultConfig {\n        minSdkVersion 8\n        targetSdkVersion 22\n    }\n\n}\n\ndependencies {\n    compile fileTree(include: ['*.jar'], dir: 'libs')\n    provided 'com.android.support:support-v4:22.2.1'\n    provided 'com.android.support:appcompat-v7:22.2.1'\n    provided 'com.squareup.retrofit:retrofit:1.6.0'\n}\n"
  },
  {
    "path": "support/custom_mvn_push.gradle",
    "content": "/*\n * Copyright 2013 Chris Banes, 2014 Chaobin Wu\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\napply plugin: 'maven'\napply plugin: 'signing'\n\ndef isReleaseBuild() {\n    return VERSION_NAME.contains(\"SNAPSHOT\") == false\n}\n\ndef getReleaseRepositoryUrl() {\n    return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL\n            : \"https://oss.sonatype.org/service/local/staging/deploy/maven2/\"\n}\n\ndef getSnapshotRepositoryUrl() {\n    return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL\n            : \"https://oss.sonatype.org/content/repositories/snapshots/\"\n}\n\ndef getRepositoryUsername() {\n    return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : \"\"\n}\ndef getRepositoryPassword() {\n    return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : \"\"\n}\n\nafterEvaluate { project ->\n\n    uploadArchives {\n        // fix No such property: GROUP for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer\n//        if (hasProperty('GROUP')) {\n            repositories {\n                mavenDeployer {\n                    beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }\n                    pom.groupId = GROUP\n                    pom.artifactId = POM_ARTIFACT_ID\n                    pom.version = VERSION_NAME\n                    repository(url: getReleaseRepositoryUrl()) {\n                        authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())\n                    }\n                    snapshotRepository(url: getSnapshotRepositoryUrl()) {\n                        authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())\n                    }\n\n                    pom.project {\n                        name POM_NAME\n                        packaging POM_PACKAGING\n                        description POM_DESCRIPTION\n                        url POM_URL\n\n                        scm {\n                            url POM_SCM_URL\n                            connection POM_SCM_CONNECTION\n                            developerConnection POM_SCM_DEV_CONNECTION\n                        }\n\n                        licenses {\n                            license {\n                                name POM_LICENCE_NAME\n                                url POM_LICENCE_URL\n                                distribution POM_LICENCE_DIST\n                            }\n                        }\n\n                        developers {\n                            developer {\n                                id POM_DEVELOPER_ID\n                                name POM_DEVELOPER_NAME\n                                email POM_DEVELOPER_EMAIL\n                            }\n                        }\n                    }\n                }\n            }\n//        }\n    }\n\n    signing {\n        required { isReleaseBuild() && gradle.taskGraph.hasTask(\"uploadArchives\") }\n        sign configurations.archives\n    }\n    task androidJavadocs(type: Javadoc) {\n        source = android.sourceSets.main.java.srcDirs\n        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))\n        failOnError = false\n    }\n\n    task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {\n        classifier = 'javadoc'\n        from androidJavadocs.destinationDir\n    }\n\n    task androidSourcesJar(type: Jar) {\n        classifier = 'sources'\n        from android.sourceSets.main.java.sourceFiles\n    }\n\n    artifacts {\n        archives androidSourcesJar\n        archives androidJavadocsJar\n    }\n}\n\n"
  },
  {
    "path": "support/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/aven/Android/sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "support/src/androidTest/java/net/avenwu/support/ApplicationTest.java",
    "content": "package net.avenwu.support;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "support/src/main/AndroidManifest.xml",
    "content": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"net.avenwu.support\">\n\n    <application android:allowBackup=\"true\"/>\n</manifest>\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/presenter/Presenter.java",
    "content": "package net.avenwu.support.presenter;\n\nimport net.avenwu.support.protocol.RenderAction;\nimport net.avenwu.support.protocol.UIAction;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\n\nimport retrofit.Callback;\nimport retrofit.RetrofitError;\nimport retrofit.client.Response;\n\n/**\n * Created by chaobin on 7/12/15.\n */\npublic class Presenter {\n    List<DetachableCallback<?>> mCallback;\n    Map<String, RenderAction<?>> mActions;\n    boolean mAttached = false;\n\n    public void attach() {\n        mAttached = true;\n    }\n\n    public <T> Callback<T> addCallback(DetachableCallback<T> callback) {\n        if (mCallback == null) {\n            mCallback = new ArrayList<DetachableCallback<?>>();\n        }\n        mCallback.add(callback);\n        return callback;\n    }\n\n    public Presenter addAction(String key, RenderAction<?> action) {\n        if (mActions == null) {\n            mActions = new HashMap<String, RenderAction<?>>();\n        }\n        mActions.put(key, action);\n        return this;\n    }\n\n    public void detach() {\n        mAttached = false;\n        if (mCallback != null) {\n            for (DetachableCallback<?> callback : mCallback) {\n                callback.detach();\n            }\n        }\n        if (mActions != null) {\n            Iterator<Map.Entry<String, RenderAction<?>>> iterator = mActions.entrySet().iterator();\n            while (iterator.hasNext()) {\n                // avoid memory leak\n                if (iterator.next().getValue() instanceof UIAction) {\n                    iterator.remove();\n                }\n            }\n        }\n    }\n\n    public void invoke(String key, Object data) {\n        if (mActions != null && mActions.size() > 0) {\n            RenderAction action = mActions.get(key);\n            if (action != null) {\n                action.onUpdate(data);\n                if (mAttached && action instanceof UIAction) {\n                    ((UIAction) action).onUpdateUI(data);\n                }\n            }\n        }\n    }\n\n    protected static class DetachableCallback<T> implements Callback<T> {\n        Callback<T> callback;\n\n        public DetachableCallback(Callback<T> callback) {\n            this.callback = callback;\n        }\n\n        @Override\n        public void success(T t, Response response) {\n            if (callback != null) {\n                callback.success(t, response);\n            }\n        }\n\n        @Override\n        public void failure(RetrofitError error) {\n            if (callback != null) {\n                callback.failure(error);\n            }\n        }\n\n        public void detach() {\n            callback = null;\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/presenter/PresenterActivity.java",
    "content": "package net.avenwu.support.presenter;\n\nimport android.os.Bundle;\nimport android.support.v7.app.AppCompatActivity;\n\n/**\n * Created by chaobin on 7/14/15.\n */\npublic abstract class PresenterActivity<P extends Presenter> extends AppCompatActivity {\n    protected P mPresenter;\n\n    protected abstract Class<? extends P> getPresenterClass();\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        try {\n            mPresenter = getPresenterClass().newInstance();\n            mPresenter.attach();\n        } catch (java.lang.InstantiationException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n    }\n\n    @Override\n    protected void onDestroy() {\n        super.onDestroy();\n        mPresenter.detach();\n    }\n\n    public P getPresenter() {\n        return mPresenter;\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/presenter/PresenterFragment.java",
    "content": "package net.avenwu.support.presenter;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\n\npublic abstract class PresenterFragment<P extends Presenter> extends Fragment {\n    P mPresenter;\n\n    protected abstract Class<? extends P> getPresenterClass();\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        try {\n            mPresenter = getPresenterClass().newInstance();\n            mPresenter.attach();\n        } catch (java.lang.InstantiationException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n    }\n\n    @Override\n    public void onDetach() {\n        super.onDetach();\n        mPresenter.detach();\n    }\n\n    public P getPresenter() {\n        return mPresenter;\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/protocol/RenderAction.java",
    "content": "package net.avenwu.support.protocol;\n\n/**\n * Created by chaobin on 7/14/15.\n */\npublic interface RenderAction<T> {\n    void onUpdate(T data);\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/protocol/UIAction.java",
    "content": "package net.avenwu.support.protocol;\n\n/**\n * Created by chaobin on 7/14/15.\n */\npublic abstract class UIAction<T> implements RenderAction<T> {\n    @Override\n    public void onUpdate(T data) {\n    }\n\n    public abstract void onUpdateUI(T data);\n\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/BitmapUtil.java",
    "content": "package net.avenwu.support.util;\n\nimport android.graphics.Bitmap;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.PorterDuff;\nimport android.graphics.PorterDuffXfermode;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\n\n/**\n * Created by chaobin on 3/16/15.\n */\npublic class BitmapUtil {\n    /**\n     * @param bitmap image src\n     * @param radius ignore for circle, only used in rounded rectangle\n     * @param circle whether return circle or not\n     * @return decoded bitmap\n     */\n    public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float radius, boolean circle) {\n        Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),\n                bitmap.getHeight(), Bitmap.Config.ARGB_8888);\n        Canvas canvas = new Canvas(output);\n        final int width = Math.min(bitmap.getWidth(), bitmap.getHeight());\n\n        final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        canvas.drawARGB(0, 0, 0, 0);\n        paint.setColor(Color.RED);//this color is not useful actually, the shape we drew is kind of mask\n\n        final float dx = (bitmap.getWidth() - width) / 2.0f;\n        final float dy = (bitmap.getHeight() - width) / 2.0f;\n        final RectF srcRect = new RectF(dx, dy, dx + width, dy + width);\n\n        final float r = circle ? width / 2.0f : radius;\n        canvas.drawRoundRect(srcRect, r, r, paint);\n\n        paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));\n        final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());\n        canvas.drawBitmap(bitmap, rect, rect, paint);\n\n        return output;\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/ChartSet.java",
    "content": "package net.avenwu.support.util;\n\nimport android.util.Log;\n\n/**\n * Created by chaobin on 11/22/15.\n */\npublic class ChartSet {\n\n    static final String TAG = ChartSet.class.getCanonicalName();\n    final static char ANSI_START = '!';\n    final static char ANSI_END = '~';\n\n    final static char UNICODE_START = '！';\n    final static char UNICODE_END = '～';\n\n    final static long DIFF = UNICODE_START - ANSI_START;\n\n    public static String convertDBCS(CharSequence text) {\n        StringBuilder builder = new StringBuilder();\n        for (int i = 0; i < text.length(); i++) {\n            char c = text.charAt(i);\n            Log.e(TAG, \"\" + c);\n            if (isCharNeedConvert(c)) {\n                c = convert(c);\n                Log.e(TAG, \"translated:\" + c);\n            }\n            builder.append(c);\n        }\n        return builder.toString();\n    }\n\n    public static boolean isCharNeedConvert(char c) {\n        return c >= UNICODE_START && c <= UNICODE_END;\n    }\n\n    public static char convert(char c) {\n        return (char) (c - DIFF);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/Device.java",
    "content": "package net.avenwu.support.util;\n\n/**\n * Created by chaobin on 3/15/15.\n */\npublic class Device {\n    /**\n     * simple hack to avoid umeng auto update crash the app on devices not based on arm\n     * eg: genymotion based on i686\n     */\n    public static boolean isARMBasedDevice() {\n        final String arch = System.getProperty(\"os.arch\");\n        return arch.startsWith(\"arm\") || arch.startsWith(\"ARM\");\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/ReflectionUtils.java",
    "content": "package net.avenwu.support.util;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\n\n/**\n * Created by chris on 17/12/14.\n * For Calligraphy.\n */\nclass ReflectionUtils {\n\n    static Field getField(Class clazz, String fieldName) {\n        try {\n            final Field f = clazz.getDeclaredField(fieldName);\n            f.setAccessible(true);\n            return f;\n        } catch (NoSuchFieldException ignored) {\n        }\n        return null;\n    }\n\n    static Object getValue(Field field, Object obj) {\n        try {\n            return field.get(obj);\n        } catch (IllegalAccessException ignored) {\n        }\n        return null;\n    }\n\n    static void setValue(Field field, Object obj, Object value) {\n        try {\n            field.set(obj, value);\n        } catch (IllegalAccessException ignored) {\n        }\n    }\n\n    static Method getMethod(Class clazz, String methodName) {\n        final Method[] methods = clazz.getMethods();\n        for (Method method : methods) {\n            if (method.getName().equals(methodName)) {\n                method.setAccessible(true);\n                return method;\n            }\n        }\n        return null;\n    }\n\n    static void invokeMethod(Object object, Method method, Object... args) {\n        try {\n            if (method == null) return;\n            method.invoke(object, args);\n        } catch (IllegalAccessException | InvocationTargetException ignored) {\n            ignored.printStackTrace();\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/TypefaceContextWrapper.java",
    "content": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.content.ContextWrapper;\nimport android.view.LayoutInflater;\n\n/**\n * Created by chaobin on 10/8/15.\n */\npublic class TypefaceContextWrapper extends ContextWrapper {\n    private TypefaceLayoutInflator mInflater;\n\n    public TypefaceContextWrapper(Context base) {\n        super(base);\n    }\n\n    public static ContextWrapper wrap(Context base) {\n        return new TypefaceContextWrapper(base);\n    }\n\n    @Override\n    public Object getSystemService(String name) {\n        if (LAYOUT_INFLATER_SERVICE.equals(name)) {\n            if (mInflater == null) {\n                mInflater = new TypefaceLayoutInflator(LayoutInflater.from(getBaseContext()), this);\n            }\n            return mInflater;\n        }\n        return super.getSystemService(name);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/TypefaceLayoutInflator.java",
    "content": "package net.avenwu.support.util;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os.Build;\nimport android.util.AttributeSet;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.TextView;\n\nimport org.xmlpull.v1.XmlPullParser;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\n\n/**\n * modified from CalligraphyLayoutInflater(Created by chris on 19/12/2013)\n * <p/>\n * Created by chaobin on 10/8/15.\n */\npublic class TypefaceLayoutInflator extends LayoutInflater {\n    public TypefaceLayoutInflator(Context context) {\n        super(context);\n    }\n\n    public TypefaceLayoutInflator(LayoutInflater original, Context newContext) {\n        super(original, newContext);\n    }\n\n    @Override\n    public LayoutInflater cloneInContext(Context newContext) {\n        return new TypefaceLayoutInflator(this, newContext);\n    }\n\n    @Override\n    protected View onCreateView(View parent, String name, AttributeSet attrs) throws ClassNotFoundException {\n        View view = super.onCreateView(parent, name, attrs);\n        onViewCreatedInternal(view, getContext(), attrs);\n        return view;\n    }\n\n    @Override\n    protected View onCreateView(String name, AttributeSet attrs) throws ClassNotFoundException {\n        View view = super.onCreateView(name, attrs);\n        onViewCreatedInternal(view, getContext(), attrs);\n        return view;\n    }\n\n    @Override\n    public void setFactory2(Factory2 factory) {\n        // Only set our factory and wrap calls to the Factory2 trying to be set!\n        if (!(factory instanceof WrapperFactory2)) {\n//            LayoutInflaterCompat.setFactory(this, new WrapperFactory2(factory2, mCalligraphyFactory));\n            super.setFactory2(new WrapperFactory2(factory));\n        } else {\n            super.setFactory2(factory);\n        }\n    }\n\n    @Override\n    public void setFactory(LayoutInflater.Factory factory) {\n        // Only set our factory and wrap calls to the Factory trying to be set!\n        if (!(factory instanceof WrapperFactory)) {\n            super.setFactory(new WrapperFactory(factory, this));\n        } else {\n            super.setFactory(factory);\n        }\n    }\n\n    @Override\n    public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) {\n        setPrivateFactoryInternal();\n        return super.inflate(parser, root, attachToRoot);\n    }\n\n    private boolean mSetPrivateFactory = false;\n\n    private void setPrivateFactoryInternal() {\n        // Already tried to set the factory.\n        if (mSetPrivateFactory) return;\n        // Reflection (Or Old Device) skip.\n//        if (!CalligraphyConfig.get().isReflection()) return;\n        // Skip if not attached to an activity.\n        if (!(getContext() instanceof Factory2)) {\n            mSetPrivateFactory = true;\n            return;\n        }\n        final Method setPrivateFactoryMethod = ReflectionUtils\n            .getMethod(LayoutInflater.class, \"setPrivateFactory\");\n\n        if (setPrivateFactoryMethod != null) {\n            ReflectionUtils.invokeMethod(this,\n                setPrivateFactoryMethod,\n                new PrivateWrapperFactory2((Factory2) getContext(), this));\n        }\n        mSetPrivateFactory = true;\n    }\n\n    private static class WrapperFactory implements LayoutInflater.Factory {\n        private final Factory mFactory;\n        private final TypefaceLayoutInflator mInflater;\n\n        public WrapperFactory(Factory factory, TypefaceLayoutInflator inflator) {\n            mFactory = factory;\n            mInflater = inflator;\n        }\n\n        @Override\n        public View onCreateView(String name, Context context, AttributeSet attrs) {\n            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {\n                try {\n                    View view = mInflater.createCustomViewInternal(\n                        null, mFactory.onCreateView(name, context, attrs), name, context, attrs);\n                    onViewCreatedInternal(view, context, attrs);\n                    return view;\n                } catch (Exception e) {\n                    e.printStackTrace();\n                }\n            }\n            View view = mFactory.onCreateView(name, context, attrs);\n            onViewCreatedInternal(view, context, attrs);\n            return view;\n        }\n    }\n\n    static void onViewCreatedInternal(View view, final Context context, AttributeSet attrs) {\n        if (view instanceof TextView) {\n            TypefaceUtils.setTypeface(context, (TextView) view, \"fonts/RobotoCondensed-Regular.ttf\");\n        }\n    }\n\n    /**\n     * Nasty method to inflate custom layouts that haven't been handled else where. If this fails it\n     * will fall back through to the PhoneLayoutInflater method of inflating custom views where\n     * Calligraphy will NOT have a hook into.\n     *\n     * @param parent      parent view\n     * @param view        view if it has been inflated by this point, if this is not null this method\n     *                    just returns this value.\n     * @param name        name of the thing to inflate.\n     * @param viewContext Context to inflate by if parent is null\n     * @param attrs       Attr for this view which we can steal fontPath from too.\n     * @return view or the View we inflate in here.\n     */\n    private View createCustomViewInternal(View parent, View view, String name, Context\n        viewContext, AttributeSet attrs) throws Exception {\n        // I by no means advise anyone to do this normally, but Google have locked down access to\n        // the createView() method, so we never get a callback with attributes at the end of the\n        // createViewFromTag chain (which would solve all this unnecessary rubbish).\n        // We at the very least try to optimise this as much as possible.\n        // We only call for customViews (As they are the ones that never go through onCreateView(...)).\n        // We also maintain the Field reference and make it accessible which will make a pretty\n        // significant difference to performance on Android 4.0+.\n\n        // If CustomViewCreation is off skip this.\n        if (view == null && name.indexOf('.') > -1) {\n            if (mConstructorArgs == null)\n                mConstructorArgs = ReflectionUtils.getField(LayoutInflater.class, \"mConstructorArgs\");\n\n            final Object[] mConstructorArgsArr = (Object[]) ReflectionUtils.getValue(mConstructorArgs, this);\n            final Object lastContext = mConstructorArgsArr[0];\n            // The LayoutInflater actually finds out the correct context to use. We just need to set\n            // it on the mConstructor for the internal method.\n            // Set the constructor ars up for the createView, not sure why we can't pass these in.\n            mConstructorArgsArr[0] = viewContext;\n            ReflectionUtils.setValue(mConstructorArgs, this, mConstructorArgsArr);\n            try {\n                view = createView(name, null, attrs);\n            } catch (ClassNotFoundException ignored) {\n            } finally {\n                mConstructorArgsArr[0] = lastContext;\n                ReflectionUtils.setValue(mConstructorArgs, this, mConstructorArgsArr);\n            }\n        }\n        return view;\n    }\n\n    private Field mConstructorArgs = null;\n\n    @TargetApi(11)\n    private static class WrapperFactory2 implements Factory2 {\n        protected final Factory2 mFactory2;\n\n        public WrapperFactory2(Factory2 factory2) {\n            mFactory2 = factory2;\n        }\n\n        @Override\n        public View onCreateView(String name, Context context, AttributeSet attrs) {\n            View view = mFactory2.onCreateView(name, context, attrs);\n            onViewCreatedInternal(view, context, attrs);\n            return view;\n        }\n\n        @Override\n        public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {\n            View view = mFactory2.onCreateView(parent, name, context, attrs);\n            onViewCreatedInternal(view, context, attrs);\n            return view;\n        }\n    }\n\n    @TargetApi(11)\n    private static class PrivateWrapperFactory2 extends WrapperFactory2 {\n\n        private final TypefaceLayoutInflator mInflater;\n\n        public PrivateWrapperFactory2(Factory2 factory2, TypefaceLayoutInflator inflater) {\n            super(factory2);\n            mInflater = inflater;\n        }\n\n        @Override\n        public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {\n            try {\n                View view = mInflater.createCustomViewInternal(parent,\n                    mFactory2.onCreateView(parent, name, context, attrs),\n                    name, context, attrs\n                );\n                onViewCreatedInternal(view, context, attrs);\n                return view;\n            } catch (Exception e) {\n                e.printStackTrace();\n            }\n            return super.onCreateView(parent, name, context, attrs);\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/TypefaceUtils.java",
    "content": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.content.res.AssetManager;\nimport android.graphics.Paint;\nimport android.graphics.Typeface;\nimport android.util.Log;\nimport android.widget.TextView;\n\nimport java.lang.ref.WeakReference;\nimport java.util.HashMap;\nimport java.util.Map;\n\n/**\n * Created by chaobin on 10/8/15.\n */\npublic class TypefaceUtils {\n    private static final Map<String, WeakReference<Typeface>> sCachedFonts = new HashMap<>();\n\n    /**\n     * A helper loading a custom font.\n     *\n     * @param assetManager App's asset manager.\n     * @param filePath     The path of the file.\n     * @return Return {@link android.graphics.Typeface} or null if the path is invalid.\n     */\n    public static Typeface load(final AssetManager assetManager, final String filePath) {\n        synchronized (sCachedFonts) {\n            try {\n                if (!sCachedFonts.containsKey(filePath) || sCachedFonts.get(filePath).get() == null) {\n                    final Typeface typeface = Typeface.createFromAsset(assetManager, filePath);\n                    sCachedFonts.put(filePath, new WeakReference<Typeface>(typeface));\n                    return typeface;\n                }\n            } catch (Exception e) {\n                Log.w(\"Calligraphy\", \"Can't create asset from \" + filePath + \". Make sure you have passed in the correct path and file name.\", e);\n                sCachedFonts.put(filePath, null);\n                return null;\n            }\n            return sCachedFonts.get(filePath).get();\n        }\n    }\n\n    public static void setTypeface(Context context, TextView textView, String filePath) {\n        if (textView == null || context == null) return;\n        textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);\n        textView.setTypeface(load(context.getAssets(), filePath));\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/util/ViewCompat.java",
    "content": "package net.avenwu.support.util;\n\nimport android.content.Context;\nimport android.graphics.Paint;\nimport android.graphics.PorterDuff;\nimport android.graphics.Typeface;\nimport android.graphics.drawable.Drawable;\nimport android.os.Build;\nimport android.support.annotation.ColorRes;\nimport android.support.annotation.StringRes;\nimport android.view.View;\nimport android.widget.AbsListView;\nimport android.widget.EdgeEffect;\nimport android.widget.TextView;\nimport android.widget.Toast;\n\nimport net.avenwu.support.R;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTargetException;\nimport java.lang.reflect.Method;\n\n/**\n * Created by chaobin on 2/25/15.\n */\npublic class ViewCompat {\n    /**\n     * set specific distance for AbsListView to enable the over scroll effect\n     *\n     * @param listView\n     * @param distance\n     */\n    public static void enableOverScroll(AbsListView listView, int distance) {\n        try {\n            Field overscrollDistance = AbsListView.class.getDeclaredField(\"mOverscrollDistance\");\n            overscrollDistance.setAccessible(true);\n            overscrollDistance.setInt(listView, distance);\n        } catch (NoSuchFieldException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n    }\n\n    /**\n     * set custom edge color on over scroll\n     * Copy from http://stackoverflow.com/questions/11603267/scrollview-change-the-edge-effect-color-with-holo\n     *\n     * @param listView\n     * @param color\n     */\n    public static void customEdgeEffectColor(AbsListView listView, @ColorRes int color) {\n        try {\n            final Field fEdgeGlowTop = AbsListView.class.getDeclaredField(\"mEdgeGlowTop\");\n            final Field fEdgeGlowBottom = AbsListView.class.getDeclaredField(\"mEdgeGlowBottom\");\n            fEdgeGlowTop.setAccessible(true);\n            fEdgeGlowBottom.setAccessible(true);\n            setEdgeEffectColor((EdgeEffect) fEdgeGlowTop.get(listView), color);\n            setEdgeEffectColor((EdgeEffect) fEdgeGlowBottom.get(listView), color);\n        } catch (NoSuchFieldException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n\n    }\n\n    public static void setEdgeEffectColor(final EdgeEffect edgeEffect, @ColorRes final int color) {\n        try {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n                edgeEffect.setColor(color);\n                return;\n            }\n            final Field edgeField = EdgeEffect.class.getDeclaredField(\"mEdge\");\n            final Field glowField = EdgeEffect.class.getDeclaredField(\"mGlow\");\n            edgeField.setAccessible(true);\n            glowField.setAccessible(true);\n            final Drawable edge = (Drawable) edgeField.get(edgeEffect);\n            final Drawable glow = (Drawable) glowField.get(edgeEffect);\n            edge.setColorFilter(color, PorterDuff.Mode.SRC_IN);\n            glow.setColorFilter(color, PorterDuff.Mode.SRC_IN);\n            edge.setCallback(null); // free up any references\n            glow.setCallback(null); // free up any references\n        } catch (final Exception ignored) {\n            ignored.printStackTrace();\n        }\n    }\n\n    /**\n     * Remove the left space on ActionBar while using Toolbar as ActionBar\n     * Usage:\n     * {@code ViewCompat.cleanContentInset(getSupportActionBar().getCustomView());}\n     * <p>\n     * Toolbar toolbar = (Toolbar) customView.getParent();\n     * toolbar.setContentInsetsAbsolute(0, 0);\n     *\n     * @param customView\n     */\n    public static boolean removeContentInsetOfToolbar(View customView) {\n        if (customView != null && customView.getParent().getClass().getCanonicalName().equals(\"android.support.v7.widget.Toolbar\")) {\n            try {\n                Method setContentInsetsAbsolute = customView.getParent().getClass().getDeclaredMethod(\"setContentInsetsAbsolute\", int.class, int.class);\n                setContentInsetsAbsolute.setAccessible(true);\n                setContentInsetsAbsolute.invoke(customView.getParent(), 0, 0);\n                return true;\n            } catch (NoSuchMethodException e) {\n                e.printStackTrace();\n            } catch (IllegalAccessException e) {\n                e.printStackTrace();\n            } catch (InvocationTargetException e) {\n                e.printStackTrace();\n            }\n        }\n        return false;\n    }\n\n    public static Toast makeText(Context context, String text, int duration) {\n        Toast result = new Toast(context);\n        View v = View.inflate(context, R.layout.custom_toast, null);\n        TextView tv = (TextView) v.findViewById(android.R.id.message);\n        tv.setText(text);\n        result.setView(v);\n        result.setDuration(duration);\n        return result;\n    }\n\n    public static Toast makeText(Context context, @StringRes int text, int duration) {\n        Toast result = new Toast(context);\n        View v = View.inflate(context, R.layout.custom_toast, null);\n        TextView tv = (TextView) v.findViewById(android.R.id.message);\n        tv.setText(text);\n        result.setView(v);\n        result.setDuration(duration);\n        return result;\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/BreathingDelegate.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.animation.AnimatorSet;\nimport android.animation.ObjectAnimator;\nimport android.animation.ValueAnimator;\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Paint;\nimport android.graphics.RectF;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.Property;\nimport android.util.TypedValue;\nimport android.view.View;\nimport android.view.animation.LinearInterpolator;\n\nimport net.avenwu.support.R;\n\n/**\n * Created by chaobin on 4/6/15.\n */\n@SuppressWarnings(\"NewApi\")\npublic class BreathingDelegate {\n    private Paint mPaint;\n    private RectF mRippleRect = new RectF();\n    private float mRippleRadius;\n    private float mEndRadius;\n    private int mRippleAlpha = 0xff;\n    private int mDuration;\n    private RectF mBorderRect = new RectF();\n    private AnimatorSet mAnimatorSet = new AnimatorSet();\n    private boolean mAutoStart;\n    private int mRippleColor;\n    private View mTarget;\n\n    public BreathingDelegate(Context context, AttributeSet attrs, View view) {\n        mTarget = view;\n        mTarget.setWillNotDraw(false);\n        mTarget.setDrawingCacheEnabled(false);\n        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.BreathingLayout);\n        mAutoStart = a.getBoolean(R.styleable.BreathingLayout__autoStart, true);\n        mRippleColor = a.getColor(R.styleable.BreathingLayout__rippleColor, 0xFF0099CC);\n        mRippleRadius = a.getDimensionPixelSize(R.styleable.BreathingLayout__rippleStartRadius, -1);\n        if (mRippleRadius == -1) {\n            mRippleRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, getContext().getResources().getDisplayMetrics());\n        }\n        mEndRadius = a.getDimensionPixelSize(R.styleable.BreathingLayout__rippleEndRadius, -1);\n        if (mEndRadius == -1) {\n            mEndRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 50, getContext().getResources().getDisplayMetrics());\n        }\n        if (mEndRadius <= mRippleRadius) {\n            throw new IllegalStateException(\"rippleEndRadius can not be smaller than rippleStartRadius\");\n        }\n        mDuration = a.getInt(R.styleable.BreathingLayout__rippleTime, 3000);\n        a.recycle();\n        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mPaint.setColor(mRippleColor);\n        mPaint.setStyle(Paint.Style.FILL);\n        prepareAnimation();\n        if (mAutoStart) {\n            start();\n        }\n    }\n\n    Property<BreathingDelegate, Float> mRadiusProperty = new Property<BreathingDelegate, Float>(Float.class, \"mRippleRadius\") {\n        @Override\n        public Float get(BreathingDelegate object) {\n            return object.getRadius();\n        }\n\n        @Override\n        public void set(BreathingDelegate object, Float value) {\n            object.setRadius(value);\n        }\n    };\n    Property<BreathingDelegate, Integer> mAlphaProperty = new Property<BreathingDelegate, Integer>(Integer.class, \"mRippleAlpha\") {\n        @Override\n        public Integer get(BreathingDelegate object) {\n            return object.getRippleAlpha();\n        }\n\n        @Override\n        public void set(BreathingDelegate object, Integer value) {\n            object.setRippleAlpha(value);\n        }\n    };\n\n    private float getRadius() {\n        return mRippleRadius;\n    }\n\n    private void setRadius(float radius) {\n        this.mRippleRadius = radius;\n    }\n\n    public int getRippleAlpha() {\n        return mRippleAlpha;\n    }\n\n    public void setRippleAlpha(int rippleAlpha) {\n        this.mRippleAlpha = rippleAlpha;\n    }\n\n    private void prepareAnimation() {\n        ObjectAnimator animator = ObjectAnimator.ofFloat(this, mRadiusProperty, mRippleRadius, mEndRadius);\n        animator.setDuration(mDuration);\n        animator.setRepeatCount(ValueAnimator.INFINITE);\n        animator.setRepeatMode(ValueAnimator.REVERSE);\n        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n            @Override\n            public void onAnimationUpdate(ValueAnimator animation) {\n                mTarget.invalidate();\n            }\n        });\n\n        ObjectAnimator alpha = ObjectAnimator.ofInt(this, mAlphaProperty, mRippleAlpha, 0x00);\n        alpha.setDuration(mDuration);\n        alpha.setRepeatCount(ValueAnimator.INFINITE);\n        alpha.setRepeatMode(ValueAnimator.RESTART);\n        mAnimatorSet.setInterpolator(new LinearInterpolator());\n        mAnimatorSet.playTogether(animator, alpha);\n    }\n\n    public void toggle() {\n        if (mAnimatorSet.isRunning()) {\n            stop();\n        }/* else if (mAnimatorSet.isPaused()) {\n            mAnimatorSet.resume();\n        } */ else {\n            mAnimatorSet.start();\n        }\n    }\n\n    public void start() {\n        mAnimatorSet.start();\n    }\n\n    public void stop() {\n        mAnimatorSet.cancel();\n    }\n\n    private Context getContext() {\n        return mTarget.getContext();\n    }\n\n    public void onDraw(Canvas canvas) {\n        mRippleRect.set(mBorderRect.centerX() - mRippleRadius, mBorderRect.centerY() - mRippleRadius,\n                mBorderRect.centerX() + mRippleRadius, mBorderRect.centerY() + mRippleRadius);\n        canvas.drawOval(mRippleRect, mPaint);\n        Log.d(\"BreathingLayout\", \"onDraw=\" + mRippleRect.toString());\n    }\n\n    public void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        mBorderRect.set(left, top, right, bottom);\n        Log.d(\"BreathingLayout\", \"onLayout:\" + mBorderRect.toString());\n    }\n\n    public void onDetachedFromWindow() {\n        mAnimatorSet.cancel();\n        Log.d(\"BreathingLayout\", \"onDetachedFromWindow\");\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/BreathingLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.util.AttributeSet;\nimport android.widget.FrameLayout;\n\n/**\n * Created by chaobin on 3/3/15.\n */\npublic class BreathingLayout extends FrameLayout {\n    BreathingDelegate mDelegate;\n\n    public BreathingLayout(Context context) {\n        this(context, null);\n    }\n\n    public BreathingLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public BreathingLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        mDelegate = new BreathingDelegate(context, attrs, this);\n    }\n\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        mDelegate.onDraw(canvas);\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        super.onLayout(changed, left, top, right, bottom);\n        mDelegate.onLayout(changed, left, top, right, bottom);\n    }\n\n    @Override\n    protected void onDetachedFromWindow() {\n        super.onDetachedFromWindow();\n        mDelegate.onDetachedFromWindow();\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/CurtainLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.widget.FrameLayout;\n\n/**\n * Created by aven on 12/25/15.\n */\npublic class CurtainLayout extends FrameLayout {\n    public CurtainLayout(Context context) {\n        this(context, null);\n    }\n\n    public CurtainLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/CustomSlidePanelLayout.java",
    "content": "package net.avenwu.support.widget;\n\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.os.Build;\nimport android.support.v4.widget.SlidingPaneLayout;\nimport android.util.AttributeSet;\nimport android.view.MotionEvent;\nimport android.view.View;\n\n/**\n * Support level 11 and later;\n * TODO use nineolddroid for devices under level 11\n * <p/>\n * Created by chaobin on 2/18/15.\n */\n@TargetApi(11)\npublic class CustomSlidePanelLayout extends SlidingPaneLayout implements SlidingPaneLayout.PanelSlideListener {\n    protected View mMenuPanel;\n    protected float mSlideOffset;\n    protected boolean isCustomable = false;\n\n    public CustomSlidePanelLayout(Context context) {\n        this(context, null);\n    }\n\n    public CustomSlidePanelLayout(Context context, AttributeSet attrs) {\n        this(context, attrs, -1);\n    }\n\n    public CustomSlidePanelLayout(Context context, AttributeSet attrs, int defStyle) {\n        super(context, attrs, defStyle);\n        if (isInEditMode()) return;\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n            isCustomable = true;\n            super.setPanelSlideListener(this);\n            setSliderFadeColor(0);\n        }\n    }\n\n    @Override\n    public void onPanelSlide(View panel, float slideOffset) {\n        mSlideOffset = slideOffset;\n        if (mMenuPanel == null) {\n            final int childCount = getChildCount();\n            for (int i = 0; i < childCount; i++) {\n                final View child = getChildAt(i);\n                if (child != panel) {\n                    mMenuPanel = child;\n                    break;\n                }\n            }\n        }\n        final float scaleLeft = 1 - 0.3f * (1 - slideOffset);\n        mMenuPanel.setPivotX(-0.5f * mMenuPanel.getWidth());\n        mMenuPanel.setPivotY(mMenuPanel.getHeight() / 2f);\n        mMenuPanel.setScaleX(scaleLeft);\n        mMenuPanel.setScaleY(scaleLeft);\n\n        final float scale = 1 - 0.2f * slideOffset;\n        panel.setPivotX(0);\n        panel.setPivotY(panel.getHeight() / 2.0f);\n        panel.setScaleX(scale);\n        panel.setScaleY(scale);\n        if (mListener != null) {\n            mListener.onPanelSlide(panel, slideOffset);\n        }\n    }\n\n    @Override\n    public void onPanelOpened(View panel) {\n        if (mListener != null) {\n            mListener.onPanelOpened(panel);\n        }\n    }\n\n    @Override\n    public void onPanelClosed(View panel) {\n        if (mListener != null) {\n            mListener.onPanelClosed(panel);\n        }\n    }\n\n    PanelSlideListener mListener;\n\n    @Override\n    public void setPanelSlideListener(PanelSlideListener listener) {\n        if (isCustomable) {\n            mListener = listener;\n        } else {\n            super.setPanelSlideListener(listener);\n        }\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n        if (isCustomable) {\n            dimOnForeground(canvas);\n        }\n    }\n\n    @Override\n    protected boolean drawChild(Canvas canvas, View child, long drawingTime) {\n        boolean result = super.drawChild(canvas, child, drawingTime);\n        if (isCustomable && child == mMenuPanel) {\n            dimOnForeground(canvas);\n        }\n        return result;\n    }\n\n    /**\n     * dim the view\n     *\n     * @param canvas\n     */\n    private void dimOnForeground(Canvas canvas) {\n        canvas.drawColor(Color.argb((int) (0xff * (1 - mSlideOffset)), 0, 0, 0));\n    }\n\n    private boolean mSlideEnable = true;\n\n    public void setSlideEnable(boolean slideEnable) {\n        mSlideEnable = slideEnable;\n    }\n\n    @Override\n    public boolean onInterceptTouchEvent(MotionEvent ev) {\n        return mSlideEnable && super.onInterceptTouchEvent(ev);\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent ev) {\n        return mSlideEnable && super.onTouchEvent(ev);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/DimImageView.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.util.AttributeSet;\nimport android.widget.ImageView;\n\nimport net.avenwu.support.R;\n\n/**\n * Created by chaobin on 1/7/15.\n */\npublic class DimImageView extends ImageView {\n    public static int DEFAULT_DIM = 0x99000000;\n    int mDimColor;\n\n    public DimImageView(Context context) {\n        this(context, null);\n    }\n\n    public DimImageView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public DimImageView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.DimImageView, defStyleAttr, 0);\n        mDimColor = array.getColor(R.styleable.DimImageView_dim, DEFAULT_DIM);\n        array.recycle();\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n        canvas.drawColor(mDimColor);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/DrawerFrame.java",
    "content": "package net.avenwu.support.widget;\n\nimport net.avenwu.support.BuildConfig;\nimport net.avenwu.support.R;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.TypedValue;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.animation.Interpolator;\nimport android.widget.FrameLayout;\nimport android.widget.Scroller;\n\npublic class DrawerFrame extends FrameLayout {\n\tFrameLayout left;\n\tFrameLayout main;\n\tScroller scroller;\n\n\tpublic DrawerFrame(Context context) {\n\t\tthis(context, null);\n\t}\n\n\tpublic DrawerFrame(Context context, AttributeSet attrs) {\n\t\tthis(context, attrs, 0);\n\t}\n\n\tpublic DrawerFrame(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit(attrs, defStyle);\n\t}\n\n\tprivate void init(AttributeSet attrs, int defStyle) {\n//\t\tfinal TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.DrawerFrame, defStyle, 0);\n//\t\ta.recycle();\n\t\tscroller = new Scroller(getContext(), new Interpolator() {\n\t\t\t@Override\n\t\t\tpublic float getInterpolation(float input) {\n\t\t\t\treturn (float) (1.0D + Math.pow(input - 1.0D, 5.0D));\n\t\t\t}\n\t\t});\n\t\tMENU_WIDTH = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200,\n\t\t\t\tgetResources().getDisplayMetrics());\n\t\tmain = new FrameLayout(getContext());\n\t\tmain.setId(R.id.main);\n\t\tmain.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,\n\t\t\t\tViewGroup.LayoutParams.MATCH_PARENT));\n\t\tmain.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_bright));\n\t\taddView(main);\n\n\t\tleft = new FrameLayout(getContext());\n\t\tleft.setId(R.id.menu);\n\t\tleft.setLayoutParams(new FrameLayout.LayoutParams(MENU_WIDTH, ViewGroup.LayoutParams.MATCH_PARENT));\n\t\taddView(left);\n\t\tViewConfiguration configuration = ViewConfiguration.get(getContext());\n\t\ttouchSlop = configuration.getScaledTouchSlop();\n\t}\n\n\tfloat mSrcX;\n\tint MENU_WIDTH;\n\n\t@Override\n\tpublic boolean onInterceptTouchEvent(MotionEvent ev) {\n\t\tif (!mSlidable) return false;\n\t\tfinal int action = ev.getAction();\n\t\tif (action != MotionEvent.ACTION_DOWN && isSliding) return true;\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\treturn false;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\tif (Math.abs(ev.getX() - mSrcX) > touchSlop) {\n\t\t\t\t\tmSrcX = ev.getX();\n\t\t\t\t\tisSliding = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tisSliding = false;\n\t\t\t\tmSrcX = ev.getX();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn isSliding;\n\t}\n\n\tboolean isSliding = false;\n\tboolean mSlidable = true;\n\tint touchSlop;\n\n\tpublic void setSlide(boolean enable) {\n\t\tmSlidable = enable;\n\t}\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\td(\"UIView\", \"event:\" + event.toString());\n\t\tfinal int action = event.getAction();\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tmSrcX = event.getX();\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\tint oldx = left.getScrollX();\n\t\t\t\tfloat dx = mSrcX - event.getX();\n\t\t\t\tif (dx != 0) {\n\t\t\t\t\tleft.setVisibility(VISIBLE);\n\t\t\t\t\tfloat x = oldx + dx;\n\t\t\t\t\td(\"onTouchEvent\", \"move, oldx=\" + oldx + \", dx=\" + dx + \", mLeftView=\" +\n\t\t\t\t\t\t\tleft.getLeft() + \", right=\" + left.getRight() + \", getX=\" + event.getX() + \", mSrcX=\" + mSrcX);\n\t\t\t\t\td(\"onTouchEvent\", \"before x=\" + x);\n\t\t\t\t\tif (MENU_WIDTH < x) {\n\t\t\t\t\t\tx = MENU_WIDTH;\n\t\t\t\t\t}\n\t\t\t\t\tif (0 > x) {\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\t}\n\t\t\t\t\td(\"onTouchEvent\", \"after x=\" + x);\n\t\t\t\t\tleft.scrollTo((int) x, 0);\n\t\t\t\t\tmSrcX = event.getX();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\tint currentX = left.getScrollX();\n\t\t\t\tif (currentX + mSrcX - event.getX() >= MENU_WIDTH / 2.0) {\n\t\t\t\t\tint duration = (int) (Math.abs(MENU_WIDTH - currentX + 0.5f) / MENU_WIDTH * 1000);\n\t\t\t\t\tscroller.startScroll(currentX, 0, MENU_WIDTH - currentX, 0, duration);\n\t\t\t\t\tinvalidate();\n\t\t\t\t} else {\n\t\t\t\t\tint duration = (int) (Math.abs(currentX + 0.5f) / MENU_WIDTH * 1000);\n\t\t\t\t\tscroller.startScroll(currentX, 0, 0 - currentX, 0, duration);\n\t\t\t\t\tinvalidate();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}\n\n\t@Override\n\tprotected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n\t\tint count = getChildCount();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tView child = getChildAt(i);\n\t\t\tif (child.getVisibility() == GONE) continue;\n\t\t\tfinal LayoutParams lp = (LayoutParams) child.getLayoutParams();\n\t\t\tif (child.getId() == R.id.menu) {\n\t\t\t\tfinal int childWidth = child.getMeasuredWidth();\n\t\t\t\tfinal int childHeight = child.getMeasuredHeight();\n\t\t\t\tint childLeft = 0;\n\t\t\t\tchild.layout(childLeft, lp.topMargin, childLeft + childWidth, lp.topMargin + childHeight);\n\t\t\t\tchild.scrollTo(MENU_WIDTH, 0);\n\t\t\t} else if (child.getId() == R.id.main) {\n\t\t\t\tchild.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight());\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic void showMenuSmoothly() {\n\t\tscroller.startScroll(MENU_WIDTH, 0, -MENU_WIDTH, 0, 1000);\n\t\tinvalidate();\n\t}\n\n\tpublic void dismissSmoothly() {\n\t\tint start = scroller.getCurrX();\n\t\tscroller.startScroll(start, 0, MENU_WIDTH - start, 0, 1000);\n\t\tinvalidate();\n\t}\n\n\tpublic void setMenuView(View view) {\n\t\tleft.removeAllViews();\n\t\tleft.addView(view);\n\t\trequestLayout();\n\t}\n\n\tpublic void setContentView(View view) {\n\t\tmain.removeAllViews();\n\t\tmain.addView(view);\n\t\trequestLayout();\n\t}\n\n\t@Override\n\tpublic void computeScroll() {\n\t\td(\"computeScroll\", \"computeScroll\");\n\t\tif (scroller.computeScrollOffset()) {\n\t\t\tint oldx = left.getScrollX();\n\t\t\tint x = scroller.getCurrX();\n\t\t\td(\"computeScroll\", \"try scroll, oldx=\" + oldx + \", x=\" + x);\n\t\t\tif (oldx != x) {\n\t\t\t\t//this can only effect on the content view inside of mLeftView\n\t\t\t\tleft.scrollTo(x, 0);\n\t\t\t\tleft.invalidate();\n\t\t\t}\n\t\t\tinvalidate();\n\t\t} else {\n\t\t\tscroller.abortAnimation();\n\t\t}\n\t}\n\n\tprivate void d(String tag, String text) {\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLog.d(tag, text);\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/DrawerFrameV2.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.drawable.ColorDrawable;\nimport android.graphics.drawable.Drawable;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.animation.Interpolator;\nimport android.widget.FrameLayout;\nimport android.widget.ScrollView;\nimport android.widget.Scroller;\n\nimport net.avenwu.support.R;\n\npublic class DrawerFrameV2 extends FrameLayout {\n    View mLeftView;\n    View mContentView;\n    Scroller mScroller;\n    float mSrcX;\n    int mLeftViewWidth;\n\n    boolean isSliding = false;\n    boolean mSlidable = true;\n    int mTouchSlop;\n\n    public DrawerFrameV2(Context context) {\n        this(context, null);\n    }\n\n    public DrawerFrameV2(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public DrawerFrameV2(Context context, AttributeSet attrs, int defStyle) {\n        super(context, attrs, defStyle);\n        init(attrs, defStyle);\n    }\n\n    private void init(AttributeSet attrs, int defStyle) {\n        mScroller = new Scroller(getContext(), new Interpolator() {\n            @Override\n            public float getInterpolation(float input) {\n                return (float) (1.0D + Math.pow(input - 1.0D, 5.0D));\n            }\n        });\n        mLeftViewWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200,\n                getResources().getDisplayMetrics());\n        ViewConfiguration configuration = ViewConfiguration.get(getContext());\n        mTouchSlop = configuration.getScaledTouchSlop();\n        mShadowLeft = getResources().getDrawable(android.R.drawable.ic_media_play);\n    }\n\n    @Override\n    protected void onFinishInflate() {\n        int count = getChildCount();\n        for (int i = 0; i < count; i++) {\n            View child = getChildAt(i);\n            if (child.getId() == R.id.menu) {\n                mLeftView = child;\n            } else if (child.getId() == R.id.main) {\n                mContentView = child;\n            }\n        }\n        if (mLeftView == null) {\n            mLeftView = new FrameLayout(getContext());\n            mLeftView.setId(R.id.menu);\n            mLeftView.setLayoutParams(new LayoutParams(mLeftViewWidth, ViewGroup.LayoutParams.MATCH_PARENT));\n            mLeftView.setBackgroundColor(0xff669900);\n            addView(mLeftView);\n        }\n        if (mContentView == null) {\n            mContentView = new FrameLayout(getContext());\n            mContentView.setId(R.id.main);\n            mContentView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,\n                    ViewGroup.LayoutParams.MATCH_PARENT));\n            mContentView.setBackgroundColor(0xffff8800);\n            addView(mContentView);\n        }\n    }\n\n    @Override\n    public boolean onInterceptTouchEvent(MotionEvent ev) {\n        if (!mSlidable) return false;\n        final int action = ev.getAction();\n        if (action != MotionEvent.ACTION_DOWN && isSliding) return true;\n        switch (action) {\n            case MotionEvent.ACTION_CANCEL:\n            case MotionEvent.ACTION_UP:\n                return false;\n            case MotionEvent.ACTION_MOVE:\n                if (Math.abs(ev.getX() - mSrcX) > mTouchSlop) {\n                    mSrcX = ev.getX();\n                    isSliding = true;\n                }\n                break;\n            case MotionEvent.ACTION_DOWN:\n                isSliding = false;\n                mSrcX = ev.getX();\n                break;\n        }\n        return isSliding;\n    }\n\n    public void setSlide(boolean enable) {\n        mSlidable = enable;\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        d(\"UIView\", \"event:\" + event.toString());\n        final int action = event.getAction();\n        switch (action) {\n            case MotionEvent.ACTION_DOWN:\n                mSrcX = event.getX();\n                // TODO after left menu drag outside screen, the menu is somewhat invisible while drag in again?\n                mLeftView.setVisibility(VISIBLE);\n                invalidate();\n                break;\n            case MotionEvent.ACTION_MOVE:\n                float dx = event.getX() - mSrcX;\n                int x = mLeftView.getLeft();\n                if (dx != 0) {\n                    if (dx + x > 0) {\n                        dx = 0 - x;\n                    }\n                    mLeftView.offsetLeftAndRight((int) dx);\n                    mSrcX = event.getX();\n                }\n                break;\n            case MotionEvent.ACTION_UP:\n            case MotionEvent.ACTION_CANCEL:\n                int currentX = mLeftView.getLeft();\n                if (currentX + event.getX() - mSrcX >= -mLeftViewWidth / 2.0) {\n                    int duration = (int) (Math.abs(0 - currentX + 0.5f) / mLeftViewWidth * 1000);\n                    mScroller.startScroll(currentX, 0, 0 - currentX, 0, duration);\n                } else {\n                    int duration = (int) (Math.abs(-mLeftViewWidth - currentX + 0.5f) / mLeftViewWidth * 1000);\n                    mScroller.startScroll(currentX, 0, -mLeftViewWidth - currentX, 0, duration);\n                }\n                invalidate();\n                break;\n        }\n        return true;\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        int count = getChildCount();\n        for (int i = 0; i < count; i++) {\n            View child = getChildAt(i);\n            if (child.getVisibility() == GONE) continue;\n            final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n            if (child.getId() == R.id.menu) {\n                final int childWidth = child.getMeasuredWidth();\n                final int childHeight = child.getMeasuredHeight();\n                int childLeft = 0;\n                child.layout(childLeft, lp.topMargin, childLeft + childWidth, lp.topMargin + childHeight);\n                child.offsetLeftAndRight(-mLeftViewWidth);\n            } else if (child.getId() == R.id.main) {\n                child.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight());\n            }\n        }\n    }\n\n    Drawable mShadowLeft;// = new ColorDrawable(Color.RED);\n    private static final int DEFAULT_SCRIM_COLOR = 0x99000000;\n    private int mScrimColor = DEFAULT_SCRIM_COLOR;\n    private float mScrimOpacity;\n    private Paint mScrimPaint = new Paint();\n    float alpha;\n\n  /*  @Override\n    protected boolean drawChild(Canvas canvas, View child, long drawingTime) {\n        boolean result = super.drawChild(canvas, child, drawingTime);\n\n        if (child.getId() == R.id.main) {\n            int clipLeft = 0, clipRight = getWidth();\n            final int baseAlpha = (mScrimColor & 0xff000000) >>> 24;\n\n//            final int imag = (int) (baseAlpha * mScrimOpacity);\n//            final int color = imag << 24 | (mScrimColor & 0xffffff);\n            mScrimPaint.setColor(Color.argb((int) (255 * alpha * 0xff), 0, 0, 0));\n            canvas.drawRect(clipLeft, 0, clipRight, getHeight(), mScrimPaint);\n        } else if (child.getId() == R.id.menu) {\n            final int shadowWidth = mShadowLeft.getIntrinsicWidth();\n            final int childRight = child.getRight();\n            final int drawerPeekDistance = mLeftViewWidth;\n            alpha =\n                    Math.max(0, Math.min((float) childRight / drawerPeekDistance, 1.f));\n            mShadowLeft.setBounds(childRight, child.getTop(),\n                    childRight + shadowWidth, child.getBottom());\n            mShadowLeft.setAlpha((int) (0xff * alpha));\n            mShadowLeft.draw(canvas);\n        }\n        return result;\n    }*/\n\n    boolean isContentView(View child) {\n        return ((LayoutParams) child.getLayoutParams()).gravity == Gravity.NO_GRAVITY;\n    }\n\n    boolean isDrawerView(View child) {\n        final int gravity = ((LayoutParams) child.getLayoutParams()).gravity;\n//        final int absGravity = GravityCompat.getAbsoluteGravity(gravity,\n//                ViewCompat.getLayoutDirection(child));\n//        return (absGravity & (Gravity.LEFT | Gravity.RIGHT)) != 0;\n        return gravity == Gravity.LEFT || gravity == Gravity.RIGHT;\n    }\n\n    public void showMenuSmoothly() {\n        mScroller.startScroll(mLeftViewWidth, 0, -mLeftViewWidth, 0, 1000);\n        invalidate();\n    }\n\n    public void dismissSmoothly() {\n        int start = mScroller.getCurrX();\n        mScroller.startScroll(start, 0, mLeftViewWidth - start, 0, 1000);\n        invalidate();\n    }\n\n    public void setMenuView(View view) {\n        if (mLeftView instanceof ViewGroup) {\n            ((ViewGroup) mLeftView).removeAllViews();\n            ((ViewGroup) mLeftView).addView(view);\n            requestLayout();\n        }\n    }\n\n    public void setContentView(View view) {\n        if (mContentView instanceof ViewGroup) {\n            ((ViewGroup) mContentView).removeAllViews();\n            ((ViewGroup) mContentView).addView(view);\n            requestLayout();\n        }\n    }\n\n    @Override\n    public void computeScroll() {\n        if (mScroller.computeScrollOffset()) {\n            int oldLeft = mLeftView.getLeft();\n            int left = mScroller.getCurrX();\n            if (oldLeft != mScroller.getFinalX()) {\n                int xOffset = left - oldLeft;\n                int dx = xOffset + oldLeft;\n                if (dx > 0) {\n                    xOffset = 0 - oldLeft;\n                } else if (dx < -mLeftViewWidth) {\n                    xOffset = -mLeftViewWidth - oldLeft;\n                }\n                mLeftView.offsetLeftAndRight(xOffset);\n                onScrollChanged(left, 0, oldLeft, 0);\n            }\n            invalidate();\n        } else {\n            mScroller.abortAnimation();\n        }\n    }\n\n    private void d(String tag, String text) {\n//        if (BuildConfig.DEBUG) {\n        Log.d(tag, text);\n//        }\n    }\n\n    /**\n     * This is called in response to an internal scroll in this view (i.e., the\n     * view scrolled its own contents). This is typically as a result of\n     * {@link #scrollBy(int, int)} or {@link #scrollTo(int, int)} having been\n     * called.\n     *\n     * @param l    Current horizontal scroll origin.\n     * @param t    Current vertical scroll origin.\n     * @param oldl Previous horizontal scroll origin.\n     * @param oldt Previous vertical scroll origin.\n     */\n    protected void onScrollChanged(int l, int t, int oldl, int oldt) {\n\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/ExProgressView.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.animation.ObjectAnimator;\nimport android.animation.ValueAnimator;\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Rect;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.Property;\nimport android.util.TypedValue;\nimport android.view.View;\nimport android.view.animation.Animation;\nimport android.view.animation.LinearInterpolator;\n\n/**\n * Created by aven on 10/20/15.\n */\n@TargetApi(14)\npublic class ExProgressView extends View {\n    Paint mPaint;\n    Rect mRect;\n    int mRectWidth;\n    int mRectHeight;\n    int mGap;\n    int[] mIndexArray = {-2, -1, 0, 1, 2};\n    int mCurrentIndex = 4;\n\n    public ExProgressView(Context context) {\n        this(context, null);\n    }\n\n    public ExProgressView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n\n        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mPaint.setColor(Color.GREEN);\n        mRect = new Rect();\n        mRectWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20,\n                getContext().getResources().getDisplayMetrics());\n        mRectHeight = 4 * mRectWidth;\n        mGap = (int) (mRectWidth * 0.8f);\n        ObjectAnimator animator = ObjectAnimator.ofInt(this, mIndex, 0, 1, 2, 3, 4, 5);\n        animator.setInterpolator(new LinearInterpolator());\n        animator.setDuration(750);\n        animator.setRepeatMode(Animation.RESTART);\n        animator.setRepeatCount(Animation.INFINITE);\n        animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n            @Override\n            public void onAnimationUpdate(ValueAnimator animation) {\n                invalidate();\n            }\n        });\n        animator.start();\n    }\n\n    public int getmCurrentIndex() {\n        return mCurrentIndex;\n    }\n\n    public void setmCurrentIndex(int mCurrentIndex) {\n        this.mCurrentIndex = mCurrentIndex;\n    }\n\n    Property<ExProgressView, Integer> mIndex = new Property<ExProgressView, Integer>(Integer.class, \"mCurrentIndex\") {\n        @Override\n        public Integer get(ExProgressView object) {\n            return object.getmCurrentIndex();\n        }\n\n        @Override\n        public void set(ExProgressView object, Integer value) {\n            object.setmCurrentIndex(value);\n        }\n    };\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n        if (mRect.width() > 0 && mRect.height() > 0) {\n            for (int index : mIndexArray) {\n                float[] t = getRectByIndex(mRect, index);\n                if (index == mIndexArray[mCurrentIndex]) {\n                    t[1] = mRect.top;\n                    t[3] = mRect.bottom;\n                    Log.d(\"Index\", \"value=\" + index);\n                }\n                canvas.drawRect(t[0], t[1], t[2], t[3], mPaint);\n            }\n        }\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n        Rect rect = mRect;\n        final int centerX = getMeasuredWidth() / 2;\n        final int centerY = getMeasuredHeight() / 2;\n        rect.left = centerX - mRectWidth / 2;\n        rect.right = centerX + mRectWidth / 2;\n        rect.top = centerY - mRectHeight / 2;\n        rect.bottom = centerY + mRectHeight / 2;\n    }\n\n    private float[] getRectByIndex(Rect rect, int index) {\n        final float diffX = index * (mRectWidth + mGap);\n        final float diffY = index * (mRectHeight * 0.15f);\n        return new float[]{\n                rect.left + diffX,\n                rect.top + Math.abs(diffY),\n                rect.right + diffX,\n                rect.bottom - Math.abs(diffY)\n        };\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/ExTextView.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.animation.ValueAnimator;\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.drawable.Drawable;\nimport android.text.Html;\nimport android.text.TextUtils;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.view.View;\nimport android.view.animation.DecelerateInterpolator;\nimport android.widget.TextView;\n\nimport net.avenwu.support.R;\n\nimport java.io.UnsupportedEncodingException;\nimport java.lang.reflect.Field;\n\n/**\n * Created by chaobin on 11/18/15.\n */\n@TargetApi(11)\npublic class ExTextView extends TextView implements View.OnClickListener, ValueAnimator.AnimatorUpdateListener {\n\n    static final String TAG = ExTextView.class.getCanonicalName();\n    static final int END = 0;\n    static final int RIGHT = 1;\n\n    int mMaxHeight;\n    int mCollapsedHeight;\n    int mMaxLine;\n    boolean isCollapsed;\n    boolean isLayout = false;\n    boolean isMeasured = false;\n\n    ValueAnimator mExpandAnimator;\n    CharSequence mCollapsedText;\n    CharSequence mFullText;\n\n    Drawable mIndicator;\n    OnClickListener mOuterListener;\n    Style mStyle;\n\n    public ExTextView(Context context) {\n        this(context, null);\n    }\n\n    public ExTextView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ExTextView);\n        isCollapsed = a.getBoolean(R.styleable.ExTextView_expand_collapse_default, true);\n        mIndicator = a.getDrawable(R.styleable.ExTextView_expand_indicator);\n        if (mIndicator != null) {\n            mIndicator.setBounds(0, 0, mIndicator.getIntrinsicWidth(), mIndicator.getIntrinsicHeight\n                ());\n        }\n        int style = a.getInt(R.styleable.ExTextView_expand_style, 0);\n        switch (style) {\n            case END:\n                mStyle = new EndStyle();\n                break;\n            case RIGHT:\n                mStyle = new RightStyle();\n                break;\n        }\n        a.recycle();\n        reflectMaxLines();\n        super.setOnClickListener(this);\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        Log.d(TAG, \"onMeasure\");\n        if (!TextUtils.isEmpty(mFullText) && !isMeasured) {\n            Log.d(TAG, \"onMeasure isCollapsed=\" + isCollapsed);\n            if (isCollapsed) {\n                setMaxLines(Integer.MAX_VALUE);\n                super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n                mMaxHeight = getMeasuredHeight();\n\n                setMaxLines(mMaxLine);\n                super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n                mCollapsedHeight = getMeasuredHeight();\n            } else {\n                setMaxLines(mMaxLine);\n                super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n                mCollapsedHeight = getMeasuredHeight();\n\n                setMaxLines(Integer.MAX_VALUE);\n                super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n                mMaxHeight = getMeasuredHeight();\n            }\n            isMeasured = true;\n        } else {\n            super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n        }\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        if (!TextUtils.isEmpty(mFullText) && (!isLayout && isExpandable())) {\n            Log.d(TAG, \"onLayout reset text\");\n            mStyle.onLayout(isCollapsed, this, mIndicator);\n            if (isCollapsed) {\n                if (mCollapsedText == null) {\n                    mCollapsedText = mStyle.collapsedText(this, mIndicator, mFullText, mMaxLine);\n                }\n                super.setText(mCollapsedText, reflectCurrentBufferType());\n            } else {\n                super.setText(mFullText, reflectCurrentBufferType());\n            }\n            isLayout = true;\n        } else {\n            super.onLayout(changed, left, top, right, bottom);\n        }\n    }\n\n    private void reflectMaxLines() {\n        try {\n            Field maximumField = TextView.class.getDeclaredField(\"mMaximum\");\n            maximumField.setAccessible(true);\n            mMaxLine = maximumField.getInt(this);\n        } catch (NoSuchFieldException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n    }\n\n    private BufferType reflectCurrentBufferType() {\n        try {\n            Field field = TextView.class.getDeclaredField(\"mBufferType\");\n            field.setAccessible(true);\n            return (BufferType) field.get(this);\n        } catch (NoSuchFieldException e) {\n            e.printStackTrace();\n        } catch (IllegalAccessException e) {\n            e.printStackTrace();\n        }\n        return BufferType.NORMAL;\n    }\n\n    @Override\n    public void setText(CharSequence text, BufferType type) {\n        //view 复用的时候会重复绑定数据\n        if (TextUtils.isEmpty(text)) {\n            super.setText(text, type);\n        } else if (text.equals(mFullText)) {\n            super.setText(isCollapsed ? mCollapsedText : mFullText, reflectCurrentBufferType());\n        } else {\n            mFullText = text;\n            mCollapsedText = null;\n            isLayout = false;\n            isMeasured = false;\n            super.setText(mFullText, type);\n        }\n    }\n\n    @Override\n    public void onClick(View v) {\n        if (mOuterListener != null) {\n            mOuterListener.onClick(v);\n        }\n        if (!isExpandable()) {\n            return;\n        }\n        if (mExpandAnimator != null) {\n            mExpandAnimator.end();\n        }\n        isLayout = false;\n        int from = getHeight();\n        int to;\n        if (from < mMaxHeight) {\n            to = mMaxHeight;\n            isCollapsed = false;\n            setMaxLines(Integer.MAX_VALUE);\n        } else {\n            to = mCollapsedHeight;\n            isCollapsed = true;\n            setMaxLines(mMaxLine);\n        }\n        if (mExpandAnimator == null) {\n            mExpandAnimator = ValueAnimator.ofInt(from, to);\n            mExpandAnimator.setInterpolator(new DecelerateInterpolator());\n            mExpandAnimator.addUpdateListener(this);\n        } else {\n            mExpandAnimator.setIntValues(from, to);\n        }\n        mExpandAnimator.start();\n    }\n\n    @Override\n    public void onAnimationUpdate(ValueAnimator animation) {\n        getLayoutParams().height = (Integer) animation.getAnimatedValue();\n        requestLayout();\n    }\n\n    private boolean isExpandable() {\n        return mCollapsedHeight != mMaxHeight;\n    }\n\n\n    @Override\n    public void setOnClickListener(OnClickListener listener) {\n        mOuterListener = listener;\n    }\n\n    public interface Style {\n\n        CharSequence collapsedText(TextView textView, Drawable drawable, CharSequence text, int\n            maxLine);\n\n        void onLayout(boolean collapsed, TextView textView, Drawable drawable);\n    }\n\n    private static class EndStyle implements Style {\n        static final String HTML_IMG = \"...<img src='icon'/>\";\n        static final String HTML_NEW_LINE = \"<br>\";\n\n        @Override\n        public CharSequence collapsedText(TextView view, final Drawable drawable, CharSequence text,\n                                          int maxLine) {\n            StringBuilder stringBuilder = new StringBuilder();\n            int start = 0;\n            // 由于中英文字符等排版问题断行具有不确定性，此处强行对缩略文本断行\n            for (int i = 0; i < maxLine; i++) {\n                int end = view.getLayout().getLineVisibleEnd(i);\n                String append;\n                if (i == maxLine - 1) {\n                    end -= 3;\n                    append = HTML_IMG;\n                } else {\n                    append = HTML_NEW_LINE;\n                }\n                stringBuilder.append(text.subSequence(start, end)).append(append);\n                start = end;\n            }\n            String subString = stringBuilder.toString();\n            return Html.fromHtml(subString, new Html.ImageGetter() {\n                @Override\n                public Drawable getDrawable(String source) {\n                    return \"icon\".equals(source) ? drawable : null;\n                }\n            }, null);\n        }\n\n        @Override\n        public void onLayout(boolean collapsed, TextView textView, Drawable drawable) {\n        }\n    }\n\n    private static class RightStyle implements Style {\n        @Override\n        public CharSequence collapsedText(TextView view, Drawable drawable, CharSequence text,\n                                          int maxLine) {\n            int end = view.getLayout().getLineVisibleEnd(maxLine - 1);\n            return text.subSequence(0, end - 3) + \"...\";\n        }\n\n        @Override\n        public void onLayout(boolean collapsed, TextView textView, Drawable drawable) {\n            Drawable[] d = textView.getCompoundDrawables();\n            if (collapsed) {\n                d[2] = drawable;\n            } else {\n                d[2] = null;\n            }\n            textView.setCompoundDrawables(d[0], d[1], d[2], d[3]);\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/FlatTabGroup.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.ColorStateList;\nimport android.content.res.TypedArray;\nimport android.graphics.Color;\nimport android.graphics.drawable.Drawable;\nimport android.graphics.drawable.GradientDrawable;\nimport android.graphics.drawable.StateListDrawable;\nimport android.util.AttributeSet;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.RadioButton;\nimport android.widget.RadioGroup;\n\nimport net.avenwu.support.R;\n\nimport java.util.concurrent.atomic.AtomicInteger;\n\n/**\n * Created by chaobin on 2/4/15.\n */\npublic class FlatTabGroup extends RadioGroup implements RadioGroup.OnCheckedChangeListener {\n    public FlatTabGroup(Context context) {\n        this(context, null);\n    }\n\n    private int mRadius;\n    private int mStroke;\n    private int mHighlightColor;\n    private String[] mItemString;\n    private float mTextSize;\n    private ColorStateList mTextColor;\n    private int[] mTabViewIds;\n    private OnTabCheckedListener mTabCheckedListener;\n    private OnCheckedChangeListener mListener;\n\n    public FlatTabGroup(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        setOrientation(HORIZONTAL);\n        setGravity(Gravity.CENTER_VERTICAL);\n        TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.FlatTabGroup);\n        mHighlightColor = array.getColor(R.styleable.FlatTabGroup_tab_border_color, Color.WHITE);\n        mStroke = array.getDimensionPixelSize(R.styleable.FlatTabGroup_tab_border_width, 2);\n        mRadius = array.getDimensionPixelOffset(R.styleable.FlatTabGroup_tab_radius, 5);\n        mTextColor = array.getColorStateList(R.styleable.FlatTabGroup_tab_textColor);\n        mTextSize = array.getDimensionPixelSize(R.styleable.FlatTabGroup_tab_textSize, 14);\n        int id = array.getResourceId(R.styleable.FlatTabGroup_tab_items, 0);\n        mItemString = isInEditMode() ? new String[]{\"TAB A\", \"TAB B\", \"TAB C\"} : context.getResources().getStringArray(id);\n        generateTabView(context, attrs);\n        updateChildBackground();\n        array.recycle();\n        super.setOnCheckedChangeListener(this);\n    }\n\n    private void generateTabView(Context context, AttributeSet attrs) {\n        if (mItemString == null) {\n            return;\n        }\n        mTabViewIds = new int[mItemString.length];\n        int i = 0;\n        for (String text : mItemString) {\n            RadioButton button = new RadioButton(context, attrs);\n            button.setGravity(Gravity.CENTER);\n            button.setButtonDrawable(android.R.color.transparent);\n            button.setText(text);\n            button.setTextColor(mTextColor);\n            button.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);\n            int id = generateViewId();\n            button.setId(mTabViewIds[i++] = id);\n            addView(button, new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 1));\n        }\n    }\n\n    public void setOnTabCheckedListener(OnTabCheckedListener listener) {\n        mTabCheckedListener = listener;\n    }\n\n    public void setSelection(int position) {\n        check(getChildAt(position).getId());\n    }\n\n    @Override\n    public void onCheckedChanged(RadioGroup group, int checkedId) {\n        if (mListener != null) {\n            mListener.onCheckedChanged(group, checkedId);\n        }\n        if (mTabCheckedListener != null) {\n            int checkedPosition = -1;\n            for (int i = 0; i < mTabViewIds.length; i++) {\n                if (mTabViewIds[i] == checkedId) {\n                    checkedPosition = i;\n                    break;\n                }\n            }\n            mTabCheckedListener.onChecked(this, checkedPosition);\n        }\n    }\n\n    /**\n     * use {@linkplain #setOnTabCheckedListener(net.avenwu.support.widget.FlatTabGroup.OnTabCheckedListener)} instead\n     */\n    @Deprecated()\n    @Override\n    public void setOnCheckedChangeListener(OnCheckedChangeListener listener) {\n        mListener = listener;\n    }\n\n    @Override\n    protected void onFinishInflate() {\n        super.onFinishInflate();\n        updateChildBackground();\n    }\n\n    private void updateChildBackground() {\n        for (int i = 0; i < getChildCount(); i++) {\n            View child = getChildAt(i);\n            if (child instanceof RadioButton) {\n                child.setBackgroundDrawable(generateTabBackground(i, mHighlightColor));\n            }\n        }\n    }\n\n    private Drawable generateTabBackground(int position, int color) {\n        StateListDrawable stateListDrawable = new StateListDrawable();\n        stateListDrawable.addState(new int[]{android.R.attr.state_checked}, generateDrawable(position, color));\n        stateListDrawable.addState(new int[]{}, generateDrawable(position, Color.TRANSPARENT));\n        return stateListDrawable;\n    }\n\n    private Drawable generateDrawable(int position, int color) {\n        float[] radius;\n        if (position == 0) {\n            radius = new float[]{\n                    mRadius, mRadius,\n                    0, 0,\n                    0, 0,\n                    mRadius, mRadius\n            };\n        } else if (position == getChildCount() - 1) {\n            radius = new float[]{\n                    0, 0,\n                    mRadius, mRadius,\n                    mRadius, mRadius,\n                    0, 0\n            };\n        } else {\n            radius = new float[]{\n                    0, 0,\n                    0, 0,\n                    0, 0,\n                    0, 0\n            };\n        }\n        GradientDrawable shape = new GradientDrawable();\n        shape.setCornerRadii(radius);\n        shape.setColor(color);\n        shape.setStroke(mStroke, mHighlightColor);\n        return shape;\n    }\n\n    private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);\n\n    /**\n     * Generate a value suitable for use in {@link #setId(int)}.\n     * This value will not collide with ID values generated at build time by aapt for R.id.\n     *\n     * @return a generated ID value\n     */\n    public static int generateViewId() {\n        for (; ; ) {\n            final int result = sNextGeneratedId.get();\n            // aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n            int newValue = result + 1;\n            if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.\n            if (sNextGeneratedId.compareAndSet(result, newValue)) {\n                return result;\n            }\n        }\n    }\n\n    public static interface OnTabCheckedListener {\n        public void onChecked(FlatTabGroup group, int position);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/FlipLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Camera;\nimport android.graphics.Matrix;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.animation.AccelerateInterpolator;\nimport android.view.animation.Animation;\nimport android.view.animation.DecelerateInterpolator;\nimport android.view.animation.Transformation;\nimport android.widget.FrameLayout;\n\n/**\n * Created by aven on 1/19/16.\n */\npublic class FlipLayout extends FrameLayout {\n    View mFrontView;\n    View mBackView;\n    boolean isFlipping = false;\n\n    public FlipLayout(Context context) {\n        this(context, null);\n    }\n\n    public FlipLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    @Override\n    public void addView(View child, int index, ViewGroup.LayoutParams params) {\n        if (getChildCount() > 1) {\n            throw new IllegalArgumentException(\"FlipLayout can only have to child view\");\n        }\n        super.addView(child, index, params);\n        if (mBackView == null) {\n            mBackView = child;\n        } else {\n            mFrontView = child;\n        }\n    }\n\n    public void setViewOrder(View front, View back) {\n        mFrontView = front;\n        mBackView = back;\n        mFrontView.setVisibility(VISIBLE);\n        mBackView.setVisibility(INVISIBLE);\n    }\n\n    /**\n     * toggle the flip state\n     */\n    public void flip() {\n        if (isFlipping) {\n            return;\n        }\n        mBackView.setVisibility(GONE);\n        mFrontView.setVisibility(VISIBLE);\n        final float centerX = mFrontView.getWidth() / 2f;\n        final float centerY = mFrontView.getHeight() / 2f;\n        final FlipAnimation frontViewAnimation = new FlipAnimation(centerX, centerY, true);\n        frontViewAnimation.setDuration(500);\n        frontViewAnimation.setFillAfter(true);\n        frontViewAnimation.setInterpolator(new AccelerateInterpolator());\n        frontViewAnimation.setAnimationListener(new SimpleAnimationListener() {\n            @Override\n            public void onAnimationEnd(Animation animation) {\n                mBackView.setVisibility(VISIBLE);\n                mFrontView.setVisibility(INVISIBLE);\n                final float centerX = mBackView.getWidth() / 2f;\n                final float centerY = mBackView.getHeight() / 2f;\n                FlipAnimation backViewAnimation = new FlipAnimation(centerX, centerY, false);\n                backViewAnimation.setDuration(500);\n                backViewAnimation.setFillAfter(true);\n                backViewAnimation.setInterpolator(new DecelerateInterpolator());\n                backViewAnimation.setAnimationListener(new SimpleAnimationListener() {\n                    @Override\n                    public void onAnimationEnd(Animation animation) {\n                        View temp = mFrontView;\n                        mFrontView = mBackView;\n                        mBackView = temp;\n                        isFlipping = false;\n                    }\n                });\n                mBackView.startAnimation(backViewAnimation);\n            }\n        });\n        mFrontView.startAnimation(frontViewAnimation);\n        isFlipping = true;\n    }\n\n    private static class FlipAnimation extends Animation {\n        private final float mFrom;\n        private final float mTo;\n        private final float mCenterX;\n        private final float mCenterY;\n        private final float SCALE_DEFAULT = 0.618f;\n        private final float ALPHA_DEFAULT = 0.8f;\n        private Camera mCamera;\n        private boolean mScaleDown;\n\n        public FlipAnimation(float mCenterX, float mCenterY, boolean scaleDown) {\n            this.mCenterX = mCenterX;\n            this.mCenterY = mCenterY;\n            mScaleDown = scaleDown;\n            if (scaleDown) {\n                this.mFrom = 0;\n                this.mTo = 90;\n            } else {\n                this.mFrom = -90;\n                this.mTo = 0;\n            }\n        }\n\n        @Override\n        public void initialize(int width, int height, int parentWidth, int parentHeight) {\n            super.initialize(width, height, parentWidth, parentHeight);\n            mCamera = new Camera();\n        }\n\n        @Override\n        protected void applyTransformation(float interpolatedTime, Transformation t) {\n            float degree = mFrom + (mTo - mFrom) * interpolatedTime;\n            float scale = mScaleDown ? (1 - (1 - SCALE_DEFAULT) * interpolatedTime) :\n                    (SCALE_DEFAULT + (1 - SCALE_DEFAULT) * interpolatedTime);\n            float alpha = mScaleDown ? (1 - (1 - ALPHA_DEFAULT) * interpolatedTime) :\n                    (ALPHA_DEFAULT + (1 - ALPHA_DEFAULT) * interpolatedTime);\n            t.setAlpha(alpha);\n\n            final Matrix matrix = t.getMatrix();\n            mCamera.save();\n            mCamera.rotateY(degree);\n            mCamera.getMatrix(matrix);\n            mCamera.restore();\n\n            matrix.preTranslate(-mCenterX, -mCenterY);\n            matrix.postTranslate(mCenterX, mCenterY);\n            matrix.preScale(scale, scale, mCenterX, mCenterY);\n        }\n    }\n\n    private static class SimpleAnimationListener implements Animation.AnimationListener {\n        @Override\n        public void onAnimationStart(Animation animation) {\n\n        }\n\n        @Override\n        public void onAnimationEnd(Animation animation) {\n\n        }\n\n        @Override\n        public void onAnimationRepeat(Animation animation) {\n\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/MatrixFrameLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Camera;\nimport android.graphics.Canvas;\nimport android.graphics.Matrix;\nimport android.graphics.Paint;\nimport android.graphics.PaintFlagsDrawFilter;\nimport android.util.AttributeSet;\nimport android.view.animation.Transformation;\nimport android.widget.FrameLayout;\n\n/**\n * Created by aven on 1/20/16.\n */\npublic class MatrixFrameLayout extends FrameLayout {\n    Camera mCamera = new Camera();\n    Transformation mTransformation = new Transformation();\n    private PaintFlagsDrawFilter mPaintFlagsDrawFilter = new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);\n\n    public MatrixFrameLayout(Context context) {\n        this(context, null);\n    }\n\n    public MatrixFrameLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        setWillNotDraw(false);\n    }\n\n    @Override\n    public void draw(Canvas canvas) {\n        mTransformation.clear();\n        mTransformation.setTransformationType(Transformation.TYPE_MATRIX);\n        Matrix matrix = mTransformation.getMatrix();\n        float degree = 15;\n        mCamera.save();\n        mCamera.rotateY(degree);\n        mCamera.getMatrix(matrix);\n        mCamera.restore();\n\n        final float centerY = getHeight() / 2f;\n        matrix.preTranslate(0, -centerY);\n        matrix.postTranslate(0, centerY);\n\n        canvas.save();\n        canvas.concat(mTransformation.getMatrix());\n        canvas.setDrawFilter(mPaintFlagsDrawFilter);\n        super.draw(canvas);\n        canvas.restore();\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/PolygonWithQuadraticBezirView.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.util.AttributeSet;\nimport android.util.DisplayMetrics;\nimport android.util.TypedValue;\nimport android.view.View;\n\n/**\n * Created by chaobin on 12/25/14.\n */\npublic class PolygonWithQuadraticBezirView extends View {\n    Paint mCirclePaint;\n    float mPointOneX;\n    float mPointOneY;\n    float mPointTwoX;\n    float mPointTwoY;\n    float mPointOneRadius;\n    float mPointTwoRadius;\n    Path mPath;\n    Paint mShape;\n    float MAX_HORIZOTNAL_DISTANCE;\n    float MAX_VERTICAL_DISTANCE;\n\n    public PolygonWithQuadraticBezirView(Context context) {\n        this(context, null);\n    }\n\n    public PolygonWithQuadraticBezirView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public PolygonWithQuadraticBezirView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n        mCirclePaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mCirclePaint.setColor(0xff00bcd4);\n        DisplayMetrics metrics = context.getResources().getDisplayMetrics();\n        MAX_HORIZOTNAL_DISTANCE = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 240, metrics);\n        MAX_VERTICAL_DISTANCE = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, metrics);\n\n        mPointOneX = MAX_VERTICAL_DISTANCE * 0.4f;\n        mPointOneY = mPointOneX;\n        mPointTwoX = mPointOneX * 1.75f;\n        mPointTwoY = MAX_HORIZOTNAL_DISTANCE * 0.5f;\n        mPointOneRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, metrics);\n        mPointTwoRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, metrics);\n        mPath = new Path();\n        mShape = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mShape.setColor(Color.RED);\n        mShape.setStyle(Paint.Style.STROKE);\n        mShape.setStrokeWidth(1);\n\n    }\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        super.onDraw(canvas);\n        canvas.drawColor(Color.TRANSPARENT);\n        canvas.drawCircle(mPointOneX, mPointOneY, mPointOneRadius, mCirclePaint);\n        canvas.drawCircle(mPointTwoX, mPointTwoY, mPointTwoRadius, mCirclePaint);\n        mPath.reset();\n        float d = (float) Math.sqrt(Math.pow(mPointTwoX - mPointOneX, 2) + Math.pow(mPointTwoY - mPointOneY, 2));\n        float midX = (mPointOneX + mPointTwoX) / 2.0f;\n        float midY = (mPointOneY + mPointTwoY) / 2.0f;\n        float k = (mPointTwoY - mPointOneY) / (mPointTwoX - mPointOneX);\n\n        float offsetX = (float) (mPointOneRadius * Math.sin(Math.atan(k)));\n        float offsetY = (float) (mPointOneRadius * Math.cos(Math.atan(k)));\n        float offsetX2 = (float) (mPointTwoRadius * Math.sin(Math.atan(k)));\n        float offsetY2 = (float) (mPointTwoRadius * Math.cos(Math.atan(k)));\n        float x1 = mPointOneX - offsetX;\n        float y1 = mPointOneY + offsetY;\n\n        float x2 = mPointTwoX - offsetX2;\n        float y2 = mPointTwoY + offsetY2;\n\n        float x3 = mPointTwoX + offsetX2;\n        float y3 = mPointTwoY - offsetY2;\n\n        float x4 = mPointOneX + offsetX;\n        float y4 = mPointOneY - offsetY;\n        mPath.moveTo(x1, y1);\n        mPath.quadTo(midX, midY, x2, y2);\n        mPath.lineTo(x3, y3);\n        mPath.quadTo(midX, midY, x4, y4);\n        mPath.lineTo(x1, y1);\n        canvas.drawPath(mPath, mShape);\n    }\n\n    public void setFilled(boolean fill) {\n        if (fill) {\n            mShape.setStyle(Paint.Style.FILL);\n            mShape.setColor(mCirclePaint.getColor());\n        } else {\n            mShape.setStyle(Paint.Style.STROKE);\n            mShape.setColor(Color.RED);\n        }\n        invalidate();\n    }\n\n    public void moveHorizontal(float percent) {\n        mPointTwoX = MAX_HORIZOTNAL_DISTANCE * percent;\n        invalidate();\n    }\n\n    public void moveVertical(float percent) {\n        mPointTwoY = MAX_VERTICAL_DISTANCE * percent;\n        invalidate();\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/RefreshLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.util.Log;\nimport android.util.TypedValue;\nimport android.view.Gravity;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewConfiguration;\nimport android.view.ViewGroup;\nimport android.view.animation.BounceInterpolator;\nimport android.widget.BaseAdapter;\nimport android.widget.FrameLayout;\nimport android.widget.LinearLayout;\nimport android.widget.ListAdapter;\nimport android.widget.ListView;\nimport android.widget.Scroller;\nimport android.widget.TextView;\n\n/**\n * Created by Chaobin Wu on 2014/10/10.\n */\npublic class RefreshLayout extends LinearLayout {\n\tprivate FrameLayout mHeaderLayout;\n\tprivate ListView mListView;\n\tprivate float mX;\n\tprivate float mY;\n\tprivate Scroller mScroller;\n\tprivate int mPaddingTop = 0;\n\tprivate int MAX_OVER_SCROLL_HEIGHT;\n\tboolean isSliding = false;\n\tint touchSlop;\n\n\tpublic RefreshLayout(Context context) {\n\t\tthis(context, null);\n\t}\n\n\tpublic RefreshLayout(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tsetOrientation(VERTICAL);\n\t\tViewConfiguration configuration = ViewConfiguration.get(getContext());\n\t\ttouchSlop = configuration.getScaledTouchSlop();\n\t\tmScroller = new Scroller(context, new BounceInterpolator());\n\t\tmHeaderLayout = new FrameLayout(context);\n\t\tLayoutParams layoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\t\tlayoutParams.gravity = Gravity.CENTER_HORIZONTAL;\n\t\tmHeaderLayout.setLayoutParams(layoutParams);\n\t\tmHeaderLayout.setBackgroundColor(getResources().getColor(android.R.color.holo_orange_dark));\n\t\taddView(mHeaderLayout);\n\t\t//TODO add text header\n\t\tTextView textView = new TextView(context);\n\t\ttextView.setText(\"This is header layout content\");\n\t\tint height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, getResources().getDisplayMetrics());\n\t\tLayoutParams textParams = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, height);\n\t\ttextParams.gravity = Gravity.CENTER;\n\t\ttextView.setLayoutParams(textParams);\n\t\taddHeaderChild(textView);\n\t\tmPaddingTop -= height;\n\t\tsetPadding(0, mPaddingTop, 0, 0);\n\t\tMAX_OVER_SCROLL_HEIGHT = 2 * height;\n\t\tmListView = new ListView(context, attrs);\n\t\tmListView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n\t\taddView(mListView);\n\t}\n\n\tpublic void addHeaderChild(View view) {\n\t\tif (mHeaderLayout != null) {\n\t\t\tmHeaderLayout.addView(view);\n\t\t\trequestLayout();\n\t\t}\n\t}\n\n\tpublic void setAdapter(ListAdapter adapter) {\n\t\tmListView.setAdapter(adapter);\n\t\tif (adapter instanceof BaseAdapter) {\n\t\t\t((BaseAdapter) adapter).notifyDataSetChanged();\n\t\t}\n\t}\n\n\tprivate boolean isFirstItemVisible() {\n\t\tif (null == mListView.getAdapter() || mListView.getAdapter().isEmpty()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn mListView.getFirstVisiblePosition() == 0;\n//\t\t\tif (mListView.getFirstVisiblePosition() <= 1) {\n//\t\t\t\tfinal View firstVisibleChild = mListView.getChildAt(0);\n//\t\t\t\tif (firstVisibleChild != null) {\n//\t\t\t\t\treturn firstVisibleChild.getTop() >= mListView.getTop();\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n//\t\treturn false;\n\t}\n\n\tprivate boolean isLastItemVisible() {\n\t\tif (null == mListView.getAdapter() || mListView.getAdapter().isEmpty()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn mListView.getLastVisiblePosition() == mListView.getAdapter().getCount() - 1;\n\t\t}\n\t}\n\n\tpublic ListView getListView() {\n\t\treturn mListView;\n\t}\n\n\t@Override\n\tpublic boolean onInterceptTouchEvent(MotionEvent ev) {\n\t\tfinal int action = ev.getAction();\n\t\tif (action != MotionEvent.ACTION_DOWN && isSliding) return true;\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\tisSliding = false;\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\tLog.d(\"onInterceptTouchEvent\", \"scrollY=\" + getScrollY() + \", \" + ev.toString());\n\t\t\t\tif (ev.getY() > mY) {\n\t\t\t\t\tif (isFirstItemVisible() && Math.abs(ev.getY() - mY) > touchSlop) {\n\t\t\t\t\t\tmY = ev.getY();\n\t\t\t\t\t\tisSliding = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (getScrollY() < 0) {\n\t\t\t\t\t\tmY = ev.getY();\n\t\t\t\t\t\tisSliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tisSliding = false;\n\t\t\t\tmY = ev.getY();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn isSliding || super.onInterceptTouchEvent(ev);\n\t}\n\n\t@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tLog.d(\"RefreshLayout\", event.toString());\n\t\tboolean eatTouchEvent = false;\n\t\tswitch (event.getAction()) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tmY = event.getY();\n\t\t\t\teatTouchEvent = true;\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\tif (isSliding) {// move down:getScrollY becomes smaller\n\t\t\t\t\tfloat y = event.getY();\n\t\t\t\t\tfloat diff = y - mY;\n\t\t\t\t\tmY = event.getY();\n\t\t\t\t\tif (diff != 0) {\n\t\t\t\t\t\tfloat distance = getScrollY() - diff;\n\t\t\t\t\t\tLog.d(\"RefreshLayout\", \"move, distance=\" + distance + \", getScrollY=\" + getScrollY() + \", diff=\" + diff);\n\t\t\t\t\t\tif (distance > 0) {\n\t\t\t\t\t\t\tdistance = Math.min(distance, MAX_OVER_SCROLL_HEIGHT);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdistance = Math.max(distance, -MAX_OVER_SCROLL_HEIGHT);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscrollTo(getScrollX(), (int) distance);\n\t\t\t\t\t}\n\t\t\t\t\teatTouchEvent = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MotionEvent.ACTION_CANCEL:\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\tif (isSliding) {\n\t\t\t\t\tisSliding = false;\n\t\t\t\t\tmScroller.abortAnimation();\n\t\t\t\t\tint currentY = getScrollY();\n\t\t\t\t\tint desY = -currentY - MAX_OVER_SCROLL_HEIGHT / 2;\n\t\t\t\t\tLog.d(\"RefreshLayout\", \"getScrollY=\" + currentY + \", desY=\" + desY);\n\t\t\t\t\t//current y > 2/3 of max height, scroll to display the whole header\n\t\t\t\t\tif (currentY + event.getY() - mY < -MAX_OVER_SCROLL_HEIGHT / 2) {\n\t\t\t\t\t\tmScroller.startScroll(0, currentY, 0, desY);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmScroller.startScroll(0, currentY, 0, 0 - currentY);\n\t\t\t\t\t}\n\t\t\t\t\tinvalidate();\n\t\t\t\t\teatTouchEvent = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn eatTouchEvent || super.onTouchEvent(event);\n\t}\n\n\t@Override\n\tpublic void computeScroll() {\n\t\tif (mScroller.computeScrollOffset()) {\n\t\t\tint oldY = getScrollY();\n\t\t\tint y = mScroller.getCurrY();\n\t\t\tif (oldY != y) {\n\t\t\t\tscrollTo(0, y);\n\t\t\t}\n\t\t\tinvalidate();\n\t\t} else {\n\t\t\tmScroller.abortAnimation();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/SegmentDrawable.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.graphics.Canvas;\nimport android.graphics.Color;\nimport android.graphics.ColorFilter;\nimport android.graphics.Paint;\nimport android.graphics.Path;\nimport android.graphics.PixelFormat;\nimport android.graphics.Rect;\nimport android.graphics.RectF;\nimport android.graphics.drawable.Drawable;\nimport android.graphics.drawable.StateListDrawable;\n\n/**\n * Segment tab background drawable which can not realized by xml shape drawable\n *\n * @author aven\n */\npublic class SegmentDrawable extends Drawable {\n\n    Paint mPaint;\n    Path mPath;\n    int mStyle;\n    int mCornerRadius = 10;\n\n    public interface Style {\n        int LEFT_EDGE = 0;\n        int MIDDLE = 1;\n        int RIGHT_EDGE = 2;\n    }\n\n    public SegmentDrawable(int style) {\n        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n        mPaint.setColor(Color.RED);\n        mPaint.setStyle(Paint.Style.STROKE);\n        mPaint.setDither(true);\n        mPaint.setStrokeJoin(Paint.Join.ROUND);\n        mPaint.setStrokeCap(Paint.Cap.ROUND);\n        mPath = new Path();\n        mStyle = style;\n    }\n\n    public SegmentDrawable(SegmentDrawable drawable) {\n        mPaint = new Paint(drawable.mPaint);\n        mPath = new Path(drawable.mPath);\n        mStyle = drawable.mStyle;\n        mCornerRadius = drawable.mCornerRadius;\n    }\n\n    public void setStrokeWidth(int px) {\n        mPaint.setStrokeWidth(px);\n    }\n\n    public void setCornerRadius(int radius) {\n        mCornerRadius = radius;\n    }\n\n    public void setColor(int color) {\n        mPaint.setColor(color);\n    }\n\n\n    @Override\n    public void draw(Canvas canvas) {\n        canvas.drawPath(mPath, mPaint);\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.OPAQUE;\n    }\n\n    @Override\n    protected void onBoundsChange(Rect bounds) {\n        super.onBoundsChange(bounds);\n        updateShape();\n    }\n\n    private void updateShape() {\n        Path path = mPath;\n        if (path != null) {\n            path.reset();\n            int width = 2 * mCornerRadius;\n            final Rect r = getBounds();\n            final float strokeWidth = mPaint.getStrokeWidth();\n            switch (mStyle) {\n                case Style.LEFT_EDGE:\n                    RectF topLeftRect = new RectF(strokeWidth, strokeWidth, width, width);\n                    path.arcTo(topLeftRect, 180, 90);\n                    path.lineTo(r.width(), strokeWidth);\n                    path.lineTo(r.width(), r.height() - strokeWidth);\n                    path.lineTo(width + strokeWidth, r.height() - strokeWidth);\n                    RectF BottomLeftRect = new RectF(strokeWidth, r.height() - width - strokeWidth, width, r.height() - strokeWidth);\n                    path.arcTo(BottomLeftRect, 90, 90);\n                    path.close();\n                    break;\n                case Style.MIDDLE:\n                    path.moveTo(0, strokeWidth);\n                    path.lineTo(r.width(), strokeWidth);\n                    path.lineTo(r.width(), r.height() - strokeWidth);\n                    path.lineTo(0, r.height() - strokeWidth);\n                    path.close();\n                    break;\n                case Style.RIGHT_EDGE:\n                    path.moveTo(0, strokeWidth);\n                    path.lineTo(r.width() - width - strokeWidth, strokeWidth);\n                    RectF topRightRect = new RectF(r.width() - width - strokeWidth, strokeWidth, r.width() - strokeWidth, width + strokeWidth);\n                    path.arcTo(topRightRect, 270, 90);\n                    path.lineTo(r.width() - strokeWidth, r.height() - width - strokeWidth);\n                    RectF bottomRightRect = new RectF(r.width() - width - strokeWidth, r.height() - width - strokeWidth, r.width() - strokeWidth, r.height() - strokeWidth);\n                    path.arcTo(bottomRightRect, 0, 90);\n                    path.lineTo(0, r.height() - strokeWidth);\n                    path.close();\n                    break;\n            }\n        }\n    }\n\n    @Override\n    protected SegmentDrawable clone() throws CloneNotSupportedException {\n        return new SegmentDrawable(this);\n    }\n\n    public StateListDrawable newStateListDrawable() {\n        StateListDrawable stateListDrawable = new StateListDrawable();\n        try {\n            SegmentDrawable checked = clone();\n            checked.mPaint.setStyle(Paint.Style.FILL_AND_STROKE);\n            stateListDrawable.addState(new int[]{android.R.attr.state_checked}, checked);\n            stateListDrawable.addState(new int[]{android.R.attr.state_selected}, checked);\n            stateListDrawable.addState(new int[]{}, this);\n        } catch (CloneNotSupportedException e) {\n            e.printStackTrace();\n        }\n        return stateListDrawable;\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/ShaderImageView.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphics.BitmapShader;\nimport android.graphics.BlurMaskFilter;\nimport android.graphics.Canvas;\nimport android.graphics.ColorMatrix;\nimport android.graphics.ColorMatrixColorFilter;\nimport android.graphics.Paint;\nimport android.graphics.PointF;\nimport android.graphics.Shader;\nimport android.util.AttributeSet;\nimport android.view.MotionEvent;\nimport android.widget.ImageView;\n\n/**\n * Reference: http://chiuki.github.io/android-shaders-filters/#/40\n * Created by chaobin on 2/3/15.\n */\npublic class ShaderImageView extends ImageView {\n    Paint paint;\n    boolean shouldDrawOpening = true;\n    PointF mCenterPoint = new PointF();\n\n    public ShaderImageView(Context context) {\n        this(context, null);\n    }\n\n    public ShaderImageView(Context context, AttributeSet attrs) {\n        this(context, attrs, 0);\n    }\n\n    public ShaderImageView(Context context, AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n    }\n\n\n    @Override\n    protected void onDraw(Canvas canvas) {\n        if (paint == null) {\n            Bitmap original = Bitmap.createBitmap(\n                    getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n            Canvas originalCanvas = new Canvas(original);\n            super.onDraw(originalCanvas);\n\n            Shader shader = new BitmapShader(original,\n                    Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);\n\n            paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n            paint.setShader(shader);\n            greyBitmap = drawBitmap(original);\n        }\n        canvas.drawBitmap(greyBitmap, 0, 0, greyPaint);\n        canvas.drawColor(0x99000000);\n        if (shouldDrawOpening) {\n            canvas.drawCircle(mCenterPoint.x, mCenterPoint.y, 50, paint);\n        }\n    }\n\n    Bitmap greyBitmap;\n    Paint greyPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n\n    private Bitmap drawBitmap(Bitmap original) {\n        Bitmap bitmap = Bitmap.createBitmap(original.getWidth(),\n                original.getHeight(), Bitmap.Config.ARGB_8888);\n        Canvas canvas = new Canvas(bitmap);\n\n        Paint paint = new Paint();\n        paint.setColorFilter(new ColorMatrixColorFilter(\n                getColorMatrix()));\n        paint.setMaskFilter(new BlurMaskFilter(200, BlurMaskFilter.Blur.NORMAL));\n        canvas.drawBitmap(original, 0, 0, paint);\n        return bitmap;\n    }\n\n    private ColorMatrix getColorMatrix() {\n        ColorMatrix colorMatrix = new ColorMatrix();\n        colorMatrix.setSaturation(0);\n        return colorMatrix;\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        boolean isPeekThrough = false;\n        switch (event.getAction()) {\n            case MotionEvent.ACTION_DOWN:\n            case MotionEvent.ACTION_MOVE:\n                isPeekThrough = true;\n                mCenterPoint.set(event.getX(), event.getY());\n                invalidate();\n                break;\n        }\n        return isPeekThrough || super.onTouchEvent(event);\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n        super.onLayout(changed, left, top, right, bottom);\n        mCenterPoint.set(getWidth() / 2.0f, getHeight() / 2.0f);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/SimpleTab.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.graphics.drawable.Drawable;\nimport android.support.annotation.DrawableRes;\nimport android.support.annotation.LayoutRes;\nimport android.support.annotation.StringRes;\nimport android.support.v4.app.FragmentTabHost;\nimport android.util.SparseArray;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * Created by aven on 5/3/15.\n */\npublic class SimpleTab {\n    SparseArray<Item> mTabItems = new SparseArray<>();\n    ViewGroup mContentView;\n\n    public void injectInto(ViewGroup parent) {\n        parent.addView(mContentView);\n    }\n\n    public interface OnTabClickListener {\n        void onItemClick(View view, Item item, int position);\n    }\n    public static class Item {\n        private CharSequence mLabel;\n        private Drawable mIcon;\n        private int mLayoutId = -1;\n        private int mLabelId = -1;\n        private int mIconId = -1;\n        private Decorate mDecorate;\n\n        public Item setLabelWithIcon(@StringRes int label, @DrawableRes int\n                drawable) {\n            mLabelId = label;\n            mIconId = drawable;\n            return this;\n        }\n\n        public Item setCustomItemLayout(int layout, Decorate decorate) {\n            mLayoutId = layout;\n            mDecorate = decorate;\n            return this;\n        }\n    }\n\n    public interface Decorate {\n        void onBind(View contentView);\n    }\n\n    private static abstract class SimpleListener implements View.OnClickListener {\n        int mPosition;\n\n        public SimpleListener(int position) {\n            mPosition = position;\n        }\n    }\n\n    public static class Builder {\n        Context mContext;\n        List<Item> mItems;\n        OnTabClickListener mListener;\n\n        public Builder(Context context) {\n            mContext = context;\n            mItems = new ArrayList<Item>();\n        }\n\n        protected SimpleTab bind(SimpleTabLayout layout) {\n            final SimpleTab tab = new SimpleTab();\n            tab.mContentView = layout;\n            init(tab);\n            return tab;\n        }\n\n        public SimpleTab create(@LayoutRes int... layout) {\n            final SimpleTab tab = new SimpleTab();\n            if (layout != null && layout.length > 0) {\n                tab.mContentView = (ViewGroup) View.inflate(mContext, layout[0], null);\n            } else {\n                LinearLayout tabLayout = new LinearLayout(mContext);\n                tabLayout.setOrientation(LinearLayout.HORIZONTAL);\n                tab.mContentView = tabLayout;\n            }\n            init(tab);\n            return tab;\n        }\n\n        private void init(final SimpleTab tab) {\n            for (int i = 0; i < mItems.size(); i++) {\n                Item item = mItems.get(i);\n                tab.mTabItems.put(i, item);\n                if (item.mLayoutId != -1) {\n                    View itemView = View.inflate(mContext, item.mLayoutId, null);\n                    tab.mContentView.addView(itemView);\n                    if (item.mDecorate != null) {\n                        item.mDecorate.onBind(itemView);\n                    }\n                } else {\n                    TextView label = new TextView(mContext);\n                    label.setText(item.mLabelId);\n                    label.setGravity(Gravity.CENTER);\n                    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams\n                            (ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams\n                                    .WRAP_CONTENT);\n                    layoutParams.weight = 1;\n                    label.setCompoundDrawablesWithIntrinsicBounds(0, item.mIconId, 0, 0);\n                    tab.mContentView.addView(label, layoutParams);\n                }\n            }\n\n            int count = tab.mContentView.getChildCount();\n            for (int i = 0; i < count; i++) {\n                View view = tab.mContentView.getChildAt(i);\n                view.setOnClickListener(new SimpleListener(i) {\n                    @Override\n                    public void onClick(View v) {\n                        if (mListener != null) {\n                            mListener.onItemClick(v, tab.mTabItems.get(mPosition), mPosition);\n                        }\n                    }\n                });\n            }\n        }\n\n        public Builder newItem(Item item, int... position) {\n            if (position != null && position.length > 0) {\n                mItems.add(position[0], item);\n            } else {\n                mItems.add(item);\n            }\n            return this;\n        }\n\n        public Builder setOnTabClickListener(OnTabClickListener listener) {\n            mListener = listener;\n            return this;\n        }\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/SimpleTabLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.view.View;\nimport android.widget.LinearLayout;\nimport android.widget.Toast;\n\nimport net.avenwu.support.util.ViewCompat;\n\n/**\n * Created by aven on 5/3/15.\n */\npublic class SimpleTabLayout extends LinearLayout {\n    SimpleTab mSimpleTab;\n\n    public SimpleTabLayout(Context context) {\n        this(context, null);\n    }\n\n    public SimpleTabLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        mSimpleTab = new SimpleTab.Builder(getContext())\n                .newItem(new SimpleTab.Item().setLabelWithIcon(android.R.string.no,\n                        android.R.drawable.ic_delete))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(android.R.string.no,\n                        android.R.drawable.ic_delete))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(android.R.string.no,\n                        android.R.drawable.ic_delete))\n                .newItem(new SimpleTab.Item().setLabelWithIcon(android.R.string.no,\n                        android.R.drawable.ic_delete))\n                .setOnTabClickListener(new SimpleTab.OnTabClickListener() {\n                    @Override\n                    public void onItemClick(View view, SimpleTab.Item item, int position) {\n                        ViewCompat.makeText(getContext(), \"Click \" + position, Toast.LENGTH_SHORT).show();\n                    }\n                })\n                .bind(this);\n    }\n}\n"
  },
  {
    "path": "support/src/main/java/net/avenwu/support/widget/TagFlowLayout.java",
    "content": "package net.avenwu.support.widget;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.content.res.XmlResourceParser;\nimport android.graphics.Color;\nimport android.graphics.Paint;\nimport android.graphics.drawable.Drawable;\nimport android.graphics.drawable.ShapeDrawable;\nimport android.graphics.drawable.shapes.RoundRectShape;\nimport android.os.Build;\nimport android.text.Editable;\nimport android.text.InputFilter;\nimport android.text.TextUtils;\nimport android.text.TextWatcher;\nimport android.util.AttributeSet;\nimport android.util.SparseIntArray;\nimport android.util.TypedValue;\nimport android.util.Xml;\nimport android.view.Gravity;\nimport android.view.InflateException;\nimport android.view.KeyEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.view.inputmethod.InputMethodManager;\nimport android.widget.EditText;\nimport android.widget.TextView;\n\nimport org.xmlpull.v1.XmlPullParser;\nimport org.xmlpull.v1.XmlPullParserException;\n\nimport java.io.IOException;\n\n/**\n * Created by chaobin on 1/14/15.\n */\npublic class TagFlowLayout extends ViewGroup\n        implements TextWatcher, View.OnKeyListener, View.OnClickListener {\n\n    private static final int INVALID_VALUE = -1;\n\n    private SparseIntArray mCachedPosition = new SparseIntArray();\n\n    private EditText mInputView;\n\n    /**\n     * Comma in both English & Chinese\n     */\n    private char[] mKeyChar = new char[]{',', '，'};\n\n    /**\n     * Key event of enter, comma\n     */\n    private int[] mKeyCode = new int[]{\n            KeyEvent.KEYCODE_ENTER,\n            KeyEvent.KEYCODE_COMMA,\n            KeyEvent.KEYCODE_NUMPAD_COMMA\n    };\n\n    private int mCheckIndex = INVALID_VALUE;\n\n    private Decorator mDecorator;\n\n    public TagFlowLayout(Context context) {\n        this(context, null);\n    }\n\n    public TagFlowLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n        mInputView = new EditText(context);\n        mInputView.setBackgroundColor(Color.TRANSPARENT);\n        mInputView.addTextChangedListener(this);\n        mInputView.setOnKeyListener(this);\n        mInputView.setPadding(0, 0, 0, 0);\n        mInputView.setMinWidth(20);\n        mInputView.setSingleLine();\n        mInputView.setGravity(Gravity.CENTER_VERTICAL);\n        setDecorator(new SimpleDecorator(context));\n        addView(mInputView);\n        setOnClickListener(this);\n        previewInEditMode();\n    }\n\n    @Override\n    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n        int maxWidth = 0;\n        int maxHeight = 0;\n        int width = 0;\n        int height = 0;\n        mCachedPosition.clear();\n        final int widthSpace = MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft()\n                - getPaddingRight();\n        final int count = getChildCount();\n        int verticalCount = 0;\n        for (int i = 0; i < count; ++i) {\n            final View child = getChildAt(i);\n            if (nullChildView(child)) {\n                continue;\n            }\n            measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);\n            final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();\n            int childWidthSpace = lp.leftMargin + child.getMeasuredWidth() + lp.rightMargin;\n            int childHeightSpace = lp.topMargin + child.getMeasuredHeight() + lp.bottomMargin;\n            if (maxWidth + childWidthSpace > widthSpace) {\n                maxWidth = childWidthSpace;\n                maxHeight = Math.max(maxHeight, childHeightSpace);\n                height += maxHeight;\n                mCachedPosition.put(i, ++verticalCount);\n            } else {\n                maxWidth += childWidthSpace;\n                maxHeight = childHeightSpace;\n            }\n            width = Math.max(width, maxWidth);\n        }\n        height += maxHeight + getPaddingTop() + getPaddingBottom();\n        setMeasuredDimension(getImprovedSize(widthMeasureSpec, width),\n                getImprovedSize(heightMeasureSpec, height));\n    }\n\n    private boolean nullChildView(View child) {\n        return child == null || child.getVisibility() == GONE;\n    }\n\n    private int getImprovedSize(int measureSpec, int size) {\n        int specMode = MeasureSpec.getMode(measureSpec);\n        int specSize = MeasureSpec.getSize(measureSpec);\n        switch (specMode) {\n            case MeasureSpec.UNSPECIFIED:\n            case MeasureSpec.AT_MOST:\n                return size;\n            case MeasureSpec.EXACTLY:\n                return specSize;\n        }\n        return specSize;\n    }\n\n    @Override\n    protected void onLayout(boolean changed, int l, int t, int r, int b) {\n        int childTop = getPaddingTop();\n        int childLeft = getPaddingLeft();\n        final int count = getChildCount();\n        for (int i = 0; i < count; i++) {\n            View child = getChildAt(i);\n            if (nullChildView(child)) {\n                continue;\n            }\n            final int childWidth = child.getMeasuredWidth();\n            final int childHeight = child.getMeasuredHeight();\n            final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();\n            if (mCachedPosition.get(i, INVALID_VALUE) != INVALID_VALUE) {\n                childTop += lp.topMargin + childHeight + lp.bottomMargin;\n                childLeft = getPaddingLeft();\n            } else if (childTop == getPaddingTop()) {\n                childTop += lp.topMargin;\n            }\n            childLeft += lp.leftMargin;\n            setChildFrame(child, childLeft, childTop, childWidth, childHeight);\n            childLeft += childWidth + lp.rightMargin;\n        }\n    }\n\n    private void setChildFrame(View child, int left, int top, int width, int height) {\n        child.layout(left, top, left + width, top + height);\n    }\n\n    @Override\n    protected LayoutParams generateLayoutParams(LayoutParams p) {\n        MarginLayoutParams params = new MarginLayoutParams(p);\n        if (mDecorator != null) {\n            params.setMargins(mDecorator.getMargin()[0], mDecorator.getMargin()[1],\n                    mDecorator.getMargin()[2], mDecorator.getMargin()[3]);\n        }\n        return params;\n    }\n\n    @Override\n    public LayoutParams generateLayoutParams(AttributeSet attrs) {\n        MarginLayoutParams params = new MarginLayoutParams(getContext(), attrs);\n        if (mDecorator != null) {\n            params.setMargins(mDecorator.getMargin()[0], mDecorator.getMargin()[1],\n                    mDecorator.getMargin()[2], mDecorator.getMargin()[3]);\n        }\n        return params;\n    }\n\n    @Override\n    protected LayoutParams generateDefaultLayoutParams() {\n        MarginLayoutParams params = new MarginLayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,\n                mDecorator != null ? mDecorator.getHeight() : ViewGroup.LayoutParams.WRAP_CONTENT);\n        if (mDecorator != null) {\n            params.setMargins(mDecorator.getMargin()[0], mDecorator.getMargin()[1],\n                    mDecorator.getMargin()[2], mDecorator.getMargin()[3]);\n        }\n        return params;\n    }\n\n    /**\n     * set the keyCode list which trigger the TAG generation, the default keyCode are\n     * {@link android.view.KeyEvent#KEYCODE_ENTER},{@link android.view.KeyEvent#KEYCODE_COMMA}\n     *\n     * @param keyChar comma on mobile are not always keyCode, null will be ignored\n     * @param keyCode keyCode defined in {@link android.view.KeyEvent}, null will be ignored\n     */\n    public void setActionKeyCode(char[] keyChar, int... keyCode) {\n        if (keyChar != null && keyChar.length > 0) {\n            mKeyChar = keyChar;\n        }\n        if (keyCode != null && keyCode.length > 0) {\n            mKeyCode = keyCode;\n        }\n    }\n\n    @Override\n    public boolean onKey(View v, int keyCode, KeyEvent event) {\n        if (event.getAction() == KeyEvent.ACTION_DOWN) {\n            if (isKeyCodeHit(keyCode)) {\n                if (!TextUtils.isEmpty(mInputView.getText().toString())) {\n                    generateTag(mInputView.getText().toString());\n                }\n                return true;\n            } else if (KeyEvent.KEYCODE_DEL == keyCode) {\n                if (TextUtils.isEmpty(mInputView.getText().toString())) {\n                    deleteTag();\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private boolean isKeyCodeHit(int keyCode) {\n        if (mKeyCode != null && mKeyCode.length > 0) {\n            for (int key : mKeyCode) {\n                if (key == keyCode) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    private boolean isKeyCharHit(char keyChar) {\n        if (mKeyChar != null && mKeyChar.length > 0) {\n            for (char key : mKeyChar) {\n                if (key == keyChar) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n\n    @Override\n    public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n    }\n\n    @Override\n    public void onTextChanged(CharSequence s, int start, int before, int count) {\n    }\n\n    @Override\n    public void afterTextChanged(Editable s) {\n        if (s.length() > 0) {\n            if (isKeyCharHit(s.charAt(0))) {\n                mInputView.setText(\"\");\n            } else if (isKeyCharHit(s.charAt(s.length() - 1))) {\n                mInputView.setText(\"\");\n                generateTag(s.subSequence(0, s.length() - 1) + \"\");\n            }\n        }\n    }\n\n    @Override\n    public void onClick(View v) {\n        if (v instanceof TagFlowLayout) {\n            mInputView.requestFocus();\n            InputMethodManager m = (InputMethodManager) getContext()\n                    .getSystemService(Context.INPUT_METHOD_SERVICE);\n            m.showSoftInput(mInputView, InputMethodManager.SHOW_FORCED);\n            // clear check status\n            if (mCheckIndex != INVALID_VALUE) {\n                updateCheckStatus(getChildAt(mCheckIndex), false);\n                mCheckIndex = INVALID_VALUE;\n            }\n            return;\n        }\n        final int index = indexOfChild(v);\n        // skip unnecessary setting\n        if (index != mCheckIndex) {\n            mCheckIndex = index;\n            updateCheckStatus(v, true);\n            for (int i = 0; i < index; i++) {\n                updateCheckStatus(getChildAt(i), false);\n            }\n            //skip input box\n            for (int i = index + 1; i < getChildCount() - 1; i++) {\n                updateCheckStatus(getChildAt(i), false);\n            }\n        }\n    }\n\n    private void deleteTag() {\n        if (getChildCount() > 1) {\n            removeViewAt(mCheckIndex == INVALID_VALUE ? indexOfChild(mInputView) - 1 : mCheckIndex);\n            mCheckIndex = INVALID_VALUE;\n            mInputView.requestFocus();\n        }\n    }\n\n    /**\n     * Auto generate the last input content as tag label\n     */\n    public void autoComplete() {\n        if (!TextUtils.isEmpty(mInputView.getText().toString())) {\n            generateTag(null);\n        }\n    }\n\n    /**\n     * can be null\n     */\n    private void generateTag(CharSequence tag) {\n        CharSequence tagString = tag == null ? mInputView.getText().toString() : tag;\n        mInputView.getText().clear();\n        final int targetIndex = indexOfChild(mInputView);\n        TextView tagLabel;\n        if (mDecorator.getLayout() != INVALID_VALUE) {\n            View view = View.inflate(getContext(), mDecorator.getLayout(), null);\n            if (view instanceof TextView) {\n                tagLabel = (TextView) view;\n            } else {\n                throw new IllegalArgumentException(\n                        \"The custom layout for tagLabel label must have TextView as root element\");\n            }\n        } else {\n            tagLabel = new TextView(getContext());\n            tagLabel.setPadding(mDecorator.getPadding()[0], mDecorator.getPadding()[1],\n                    mDecorator.getPadding()[2], mDecorator.getPadding()[3]);\n            tagLabel.setTextSize(mDecorator.getTextSize());\n        }\n        updateCheckStatus(tagLabel, false);\n        tagLabel.setText(tagString);\n        tagLabel.setSingleLine();\n        tagLabel.setGravity(Gravity.CENTER_VERTICAL);\n        tagLabel.setEllipsize(TextUtils.TruncateAt.END);\n        if (mDecorator.getMaxLength() != INVALID_VALUE) {\n            InputFilter maxLengthFilter = new InputFilter.LengthFilter(mDecorator.getMaxLength());\n            tagLabel.setFilters(new InputFilter[]{maxLengthFilter});\n        }\n        tagLabel.setClickable(true);\n        tagLabel.setOnClickListener(this);\n        addView(tagLabel, targetIndex);\n        mInputView.requestFocus();\n    }\n\n    private void updateCheckStatus(View view, boolean checked) {\n        if (view == null) {\n            return;\n        }\n        // don't reuse drawable for different tag label\n        Drawable[] drawables = mDecorator.getBackgroundDrawable();\n        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n            view.setBackgroundDrawable(drawables[drawables.length > 1 ? (checked ? 1 : 0) : 0]);\n        } else {\n            view.setBackground(drawables[drawables.length > 1 ? (checked ? 1 : 0) : 0]);\n        }\n        final int[] color = mDecorator.getTextColor();\n        if (color != null && color.length > 0) {\n            ((TextView) view).setTextColor((color[color.length > 1 ? (checked ? 1 : 0) : 0]));\n        }\n    }\n\n    private void previewInEditMode() {\n        if (isInEditMode()) {\n            generateTag(\"Hot Tag Ckecked\");\n            generateTag(\"TAG A\");\n            generateTag(\"TAG B\");\n            generateTag(\"TAG C\");\n            updateCheckStatus(getChildAt(0), true);\n            mInputView.setText(\"Input here...\");\n        }\n    }\n\n    public void setDecorator(Decorator decorator) {\n        if (decorator != null) {\n            mDecorator = decorator;\n            try {\n                setInnerAttribute();\n            } catch (Exception e) {\n                e.printStackTrace();\n                throw new UnknownError(e.getMessage() + \"\\n unavailable to setDecorator\");\n            }\n        }\n    }\n\n    /**\n     * Make sure the input EditView looks like TextView label\n     */\n    private void setInnerAttribute()\n            throws XmlPullParserException, IOException, ClassNotFoundException {\n        mInputView.setTextSize(mDecorator.getTextSize());\n        if (mDecorator.getMaxLength() != INVALID_VALUE) {\n            InputFilter maxLengthFilter = new InputFilter.LengthFilter(mDecorator.getMaxLength());\n            mInputView.setFilters(new InputFilter[]{maxLengthFilter});\n        }\n        if (mDecorator.getTextColor() != null && mDecorator.getTextColor().length > 1) {\n            mInputView.setTextColor(mDecorator.getTextColor()[0]);\n        }\n        if (mDecorator.getLayout() != INVALID_VALUE) {\n            XmlResourceParser parser = getResources().getLayout(mDecorator.getLayout());\n            final AttributeSet set = Xml.asAttributeSet(parser);\n            int type = 0;\n            while ((type = parser.next()) != XmlPullParser.START_TAG &&\n                    type != XmlPullParser.END_DOCUMENT) {\n                // Empty\n            }\n            if (type != XmlPullParser.START_TAG) {\n                throw new InflateException(parser.getPositionDescription()\n                        + \": No start tag found!\");\n            }\n            final String name = parser.getName();\n            if (\"TextView\".equals(name) || Class.forName(name).isInstance(TextView.class)) {\n                int[] attr = new int[]{\n                        android.R.attr.layout_width,\n                        android.R.attr.layout_height,\n                };\n                TypedArray array = getContext().obtainStyledAttributes(set, attr);\n                final int height = array.getDimensionPixelSize(1, 0);\n                if (height != 0) {\n                    MarginLayoutParams layoutParams = (MarginLayoutParams) mInputView\n                            .getLayoutParams();\n                    layoutParams.height = height;\n                }\n                //TODO other useful attribute\n                array.recycle();\n            } else {\n                throw new InflateException(parser.getPositionDescription()\n                        + \": Only TextView or subclass of TextView is supported!\");\n            }\n        }\n    }\n\n    public CharSequence[] getTagArray() {\n        final int count = getChildCount();\n        if (count > 1) {\n            CharSequence[] tags = new CharSequence[count - 1];\n            for (int i = 0; i < count - 1; i++) {\n                View child = getChildAt(i);\n                if (child instanceof TextView) {\n                    tags[i] = ((TextView) child).getText();\n                }\n            }\n            return tags;\n        }\n        return new CharSequence[]{};\n    }\n\n    public void setTagArray(CharSequence... tags) {\n        for (CharSequence tag : tags) {\n            generateTag(tag);\n        }\n    }\n\n    public void clearTags() {\n        while (getChildCount() > 1) {\n            removeAllViews();\n            addView(mInputView);\n        }\n    }\n\n    public void setInputable(boolean enable) {\n        mInputView.setVisibility(enable ? View.VISIBLE : View.GONE);\n        mInputView.setEnabled(enable);\n    }\n\n    /**\n     * Implements your own Decorator to custom the tag view\n     */\n    interface Decorator {\n\n        /**\n         * Size in unit of sp\n         */\n        public int getTextSize();\n\n        /**\n         * Padding on mLeftView, top, right, bottom in unit of dip\n         */\n        public int[] getPadding();\n\n        /**\n         * Margin on mLeftView, top, right, bottom in unit of dip\n         */\n        public int[] getMargin();\n\n        /**\n         * Color in format of AARRGGBB\n         */\n        public int[] getTextColor();\n\n        /**\n         * Tag view's background can be satisfied either by color or drawable resources,\n         */\n        public Drawable[] getBackgroundDrawable();\n\n        /**\n         * Size in unit of dip, if you provide custom layout by {@link #getLayout()}, it must have\n         * the same height value\n         */\n        public int getHeight();\n\n        /**\n         * Provide your own layout id so you can custom the tag view what ever you like,\n         * keep in mind the layout must have TextView as root element\n         *\n         * @return -1 will be ignored\n         */\n        public int getLayout();\n\n        /**\n         * @return\n         */\n        public int getMaxLength();\n    }\n\n    /**\n     * Default decorator which will set on the TAG view\n     */\n    public static class SimpleDecorator implements Decorator {\n\n        protected int textSize;\n\n        protected int[] textColor;\n\n        protected int[] padding;\n\n        protected int[] margin;\n\n        protected int mTagHeight;\n\n        protected int mRadius;\n\n        public SimpleDecorator(Context context) {\n            textSize = 14;\n            final int p = getPixelSize(context, TypedValue.COMPLEX_UNIT_DIP, 5);\n            padding = new int[]{p, p, p, p};\n            final int m = getPixelSize(context, TypedValue.COMPLEX_UNIT_DIP, 2);\n            margin = new int[]{m, m, m, m};\n            mRadius = getPixelSize(context, TypedValue.COMPLEX_UNIT_DIP, 5);\n            mTagHeight = getPixelSize(context, TypedValue.COMPLEX_UNIT_DIP, 30);\n            textColor = new int[]{0xFF000000, 0xFFFFFFFF};\n        }\n\n        private int getPixelSize(Context context, int unit, int size) {\n            return (int) TypedValue\n                    .applyDimension(unit, size, context.getResources().getDisplayMetrics());\n        }\n\n        @Override\n        public int getTextSize() {\n            return textSize;\n        }\n\n        @Override\n        public int[] getPadding() {\n            return padding;\n        }\n\n        @Override\n        public int[] getMargin() {\n            return margin;\n        }\n\n        @Override\n        public int[] getTextColor() {\n            return textColor;\n        }\n\n        public int getHeight() {\n            return mTagHeight;\n        }\n\n        public Drawable[] getBackgroundDrawable() {\n            return new Drawable[]{\n                    newRoundRectShape(0xFF4285f4, mRadius),\n                    newRoundRectShape(0xFF3f51b5, mRadius)\n            };\n        }\n\n        @Override\n        public int getLayout() {\n            return INVALID_VALUE;\n        }\n\n        @Override\n        public int getMaxLength() {\n            return 20;\n        }\n\n        protected Drawable newRoundRectShape(int color, int radius) {\n            ShapeDrawable shape = new ShapeDrawable(new RoundRectShape(new float[]{radius, radius,\n                    radius, radius, radius, radius, radius, radius}, null, null));\n            shape.getPaint().setStyle(Paint.Style.FILL);\n            shape.getPaint().setColor(color);\n            shape.getPaint().setAntiAlias(true);\n            return shape;\n        }\n    }\n\n}\n"
  },
  {
    "path": "support/src/main/res/drawable/toast_shape.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n       android:shape=\"rectangle\">\n    <corners android:radius=\"3dp\"/>\n    <solid android:color=\"#ee212121\"/>\n</shape>"
  },
  {
    "path": "support/src/main/res/layout/custom_toast.xml",
    "content": "<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@drawable/toast_shape\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:id=\"@android:id/message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_margin=\"8dp\"\n        android:textSize=\"14sp\"\n        android:textColor=\"#fff\"\n        android:shadowColor=\"#BB000000\"\n        android:shadowRadius=\"2.75\"/>\n\n</LinearLayout>"
  },
  {
    "path": "support/src/main/res/values/attr_breath_light.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <!-- 避免命名冲突，强行加一个前缀-->\n    <declare-styleable name=\"BreathingLayout\">\n        <attr name=\"_rippleColor\" format=\"color|reference\" />\n        <attr name=\"_rippleEndRadius\" format=\"dimension|reference\" />\n        <attr name=\"_rippleStartRadius\" format=\"dimension|reference\" />\n        <attr name=\"_rippleTime\" format=\"integer\" />\n        <attr name=\"_autoStart\" format=\"boolean\" />\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "support/src/main/res/values/attr_dim_imagview.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"DimImageView\">\n        <attr name=\"dim\" format=\"color|reference\" />\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "support/src/main/res/values/attr_ex_textview.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"ExTextView\">\n        <attr name=\"expand_indicator\" format=\"reference\"/>\n        <attr name=\"expand_collapse_default\" format=\"boolean|reference\"/>\n        <attr name=\"expand_style\" format=\"enum\">\n            <enum name=\"end\" value=\"0\"/>\n            <enum name=\"right\" value=\"1\"/>\n        </attr>\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "support/src/main/res/values/attr_flat_tab_group.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"FlatTabGroup\">\n        <attr name=\"tab_items\" format=\"reference\" />\n        <attr name=\"tab_border_width\" format=\"dimension|reference\" />\n        <attr name=\"tab_border_color\" format=\"color|reference\" />\n        <attr name=\"tab_radius\" format=\"dimension|reference\" />\n        <attr name=\"tab_textColor\" format=\"reference\" />\n        <attr name=\"tab_textSize\" format=\"dimension|reference\" />\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "support/src/main/res/values/attrs_drawer_frame.xml",
    "content": "<resources>\n    <declare-styleable name=\"DrawerFrame\">\n        <attr name=\"exampleString\" format=\"string\" />\n        <attr name=\"exampleDimension\" format=\"dimension\" />\n        <attr name=\"exampleColor\" format=\"color\" />\n        <attr name=\"exampleDrawable\" format=\"color|reference\" />\n    </declare-styleable>\n</resources>\n"
  },
  {
    "path": "support/src/main/res/values/ids.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <item name=\"menu\" type=\"id\"/>\n    <item name=\"main\" type=\"id\"/>\n</resources>"
  },
  {
    "path": "support/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Support</string>\n</resources>\n"
  }
]