[
  {
    "path": ".gitignore",
    "content": "# Created by https://www.gitignore.io/api/androidstudio\n\n### AndroidStudio ###\n# Covers files to be ignored for android development using Android Studio.\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle\n.gradle/\nbuild/\n\n# Signing files\n.signing/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio\n/*/build/\n/*/local.properties\n/*/out\n/*/*/build\n/*/*/production\ncaptures/\n.navigation/\n*.ipr\n*~\n*.swp\n\n# Android Patch\ngen-external-apklibs\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n\n# NDK\nobj/\n\n# IntelliJ IDEA\n*.iml\n*.iws\n/out/\n\n# User-specific configurations\n.idea/caches/\n.idea/libraries/\n.idea/shelf/\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/.name\n.idea/compiler.xml\n.idea/copyright/profiles_settings.xml\n.idea/encodings.xml\n.idea/misc.xml\n.idea/modules.xml\n.idea/scopes/scope_settings.xml\n.idea/dictionaries\n.idea/vcs.xml\n.idea/jsLibraryMappings.xml\n.idea/datasources.xml\n.idea/dataSources.ids\n.idea/sqlDataSources.xml\n.idea/dynamic.xml\n.idea/uiDesigner.xml\n\n# OS-specific files\n.DS_Store\n.DS_Store?\n._*\n.Spotlight-V100\n.Trashes\nehthumbs.db\nThumbs.db\n\n# Legacy Eclipse project files\n.classpath\n.project\n.cproject\n.settings/\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.war\n*.ear\n\n# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)\nhs_err_pid*\n\n## Plugin-specific files:\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Mongo Explorer plugin\n.idea/mongoSettings.xml\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\nfabric.properties\n\n### AndroidStudio Patch ###\n\n!/gradle/wrapper/gradle-wrapper.jar\n\n\n# End of https://www.gitignore.io/api/androidstudio"
  },
  {
    "path": ".idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/sample\" />\n            <option value=\"$PROJECT_DIR$/toggleedittextview\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": ".travis.yml",
    "content": "language: android\njdk: oraclejdk8\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n    - build-tools-27.0.3\n    - android-27\n    - extra-google-m2repository\n    - extra-android-m2repository\n\nscript:\n   - ./gradlew build\n\nlicenses:\n    - 'android-sdk-preview-license-.+'\n    - 'android-sdk-license-.+'\n    - 'google-gdk-license-.+'\n\nbefore_install:\n  - mkdir \"$ANDROID_HOME/licenses\" || true\n  - echo -e \"\\n8933bad161af4178b1185d1a37fbf41ea5269c55\" > \"$ANDROID_HOME/licenses/android-sdk-license\"\n  - echo -e \"\\n84831b9409646a918e30573bab4c9c91346d8abd\" > \"$ANDROID_HOME/licenses/android-sdk-preview-license\"\n\ninstall:\n  # Temporary fix to Android SDK 27\n  # Ref: https://github.com/travis-ci/travis-ci/issues/8874\n  - yes | sdkmanager \"platforms;android-27\""
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Camerash\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# ToggleEditTextView :pencil:\nEasily switch between EditText and TextView seamlessly.\n\n![Travis CI build status](https://travis-ci.org/Camerash/ToggleEditTextView.svg?branch=master)\n\n![ToggleEditTextView](/assets/preview.gif)\n\n## Grab via Gradle :coffee:\n```groovy\ndependencies {\n    implementation 'com.camerash:toggleedittextview:0.1.1'\n}\n```\n\n## Usage :computer:\n\n### ToggleEditTextView\nIn your layout:\n```xml\n<com.camerash.toggleedittextview.ToggleEditTextView\n        android:id=\"@+id/tetv\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"@string/name\"\n        android:maxLines=\"1\"\n        app:tetv_textViewColor=\"@color/colorPrimary\"\n        app:tetv_editTextViewColor=\"@color/colorPrimaryDark\"\n        app:tetv_editTextBottomLineColor=\"@color/colorAccent\" />\n```\nAvailable properties:\n* `android:textSize`\n* `android:hint`\n* `android:inputType`\n* `android:minLines`\n* `android:maxLines`\n* `app:tetv_editing` - Initial state of ToggleEditTextView\n* `app:tetv_textViewColor` - Text color of TextView\n* `app:tetv_editTextViewColor` - Text color of EditText\n* `app:tetv_editTextBottomLineColor` - Bottom line's color of EditText\n\nAvailable methods:\n* `set/getEditing()` - Control editing state of ToggleEditTextView\n* `set/getText()` - Set/Get text of ToggleEditTextView\n* `set/getHint()` - Set/Get hint of ToggleEditTextView\n* `set/getTextSize()` - Set/Get text size of ToggleEditTextView\n* `set/getTextViewColor()` - Set/Get color of text of the TextView in ToggleEditTextView\n* `set/getEditTextColor()` - Set/Get color of text of the EditText in ToggleEditTextView\n* `setEditTextBottomLineColor(Int)` - Set color of bottom line of the EditText in ToggleEditTextView\n* `set/getEditTextEnabled()` - Set/Get state of the EditText in ToggleEditTextView\n* `set/getInputType()` - Set/Get inputType of the EditText in ToggleEditTextView\n* `setMinLines()` - Set minLines of ToggleEditTextView\n* `setMaxLines()` - Set maxLines of ToggleEditTextView\n\n---\n\n### ToggleEditButton - Button controller of ToggleEditTextViews\n\nIn your layout:\n```xml\n<com.camerash.toggleedittextview.ToggleEditButton\n        android:id=\"@+id/toggleEditButton\"\n        android:layout_width=\"36dp\"\n        android:layout_height=\"36dp\"\n        app:teb_animationOffset=\"100\"\n        app:teb_edit=\"false\"\n        app:teb_tint=\"@color/colorAccent\" />\n```\nAvailable properties:\n* `app:teb_edit` - Initial state of ToggleEditButton (Overrides the state of the controlling ToggleEditTextViews)\n* `app:teb_tint` - Tint color of the icon\n* `app:teb_animationOffset` - Offset duration of fading animation between each ToggleEditTextView controlled by the ToggleEditButton\n\nAvailable methods:\n* `bind(vararg ToggleEditTextView)` - Bind multiple ToggleEditTextViews to the button\n* `unbind(ToggleEditTextView)` - Unbind ToggleEditTextView from the button\n* `unbindAll()` - Unbind all ToggleEditTextViews from the button\n* `set/getAnimationOffset()` - Set/Get the Offset duration of fading animation between each ToggleEditTextView controlled by the ToggleEditButton\n* `setOnClickListener(OnClickListener)` - Works the same as a good o' button\n\n## Common usage :bell:\nKotlin:\n```kotlin\nval tetv1 = findViewById<ToggleEditTextView>(R.id.tetv1)\nval tetv2 = findViewById<ToggleEditTextView>(R.id.tetv2)\nval teb = findViewById<ToggleEditButton>(R.id.teb)\nteb.bind(tetv1, tetv2)\n```\n\nJava:\n```java\nToggleEditTextView tetv1 = findViewById(R.id.tetv1);\nToggleEditTextView tetv2 = findViewById(R.id.tetv2);\nToggleEditButton teb = findViewById(R.id.teb);\nteb.bind(tetv1, tetv2);\n```\n\n## Sample :closed_book:\nSample app is under `/sample` directory :tada:\n\n## License :page_with_curl:\n```\nMIT License\n\nCopyright (c) 2018 Camerash\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\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    ext.kotlin_version = '1.2.41'\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.1.2'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n\n        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'\n        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu Apr 26 11:22:30 HKT 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-4.4-all.zip\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "sample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "sample/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n    compileSdkVersion 27\n\n    defaultConfig {\n        applicationId \"com.camerash.toggleedittextview.sample\"\n        minSdkVersion 14\n        targetSdkVersion 27\n        versionCode 1\n        versionName \"1.0\"\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n    lintOptions {\n        abortOnError false\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    implementation 'com.android.support.constraint:constraint-layout:1.1.2'\n\n    implementation project(':toggleedittextview')\n}\n"
  },
  {
    "path": "sample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "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.camerash.toggleedittextview.sample\">\n\n    <application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "sample/src/main/java/com/camerash/toggleedittextview/sample/MainActivity.kt",
    "content": "package com.camerash.toggleedittextview.sample\n\nimport android.os.Bundle\nimport android.support.v7.app.AppCompatActivity\nimport kotlinx.android.synthetic.main.activity_main.*\n\nclass MainActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        initBinding()\n    }\n\n    private fun initBinding() {\n        toggleEditButton.bind(tetv1, tetv2, tetv3, tetv4)\n    }\n\n}\n"
  },
  {
    "path": "sample/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillColor=\"#26A69A\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeColor=\"#33FFFFFF\"\n        android:strokeWidth=\"0.8\" />\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportHeight=\"108\"\n    android:viewportWidth=\"108\">\n    <path\n        android:fillType=\"evenOdd\"\n        android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"78.5885\"\n                android:endY=\"90.9159\"\n                android:startX=\"48.7653\"\n                android:startY=\"61.0927\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n        android:strokeColor=\"#00000000\"\n        android:strokeWidth=\"1\" />\n</vector>\n"
  },
  {
    "path": "sample/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.constraint.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\"com.camerash.toggleedittextview.sample.MainActivity\">\n\n    <com.camerash.toggleedittextview.ToggleEditButton\n        android:id=\"@+id/toggleEditButton\"\n        android:layout_width=\"36dp\"\n        android:layout_height=\"36dp\"\n        android:layout_marginEnd=\"16dp\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\"\n        app:teb_animationOffset=\"100\"\n        app:teb_edit=\"false\"\n        app:teb_tint=\"@color/colorAccent\" />\n\n    <com.camerash.toggleedittextview.ToggleEditTextView\n        android:id=\"@+id/tetv1\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginEnd=\"16dp\"\n        android:layout_marginStart=\"16dp\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:hint=\"@string/name\"\n        android:maxLines=\"1\"\n        app:tetv_textViewColor=\"@color/colorPrimary\"\n        app:tetv_editTextViewColor=\"@color/colorPrimaryDark\"\n        app:tetv_editTextBottomLineColor=\"@color/colorAccent\"\n        app:layout_constraintBottom_toTopOf=\"@+id/tetv2\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintHorizontal_bias=\"0.5\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/toggleEditButton\"\n        app:layout_constraintVertical_chainStyle=\"spread\" />\n\n    <com.camerash.toggleedittextview.ToggleEditTextView\n        android:id=\"@+id/tetv2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginEnd=\"16dp\"\n        android:layout_marginStart=\"16dp\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:hint=\"@string/age\"\n        android:maxLines=\"1\"\n        app:tetv_textViewColor=\"@color/colorPrimary\"\n        app:tetv_editTextViewColor=\"@color/colorPrimaryDark\"\n        app:tetv_editTextBottomLineColor=\"@color/colorAccent\"\n        app:layout_constraintBottom_toTopOf=\"@+id/tetv3\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintHorizontal_bias=\"0.5\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/tetv1\" />\n\n    <com.camerash.toggleedittextview.ToggleEditTextView\n        android:id=\"@+id/tetv3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginEnd=\"16dp\"\n        android:layout_marginStart=\"16dp\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:hint=\"@string/hobbies\"\n        android:minLines=\"5\"\n        android:maxLines=\"5\"\n        app:tetv_textViewColor=\"@color/colorPrimary\"\n        app:tetv_editTextViewColor=\"@color/colorPrimaryDark\"\n        app:tetv_editTextBottomLineColor=\"@color/colorAccent\"\n        app:layout_constraintBottom_toTopOf=\"@+id/tetv4\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintHorizontal_bias=\"0.5\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/tetv2\" />\n\n    <com.camerash.toggleedittextview.ToggleEditTextView\n        android:id=\"@+id/tetv4\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginEnd=\"16dp\"\n        android:layout_marginStart=\"16dp\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginLeft=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginBottom=\"16dp\"\n        android:hint=\"@string/address\"\n        android:inputType=\"textMultiLine\"\n        android:minLines=\"5\"\n        android:maxLines=\"5\"\n        app:tetv_textViewColor=\"@color/colorPrimary\"\n        app:tetv_editTextViewColor=\"@color/colorPrimaryDark\"\n        app:tetv_editTextBottomLineColor=\"@color/colorAccent\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintEnd_toEndOf=\"parent\"\n        app:layout_constraintHorizontal_bias=\"0.5\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/tetv3\" />\n\n</android.support.constraint.ConstraintLayout>\n"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#0277bd</color>\n    <color name=\"colorPrimaryDark\">#004c8c</color>\n    <color name=\"colorAccent\">#439889</color>\n</resources>\n"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">ToggleEditTextView</string>\n\n    <string name=\"name\">Name</string>\n    <string name=\"age\">Age</string>\n    <string name=\"hobbies\">Hobbies</string>\n    <string name=\"address\">Address</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        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':sample', ':toggleedittextview'\n"
  },
  {
    "path": "toggleedittextview/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "toggleedittextview/build.gradle",
    "content": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\napply plugin: 'com.jfrog.bintray'\napply plugin: 'com.github.dcendents.android-maven'\n\ndef VERSION = '0.1.1'\n\ngroup = 'com.camerash'\nversion = VERSION\n\ndef bintrayUser = System.getenv('BINTRAY_USER')\ndef bintrayApiKey = System.getenv('BINTRAY_API_KEY')\n\nif (project.rootProject.file('local.properties').exists()) {\n    Properties localProperties = new Properties()\n    localProperties.load(project.rootProject.file('local.properties').newDataInputStream())\n\n    bintrayUser = localProperties.getProperty('bintray.user', bintrayUser)\n    bintrayApiKey = localProperties.getProperty('bintray.apikey', bintrayApiKey)\n}\n\nandroid {\n    compileSdkVersion 27\n\n    defaultConfig {\n        minSdkVersion 14\n        targetSdkVersion 27\n        versionCode 1\n        versionName VERSION\n\n        vectorDrawables.useSupportLibrary = true\n    }\n\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n\n    implementation 'com.android.support:appcompat-v7:27.1.1'\n    implementation \"com.android.support:design:27.1.1\"\n}\n\nrepositories {\n    mavenCentral()\n}\n\ntask sourcesJar(type: Jar) {\n    classifier = 'sources'\n    from android.sourceSets.main.java.srcDirs\n}\n\ntask javadoc(type: Javadoc) {\n    excludes = ['**/*.kt'] // exclude kotlin files\n    source = android.sourceSets.main.java.srcDirs\n    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))\n}\n\ntask javadocJar(type: Jar, dependsOn: javadoc) {\n    classifier = 'javadoc'\n    from javadoc.destinationDir\n}\n\nartifacts {\n    archives javadocJar\n    archives sourcesJar\n}\n\nbintray {\n    user = bintrayUser\n    key = bintrayApiKey\n    configurations = ['archives']\n    pkg {\n        repo = 'maven'\n        name = 'ToggleEditTextView'\n        desc = 'Easily switch between EditText and TextView seamlessly.'\n        websiteUrl = 'https://github.com/Camerash/ToggleEditTextView'\n        vcsUrl = 'https://github.com/Camerash/ToggleEditTextView.git'\n        licenses = ['MIT']\n        publish = true\n        publicDownloadNumbers = true\n        version {\n            name = VERSION\n            desc = \"ToggleEditTextView ${VERSION}\"\n            released  = new Date()\n            vcsTag = VERSION\n        }\n    }\n}\n\ninstall {\n    repositories.mavenInstaller {\n        pom {\n            project {\n                packaging 'aar'\n                groupId this.group\n                artifactId 'toggleedittextview'\n\n                name 'toggleedittextview'\n                description 'Easily switch between EditText and TextView seamlessly.'\n                url 'https://github.com/Camerash/ToggleEditTextView'\n\n                version = this.version\n\n                licenses {\n                    license {\n                        name 'The MIT License'\n                        url 'http://opensource.org/licenses/MIT'\n                    }\n                }\n                developers {\n                    developer {\n                        id 'camerash'\n                        name 'Esmond Wong'\n                        email 'esmond9981127@gmail.com'\n                    }\n                }\n                scm {\n                    connection 'https://github.com/Camerash/ToggleEditTextView.git'\n                    developerConnection 'https://github.com/Camerash/ToggleEditTextView.git'\n                    url 'https://github.com/Camerash/ToggleEditTextView'\n                }\n            }\n        }\n    }\n}"
  },
  {
    "path": "toggleedittextview/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "toggleedittextview/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"com.camerash.toggleedittextview\" />\n"
  },
  {
    "path": "toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditButton.kt",
    "content": "package com.camerash.toggleedittextview\n\nimport android.content.Context\nimport android.content.res.TypedArray\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.os.Handler\nimport android.os.Parcelable\nimport android.support.graphics.drawable.AnimatedVectorDrawableCompat\nimport android.support.v7.widget.AppCompatImageButton\nimport android.util.AttributeSet\n\n/**\n * Created by camerash on 4/26/18.\n * Controller button for controlling single / grouped ToggleEditTextView(s)\n */\nclass ToggleEditButton(context: Context, attrs: AttributeSet?, defStyleAttr: Int): AppCompatImageButton(context, attrs, defStyleAttr) {\n\n    private val tetvArrayList = arrayListOf<ToggleEditTextView>()\n    private val editToConfirmAnim = AnimatedVectorDrawableCompat.create(context, R.drawable.edit_to_confirm_anim)\n    private val confirmToEditAnim = AnimatedVectorDrawableCompat.create(context, R.drawable.confirm_to_edit_anim)\n\n    private var onClickListener: OnClickListener? = null\n\n    private var editing = false\n    private var animationOffset = 100L\n\n    constructor(context: Context): this(context, null, 0)\n\n    constructor(context: Context, attrs: AttributeSet): this(context, attrs, 0)\n\n    init {\n        if(attrs != null) {\n            val styled = getContext().obtainStyledAttributes(attrs, R.styleable.ToggleEditButton)\n\n            initAttributes(styled)\n\n            styled.recycle()\n        }\n\n        super.setOnClickListener {\n            setEditing(!editing, true)\n            onClickListener?.onClick(it)\n        }\n    }\n\n    private fun initAttributes(styled: TypedArray) {\n        val tint = styled.getColor(R.styleable.ToggleEditButton_teb_tint, Color.BLACK)\n        setTint(tint)\n\n        val editing = styled.getBoolean(R.styleable.ToggleEditButton_teb_edit, false)\n        setEditing(editing, false)\n\n        val offset = styled.getInteger(R.styleable.ToggleEditButton_teb_animationOffset, 100).toLong()\n        setAnimationOffset(offset)\n    }\n\n    private fun resetButton(animate: Boolean) {\n        editToConfirmAnim?.stop()\n        confirmToEditAnim?.stop()\n\n        if(animate) {\n            setImageDrawable(if (this.editing) editToConfirmAnim else confirmToEditAnim)\n            if (this.editing) editToConfirmAnim?.start() else confirmToEditAnim?.start()\n        } else {\n            setImageDrawable(if (this.editing) confirmToEditAnim else editToConfirmAnim)\n        }\n    }\n\n    fun getEditing(): Boolean = this.editing\n\n    fun setEditing(editing: Boolean, animate: Boolean) {\n        this.editing = editing\n        if(animate) {\n            tetvArrayList.forEachIndexed { i, tetv ->\n                tetv.setEditTextEnabled(this.editing)\n                Handler().postDelayed({ tetv.setEditing(this.editing, animate) }, animationOffset*i)\n            }\n            resetButton(animate)\n        } else {\n            tetvArrayList.forEach { it.setEditing(this.editing, animate) }\n            resetButton(animate)\n        }\n    }\n\n    fun setTint(color: Int) {\n        editToConfirmAnim?.setTint(color)\n        confirmToEditAnim?.setTint(color)\n    }\n\n    fun bind(vararg toggleEditTextView: ToggleEditTextView) {\n        tetvArrayList.addAll(toggleEditTextView)\n        tetvArrayList.forEach { it.setEditing(this.editing, false) }\n    }\n\n    fun unbind(toggleEditTextView: ToggleEditTextView) {\n        tetvArrayList.remove(toggleEditTextView)\n    }\n\n    fun unbindAll() {\n        tetvArrayList.clear()\n    }\n\n    fun getAnimationOffset(): Long = animationOffset\n\n    fun setAnimationOffset(offset: Long) {\n        this.animationOffset = offset\n    }\n\n    override fun setOnClickListener(l: OnClickListener?) {\n        this.onClickListener = l\n    }\n\n    override fun onSaveInstanceState(): Parcelable {\n        val bundle = Bundle()\n        bundle.putParcelable(SUPER_STATE_KEY, super.onSaveInstanceState())\n        bundle.putBoolean(EDIT_KEY, getEditing())\n        return bundle\n    }\n\n    override fun onRestoreInstanceState(state: Parcelable) {\n        var superState = state\n        if (state is Bundle) {\n            superState = state.getParcelable(SUPER_STATE_KEY)\n            setEditing(state.getBoolean(EDIT_KEY),false)\n        }\n        super.onRestoreInstanceState(superState)\n    }\n\n    companion object {\n        const val SUPER_STATE_KEY = \"super_state\"\n        const val EDIT_KEY = \"edit\"\n    }\n}"
  },
  {
    "path": "toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditTextView.kt",
    "content": "package com.camerash.toggleedittextview\n\nimport android.content.Context\nimport android.content.res.TypedArray\nimport android.graphics.Color\nimport android.graphics.PorterDuff\nimport android.os.Bundle\nimport android.os.Parcelable\nimport android.support.transition.Fade\nimport android.support.transition.TransitionManager\nimport android.support.transition.TransitionSet\nimport android.text.InputType\nimport android.util.AttributeSet\nimport android.util.SparseArray\nimport android.util.TypedValue\nimport android.view.View\nimport android.widget.EditText\nimport android.widget.FrameLayout\nimport android.widget.TextView\n\n/**\n * Created by camerash on 4/26/18.\n * Compound View to switch between Edit Text and Text View\n */\nclass ToggleEditTextView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : FrameLayout(context, attrs, defStyleAttr) {\n\n    constructor(context: Context) : this(context, null, 0)\n\n    constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)\n\n    var textView: TextView\n        private set\n\n    var editText: EditText\n        private set\n\n    private var editing = false\n\n    init {\n        inflate(getContext(), R.layout.view_toggle_edit_text, this)\n\n        textView = findViewById(R.id.text_view)\n        editText = findViewById(R.id.edit_text)\n\n        if (attrs != null) {\n            val styled = getContext().obtainStyledAttributes(attrs, R.styleable.ToggleEditTextView)\n\n            initAttributes(styled)\n\n            styled.recycle()\n        }\n    }\n\n    private fun initAttributes(styled: TypedArray) {\n        editing = styled.getBoolean(R.styleable.ToggleEditTextView_tetv_editing, false)\n        textView.visibility = if (editing) View.GONE else View.VISIBLE\n        editText.visibility = if (editing) View.VISIBLE else View.GONE\n\n        val textViewColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_textViewColor, Color.BLACK)\n        setTextViewColor(textViewColor)\n\n        val editTextColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_editTextViewColor, Color.BLACK)\n        setEditTextColor(editTextColor)\n\n        val editTextBottomLineColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_editTextBottomLineColor, editTextColor)\n        setEditTextBottomLineColor(editTextBottomLineColor)\n\n        val size = styled.getDimension(R.styleable.ToggleEditTextView_android_textSize, TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 18f, context.resources.displayMetrics))\n        setTextSize(size)\n\n        val hint = styled.getString(R.styleable.ToggleEditTextView_android_hint)\n        if(hint != null) setHint(hint)\n\n        val inputType = styled.getInteger(R.styleable.ToggleEditTextView_android_inputType, InputType.TYPE_CLASS_TEXT)\n        setInputType(inputType)\n\n        val minLines = styled.getInteger(R.styleable.ToggleEditTextView_android_minLines, 0)\n        setMinLines(minLines)\n\n        val maxLines = styled.getInteger(R.styleable.ToggleEditTextView_android_maxLines, Integer.MAX_VALUE)\n        setMaxLines(maxLines)\n    }\n\n    private fun generateTransitionSet(editing: Boolean): TransitionSet {\n        val transitionSet = TransitionSet()\n        val textViewFade = Fade()\n        textViewFade.addTarget(textView)\n        val editTextFade = Fade()\n        editTextFade.addTarget(editText)\n\n        if(editing) textViewFade.startDelay = FADE_DELAY else editTextFade.startDelay = FADE_DELAY\n        return transitionSet.addTransition(textViewFade).addTransition(editTextFade)\n    }\n\n    fun setEditing(editing: Boolean, animate: Boolean) {\n        if (editing != this.editing) {\n            this.editing = editing\n            if (!this.editing) textView.text = editText.text // Set editText text to textView\n\n            if(animate) TransitionManager.beginDelayedTransition(this, generateTransitionSet(this.editing))\n            textView.visibility = if (this.editing) View.GONE else View.VISIBLE\n            editText.visibility = if (this.editing) View.VISIBLE else View.GONE\n            editText.isEnabled = this.editing\n        }\n    }\n\n    fun getEditing(): Boolean = this.editing\n\n    fun getText(): String = editText.text.toString()\n\n    fun setText(text: String) {\n        textView.text = text\n        editText.setText(text)\n    }\n\n    fun getHint(): String = editText.hint.toString()\n\n    fun setHint(hint: String) {\n        textView.hint = hint\n        editText.hint = hint\n    }\n\n    fun getTextSize(): Float = editText.textSize\n\n    fun setTextSize(size: Float) {\n        textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, size)\n        editText.setTextSize(TypedValue.COMPLEX_UNIT_PX, size)\n    }\n\n    fun getTextViewColor(): Int = textView.textColors.defaultColor\n\n    fun setTextViewColor(color: Int) {\n        textView.setTextColor(color)\n    }\n\n    fun getEditTextColor(): Int = editText.textColors.defaultColor\n\n    fun setEditTextColor(color: Int) {\n        editText.setTextColor(color)\n    }\n\n    fun getEditTextEnabled(): Boolean = editText.isEnabled\n\n    fun setEditTextEnabled(enable: Boolean) {\n        editText.isEnabled = enable\n    }\n\n    fun getInputType(): Int = editText.inputType\n\n    fun setInputType(type: Int) {\n        editText.inputType = type\n    }\n\n    fun setMinLines(minLines: Int) {\n        textView.minLines = minLines\n        editText.minLines = minLines\n    }\n\n    fun setMaxLines(maxLines: Int) {\n        textView.maxLines = maxLines\n        editText.maxLines = maxLines\n    }\n\n    fun setEditTextBottomLineColor(color: Int) {\n        editText.background.setColorFilter(color, PorterDuff.Mode.SRC_ATOP)\n    }\n\n    override fun onSaveInstanceState(): Parcelable {\n        val bundle = Bundle()\n        bundle.putParcelable(SUPER_STATE_KEY, super.onSaveInstanceState())\n        bundle.putString(TEXT_KEY, getText())\n        bundle.putBoolean(EDIT_KEY, getEditing())\n        return bundle\n    }\n\n    override fun onRestoreInstanceState(state: Parcelable) {\n        var superState = state\n        if (state is Bundle) {\n            superState = state.getParcelable(SUPER_STATE_KEY)\n            setEditing(state.getBoolean(EDIT_KEY),false)\n            setText(state.getString(TEXT_KEY))\n        }\n        super.onRestoreInstanceState(superState)\n    }\n\n    override fun dispatchSaveInstanceState(container: SparseArray<Parcelable>) {\n        super.dispatchFreezeSelfOnly(container)\n    }\n\n    override fun dispatchRestoreInstanceState(container: SparseArray<Parcelable>) {\n        super.dispatchThawSelfOnly(container)\n    }\n\n    companion object {\n        const val FADE_DELAY = 50L\n        const val SUPER_STATE_KEY = \"super_state\"\n        const val TEXT_KEY = \"text\"\n        const val EDIT_KEY = \"edit\"\n    }\n}"
  },
  {
    "path": "toggleedittextview/src/main/res/drawable/confirm_to_edit_anim.xml",
    "content": "<animated-vector\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    tools:ignore=\"NewApi\">\n    <aapt:attr name=\"android:drawable\">\n        <vector\n            android:name=\"vector\"\n            android:width=\"48dp\"\n            android:height=\"48dp\"\n            android:viewportWidth=\"48\"\n            android:viewportHeight=\"48\">\n            <path\n                android:name=\"ic_edit\"\n                android:pathData=\"M 6.83 26.83 L 12.415 32.415 L 18 38 L 42 14 L 39.17 11.17 L 18 32.34 L 9.66 24 L 6.83 26.83 M 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 L 36.528 11.473 L 36.528 11.473 L 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473\"\n                android:fillColor=\"#000\"\n                android:strokeWidth=\"1\"/>\n        </vector>\n    </aapt:attr>\n    <target android:name=\"ic_edit\">\n        <aapt:attr name=\"android:animation\">\n            <objectAnimator\n                android:propertyName=\"pathData\"\n                android:duration=\"400\"\n                android:valueFrom=\"M 6.83 26.83 L 12.415 32.415 L 18 38 L 42 14 L 39.17 11.17 L 18 32.34 L 9.66 24 L 6.83 26.83 M 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 L 36.528 11.473 L 36.528 11.473 L 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473\"\n                android:valueTo=\"M 6 34.5 L 6 42 L 13.5 42 L 35.63 19.87 L 28.13 12.37 L 17.065 23.435 L 6 34.5 L 6 34.5 M 41.41 14.09 C 41.41 14.09 41.41 14.09 41.41 14.09 L 37.75 17.75 L 30.25 10.25 L 33.91 6.59 C 34.69 5.81 35.96 5.81 36.74 6.59 C 38.297 8.147 39.853 9.703 41.41 11.26 C 42.19 12.04 42.19 13.31 41.41 14.09\"\n                android:valueType=\"pathType\"\n                android:interpolator=\"@android:anim/overshoot_interpolator\"/>\n        </aapt:attr>\n    </target>\n</animated-vector>\n"
  },
  {
    "path": "toggleedittextview/src/main/res/drawable/edit_to_confirm_anim.xml",
    "content": "<animated-vector\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    tools:ignore=\"NewApi\">\n    <aapt:attr name=\"android:drawable\">\n        <vector\n            android:name=\"vector\"\n            android:width=\"48dp\"\n            android:height=\"48dp\"\n            android:viewportWidth=\"48\"\n            android:viewportHeight=\"48\">\n            <path\n                android:name=\"ic_edit\"\n                android:pathData=\"M 6 34.5 L 6 42 L 13.5 42 L 35.63 19.87 L 28.13 12.37 L 6 34.5 Z M 41.41 14.09 C 42.19 13.31 42.19 12.04 41.41 11.26 L 36.74 6.59 C 35.96 5.81 34.69 5.81 33.91 6.59 L 30.25 10.25 L 37.75 17.75 L 41.41 14.09 Z\"\n                android:fillColor=\"#000\"\n                android:strokeWidth=\"1\"/>\n        </vector>\n    </aapt:attr>\n    <target android:name=\"ic_edit\">\n        <aapt:attr name=\"android:animation\">\n            <objectAnimator\n                android:propertyName=\"pathData\"\n                android:duration=\"400\"\n                android:valueFrom=\"M 6 34.5 L 6 34.5 L 6 42 L 13.5 42 L 35.63 19.87 L 28.13 12.37 L 6 34.5 M 41.41 11.26 C 42.19 12.04 42.19 13.31 41.41 14.09 L 41.41 14.09 L 37.75 17.75 L 30.25 10.25 L 33.91 6.59 C 34.69 5.81 35.96 5.81 36.74 6.59 L 41.41 11.26\"\n                android:valueTo=\"M 18 32.34 L 9.66 24 L 6.83 26.83 L 18 38 L 42 14 L 39.17 11.17 L 18 32.34 M 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 L 36.528 11.473 L 36.528 11.473 L 36.528 11.473 L 36.528 11.473 C 36.528 11.473 36.528 11.473 36.528 11.473 L 36.528 11.473\"\n                android:valueType=\"pathType\"\n                android:interpolator=\"@android:anim/overshoot_interpolator\"/>\n        </aapt:attr>\n    </target>\n</animated-vector>\n"
  },
  {
    "path": "toggleedittextview/src/main/res/layout/view_toggle_edit_text.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<merge xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <TextView\n        android:id=\"@+id/text_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:visibility=\"visible\"\n        android:paddingLeft=\"4dp\"\n        android:paddingStart=\"4dp\"\n        android:paddingRight=\"4dp\"\n        android:paddingEnd=\"4dp\"\n        android:paddingTop=\"10dp\"\n        android:paddingBottom=\"10dp\"\n        android:textSize=\"18sp\"\n        android:textColor=\"@android:color/black\"/>\n\n    <EditText\n        android:id=\"@+id/edit_text\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"top\"\n        android:visibility=\"gone\"\n        android:textSize=\"18sp\"\n        android:textColor=\"@android:color/black\" />\n\n</merge>"
  },
  {
    "path": "toggleedittextview/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"ToggleEditTextView\">\n        <attr name=\"tetv_editing\" format=\"boolean\" />\n        <attr name=\"tetv_textViewColor\" format=\"color\" />\n        <attr name=\"tetv_editTextViewColor\" format=\"color\" />\n        <attr name=\"tetv_editTextBottomLineColor\" format=\"color\" />\n        <attr name=\"android:textSize\"/>\n        <attr name=\"android:hint\"/>\n        <attr name=\"android:inputType\"/>\n        <attr name=\"android:minLines\"/>\n        <attr name=\"android:maxLines\"/>\n    </declare-styleable>\n    <declare-styleable name=\"ToggleEditButton\">\n        <attr name=\"teb_tint\" format=\"color\" />\n        <attr name=\"teb_edit\" format=\"boolean\" />\n        <attr name=\"teb_animationOffset\" format=\"integer\" />\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "toggleedittextview/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">ToggleEditTextView</string>\n</resources>\n"
  }
]