Full Code of Camerash/ToggleEditTextView for AI

master 5de27cfd9f2b cached
37 files
55.3 KB
16.3k tokens
1 requests
Download .txt
Repository: Camerash/ToggleEditTextView
Branch: master
Commit: 5de27cfd9f2b
Files: 37
Total size: 55.3 KB

Directory structure:
gitextract_kevp66r5/

├── .gitignore
├── .idea/
│   ├── gradle.xml
│   └── runConfigurations.xml
├── .travis.yml
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── sample/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── camerash/
│           │           └── toggleedittextview/
│           │               └── sample/
│           │                   └── MainActivity.kt
│           └── res/
│               ├── drawable/
│               │   └── ic_launcher_background.xml
│               ├── drawable-v24/
│               │   └── ic_launcher_foreground.xml
│               ├── layout/
│               │   └── activity_main.xml
│               ├── mipmap-anydpi-v26/
│               │   ├── ic_launcher.xml
│               │   └── ic_launcher_round.xml
│               └── values/
│                   ├── colors.xml
│                   ├── strings.xml
│                   └── styles.xml
├── settings.gradle
└── toggleedittextview/
    ├── .gitignore
    ├── build.gradle
    ├── proguard-rules.pro
    └── src/
        └── main/
            ├── AndroidManifest.xml
            ├── java/
            │   └── com/
            │       └── camerash/
            │           └── toggleedittextview/
            │               ├── ToggleEditButton.kt
            │               └── ToggleEditTextView.kt
            └── res/
                ├── drawable/
                │   ├── confirm_to_edit_anim.xml
                │   └── edit_to_confirm_anim.xml
                ├── layout/
                │   └── view_toggle_edit_text.xml
                └── values/
                    ├── attrs.xml
                    └── strings.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Created by https://www.gitignore.io/api/androidstudio

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle
.gradle/
build/

# Signing files
.signing/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp

# Android Patch
gen-external-apklibs

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# IntelliJ IDEA
*.iml
*.iws
/out/

# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar


# End of https://www.gitignore.io/api/androidstudio

================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/sample" />
            <option value="$PROJECT_DIR$/toggleedittextview" />
          </set>
        </option>
        <option name="resolveModulePerSourceSet" value="false" />
      </GradleProjectSettings>
    </option>
  </component>
</project>

================================================
FILE: .idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RunConfigurationProducerService">
    <option name="ignoredProducers">
      <set>
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
      </set>
    </option>
  </component>
</project>

================================================
FILE: .travis.yml
================================================
language: android
jdk: oraclejdk8

android:
  components:
    - tools
    - platform-tools
    - build-tools-27.0.3
    - android-27
    - extra-google-m2repository
    - extra-android-m2repository

script:
   - ./gradlew build

licenses:
    - 'android-sdk-preview-license-.+'
    - 'android-sdk-license-.+'
    - 'google-gdk-license-.+'

before_install:
  - mkdir "$ANDROID_HOME/licenses" || true
  - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
  - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"

install:
  # Temporary fix to Android SDK 27
  # Ref: https://github.com/travis-ci/travis-ci/issues/8874
  - yes | sdkmanager "platforms;android-27"

================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018 Camerash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# ToggleEditTextView :pencil:
Easily switch between EditText and TextView seamlessly.

![Travis CI build status](https://travis-ci.org/Camerash/ToggleEditTextView.svg?branch=master)

![ToggleEditTextView](/assets/preview.gif)

## Grab via Gradle :coffee:
```groovy
dependencies {
    implementation 'com.camerash:toggleedittextview:0.1.1'
}
```

## Usage :computer:

### ToggleEditTextView
In your layout:
```xml
<com.camerash.toggleedittextview.ToggleEditTextView
        android:id="@+id/tetv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/name"
        android:maxLines="1"
        app:tetv_textViewColor="@color/colorPrimary"
        app:tetv_editTextViewColor="@color/colorPrimaryDark"
        app:tetv_editTextBottomLineColor="@color/colorAccent" />
```
Available properties:
* `android:textSize`
* `android:hint`
* `android:inputType`
* `android:minLines`
* `android:maxLines`
* `app:tetv_editing` - Initial state of ToggleEditTextView
* `app:tetv_textViewColor` - Text color of TextView
* `app:tetv_editTextViewColor` - Text color of EditText
* `app:tetv_editTextBottomLineColor` - Bottom line's color of EditText

Available methods:
* `set/getEditing()` - Control editing state of ToggleEditTextView
* `set/getText()` - Set/Get text of ToggleEditTextView
* `set/getHint()` - Set/Get hint of ToggleEditTextView
* `set/getTextSize()` - Set/Get text size of ToggleEditTextView
* `set/getTextViewColor()` - Set/Get color of text of the TextView in ToggleEditTextView
* `set/getEditTextColor()` - Set/Get color of text of the EditText in ToggleEditTextView
* `setEditTextBottomLineColor(Int)` - Set color of bottom line of the EditText in ToggleEditTextView
* `set/getEditTextEnabled()` - Set/Get state of the EditText in ToggleEditTextView
* `set/getInputType()` - Set/Get inputType of the EditText in ToggleEditTextView
* `setMinLines()` - Set minLines of ToggleEditTextView
* `setMaxLines()` - Set maxLines of ToggleEditTextView

---

### ToggleEditButton - Button controller of ToggleEditTextViews

In your layout:
```xml
<com.camerash.toggleedittextview.ToggleEditButton
        android:id="@+id/toggleEditButton"
        android:layout_width="36dp"
        android:layout_height="36dp"
        app:teb_animationOffset="100"
        app:teb_edit="false"
        app:teb_tint="@color/colorAccent" />
```
Available properties:
* `app:teb_edit` - Initial state of ToggleEditButton (Overrides the state of the controlling ToggleEditTextViews)
* `app:teb_tint` - Tint color of the icon
* `app:teb_animationOffset` - Offset duration of fading animation between each ToggleEditTextView controlled by the ToggleEditButton

Available methods:
* `bind(vararg ToggleEditTextView)` - Bind multiple ToggleEditTextViews to the button
* `unbind(ToggleEditTextView)` - Unbind ToggleEditTextView from the button
* `unbindAll()` - Unbind all ToggleEditTextViews from the button
* `set/getAnimationOffset()` - Set/Get the Offset duration of fading animation between each ToggleEditTextView controlled by the ToggleEditButton
* `setOnClickListener(OnClickListener)` - Works the same as a good o' button

## Common usage :bell:
Kotlin:
```kotlin
val tetv1 = findViewById<ToggleEditTextView>(R.id.tetv1)
val tetv2 = findViewById<ToggleEditTextView>(R.id.tetv2)
val teb = findViewById<ToggleEditButton>(R.id.teb)
teb.bind(tetv1, tetv2)
```

Java:
```java
ToggleEditTextView tetv1 = findViewById(R.id.tetv1);
ToggleEditTextView tetv2 = findViewById(R.id.tetv2);
ToggleEditButton teb = findViewById(R.id.teb);
teb.bind(tetv1, tetv2);
```

## Sample :closed_book:
Sample app is under `/sample` directory :tada:

## License :page_with_curl:
```
MIT License

Copyright (c) 2018 Camerash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```


================================================
FILE: build.gradle
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.2.41'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Thu Apr 26 11:22:30 HKT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip


================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true


================================================
FILE: gradlew
================================================
#!/usr/bin/env bash

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
    echo "$*"
}

die ( ) {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
esac

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
    JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"


================================================
FILE: gradlew.bat
================================================
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: sample/.gitignore
================================================
/build


================================================
FILE: sample/build.gradle
================================================
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 27

    defaultConfig {
        applicationId "com.camerash.toggleedittextview.sample"
        minSdkVersion 14
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        abortOnError false
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'

    implementation project(':toggleedittextview')
}


================================================
FILE: sample/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: sample/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.camerash.toggleedittextview.sample">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

================================================
FILE: sample/src/main/java/com/camerash/toggleedittextview/sample/MainActivity.kt
================================================
package com.camerash.toggleedittextview.sample

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        initBinding()
    }

    private fun initBinding() {
        toggleEditButton.bind(tetv1, tetv2, tetv3, tetv4)
    }

}


================================================
FILE: sample/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportHeight="108"
    android:viewportWidth="108">
    <path
        android:fillColor="#26A69A"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,0L39,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M99,0L99,108"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,59L108,59"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,39L89,39"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,19L39,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeColor="#33FFFFFF"
        android:strokeWidth="0.8" />
</vector>


================================================
FILE: sample/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportHeight="108"
    android:viewportWidth="108">
    <path
        android:fillType="evenOdd"
        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"
        android:strokeColor="#00000000"
        android:strokeWidth="1">
        <aapt:attr name="android:fillColor">
            <gradient
                android:endX="78.5885"
                android:endY="90.9159"
                android:startX="48.7653"
                android:startY="61.0927"
                android:type="linear">
                <item
                    android:color="#44000000"
                    android:offset="0.0" />
                <item
                    android:color="#00000000"
                    android:offset="1.0" />
            </gradient>
        </aapt:attr>
    </path>
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        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"
        android:strokeColor="#00000000"
        android:strokeWidth="1" />
</vector>


================================================
FILE: sample/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.camerash.toggleedittextview.sample.MainActivity">

    <com.camerash.toggleedittextview.ToggleEditButton
        android:id="@+id/toggleEditButton"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginTop="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:teb_animationOffset="100"
        app:teb_edit="false"
        app:teb_tint="@color/colorAccent" />

    <com.camerash.toggleedittextview.ToggleEditTextView
        android:id="@+id/tetv1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="16dp"
        android:hint="@string/name"
        android:maxLines="1"
        app:tetv_textViewColor="@color/colorPrimary"
        app:tetv_editTextViewColor="@color/colorPrimaryDark"
        app:tetv_editTextBottomLineColor="@color/colorAccent"
        app:layout_constraintBottom_toTopOf="@+id/tetv2"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/toggleEditButton"
        app:layout_constraintVertical_chainStyle="spread" />

    <com.camerash.toggleedittextview.ToggleEditTextView
        android:id="@+id/tetv2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="16dp"
        android:hint="@string/age"
        android:maxLines="1"
        app:tetv_textViewColor="@color/colorPrimary"
        app:tetv_editTextViewColor="@color/colorPrimaryDark"
        app:tetv_editTextBottomLineColor="@color/colorAccent"
        app:layout_constraintBottom_toTopOf="@+id/tetv3"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tetv1" />

    <com.camerash.toggleedittextview.ToggleEditTextView
        android:id="@+id/tetv3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="16dp"
        android:hint="@string/hobbies"
        android:minLines="5"
        android:maxLines="5"
        app:tetv_textViewColor="@color/colorPrimary"
        app:tetv_editTextViewColor="@color/colorPrimaryDark"
        app:tetv_editTextBottomLineColor="@color/colorAccent"
        app:layout_constraintBottom_toTopOf="@+id/tetv4"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tetv2" />

    <com.camerash.toggleedittextview.ToggleEditTextView
        android:id="@+id/tetv4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="16dp"
        android:hint="@string/address"
        android:inputType="textMultiLine"
        android:minLines="5"
        android:maxLines="5"
        app:tetv_textViewColor="@color/colorPrimary"
        app:tetv_editTextViewColor="@color/colorPrimaryDark"
        app:tetv_editTextBottomLineColor="@color/colorAccent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tetv3" />

</android.support.constraint.ConstraintLayout>


================================================
FILE: sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

================================================
FILE: sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

================================================
FILE: sample/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#0277bd</color>
    <color name="colorPrimaryDark">#004c8c</color>
    <color name="colorAccent">#439889</color>
</resources>


================================================
FILE: sample/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">ToggleEditTextView</string>

    <string name="name">Name</string>
    <string name="age">Age</string>
    <string name="hobbies">Hobbies</string>
    <string name="address">Address</string>
</resources>


================================================
FILE: sample/src/main/res/values/styles.xml
================================================
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>


================================================
FILE: settings.gradle
================================================
include ':sample', ':toggleedittextview'


================================================
FILE: toggleedittextview/.gitignore
================================================
/build


================================================
FILE: toggleedittextview/build.gradle
================================================
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

def VERSION = '0.1.1'

group = 'com.camerash'
version = VERSION

def bintrayUser = System.getenv('BINTRAY_USER')
def bintrayApiKey = System.getenv('BINTRAY_API_KEY')

if (project.rootProject.file('local.properties').exists()) {
    Properties localProperties = new Properties()
    localProperties.load(project.rootProject.file('local.properties').newDataInputStream())

    bintrayUser = localProperties.getProperty('bintray.user', bintrayUser)
    bintrayApiKey = localProperties.getProperty('bintray.apikey', bintrayApiKey)
}

android {
    compileSdkVersion 27

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 27
        versionCode 1
        versionName VERSION

        vectorDrawables.useSupportLibrary = true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation "com.android.support:design:27.1.1"
}

repositories {
    mavenCentral()
}

task sourcesJar(type: Jar) {
    classifier = 'sources'
    from android.sourceSets.main.java.srcDirs
}

task javadoc(type: Javadoc) {
    excludes = ['**/*.kt'] // exclude kotlin files
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives javadocJar
    archives sourcesJar
}

bintray {
    user = bintrayUser
    key = bintrayApiKey
    configurations = ['archives']
    pkg {
        repo = 'maven'
        name = 'ToggleEditTextView'
        desc = 'Easily switch between EditText and TextView seamlessly.'
        websiteUrl = 'https://github.com/Camerash/ToggleEditTextView'
        vcsUrl = 'https://github.com/Camerash/ToggleEditTextView.git'
        licenses = ['MIT']
        publish = true
        publicDownloadNumbers = true
        version {
            name = VERSION
            desc = "ToggleEditTextView ${VERSION}"
            released  = new Date()
            vcsTag = VERSION
        }
    }
}

install {
    repositories.mavenInstaller {
        pom {
            project {
                packaging 'aar'
                groupId this.group
                artifactId 'toggleedittextview'

                name 'toggleedittextview'
                description 'Easily switch between EditText and TextView seamlessly.'
                url 'https://github.com/Camerash/ToggleEditTextView'

                version = this.version

                licenses {
                    license {
                        name 'The MIT License'
                        url 'http://opensource.org/licenses/MIT'
                    }
                }
                developers {
                    developer {
                        id 'camerash'
                        name 'Esmond Wong'
                        email 'esmond9981127@gmail.com'
                    }
                }
                scm {
                    connection 'https://github.com/Camerash/ToggleEditTextView.git'
                    developerConnection 'https://github.com/Camerash/ToggleEditTextView.git'
                    url 'https://github.com/Camerash/ToggleEditTextView'
                }
            }
        }
    }
}

================================================
FILE: toggleedittextview/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile


================================================
FILE: toggleedittextview/src/main/AndroidManifest.xml
================================================
<manifest package="com.camerash.toggleedittextview" />


================================================
FILE: toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditButton.kt
================================================
package com.camerash.toggleedittextview

import android.content.Context
import android.content.res.TypedArray
import android.graphics.Color
import android.os.Bundle
import android.os.Handler
import android.os.Parcelable
import android.support.graphics.drawable.AnimatedVectorDrawableCompat
import android.support.v7.widget.AppCompatImageButton
import android.util.AttributeSet

/**
 * Created by camerash on 4/26/18.
 * Controller button for controlling single / grouped ToggleEditTextView(s)
 */
class ToggleEditButton(context: Context, attrs: AttributeSet?, defStyleAttr: Int): AppCompatImageButton(context, attrs, defStyleAttr) {

    private val tetvArrayList = arrayListOf<ToggleEditTextView>()
    private val editToConfirmAnim = AnimatedVectorDrawableCompat.create(context, R.drawable.edit_to_confirm_anim)
    private val confirmToEditAnim = AnimatedVectorDrawableCompat.create(context, R.drawable.confirm_to_edit_anim)

    private var onClickListener: OnClickListener? = null

    private var editing = false
    private var animationOffset = 100L

    constructor(context: Context): this(context, null, 0)

    constructor(context: Context, attrs: AttributeSet): this(context, attrs, 0)

    init {
        if(attrs != null) {
            val styled = getContext().obtainStyledAttributes(attrs, R.styleable.ToggleEditButton)

            initAttributes(styled)

            styled.recycle()
        }

        super.setOnClickListener {
            setEditing(!editing, true)
            onClickListener?.onClick(it)
        }
    }

    private fun initAttributes(styled: TypedArray) {
        val tint = styled.getColor(R.styleable.ToggleEditButton_teb_tint, Color.BLACK)
        setTint(tint)

        val editing = styled.getBoolean(R.styleable.ToggleEditButton_teb_edit, false)
        setEditing(editing, false)

        val offset = styled.getInteger(R.styleable.ToggleEditButton_teb_animationOffset, 100).toLong()
        setAnimationOffset(offset)
    }

    private fun resetButton(animate: Boolean) {
        editToConfirmAnim?.stop()
        confirmToEditAnim?.stop()

        if(animate) {
            setImageDrawable(if (this.editing) editToConfirmAnim else confirmToEditAnim)
            if (this.editing) editToConfirmAnim?.start() else confirmToEditAnim?.start()
        } else {
            setImageDrawable(if (this.editing) confirmToEditAnim else editToConfirmAnim)
        }
    }

    fun getEditing(): Boolean = this.editing

    fun setEditing(editing: Boolean, animate: Boolean) {
        this.editing = editing
        if(animate) {
            tetvArrayList.forEachIndexed { i, tetv ->
                tetv.setEditTextEnabled(this.editing)
                Handler().postDelayed({ tetv.setEditing(this.editing, animate) }, animationOffset*i)
            }
            resetButton(animate)
        } else {
            tetvArrayList.forEach { it.setEditing(this.editing, animate) }
            resetButton(animate)
        }
    }

    fun setTint(color: Int) {
        editToConfirmAnim?.setTint(color)
        confirmToEditAnim?.setTint(color)
    }

    fun bind(vararg toggleEditTextView: ToggleEditTextView) {
        tetvArrayList.addAll(toggleEditTextView)
        tetvArrayList.forEach { it.setEditing(this.editing, false) }
    }

    fun unbind(toggleEditTextView: ToggleEditTextView) {
        tetvArrayList.remove(toggleEditTextView)
    }

    fun unbindAll() {
        tetvArrayList.clear()
    }

    fun getAnimationOffset(): Long = animationOffset

    fun setAnimationOffset(offset: Long) {
        this.animationOffset = offset
    }

    override fun setOnClickListener(l: OnClickListener?) {
        this.onClickListener = l
    }

    override fun onSaveInstanceState(): Parcelable {
        val bundle = Bundle()
        bundle.putParcelable(SUPER_STATE_KEY, super.onSaveInstanceState())
        bundle.putBoolean(EDIT_KEY, getEditing())
        return bundle
    }

    override fun onRestoreInstanceState(state: Parcelable) {
        var superState = state
        if (state is Bundle) {
            superState = state.getParcelable(SUPER_STATE_KEY)
            setEditing(state.getBoolean(EDIT_KEY),false)
        }
        super.onRestoreInstanceState(superState)
    }

    companion object {
        const val SUPER_STATE_KEY = "super_state"
        const val EDIT_KEY = "edit"
    }
}

================================================
FILE: toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditTextView.kt
================================================
package com.camerash.toggleedittextview

import android.content.Context
import android.content.res.TypedArray
import android.graphics.Color
import android.graphics.PorterDuff
import android.os.Bundle
import android.os.Parcelable
import android.support.transition.Fade
import android.support.transition.TransitionManager
import android.support.transition.TransitionSet
import android.text.InputType
import android.util.AttributeSet
import android.util.SparseArray
import android.util.TypedValue
import android.view.View
import android.widget.EditText
import android.widget.FrameLayout
import android.widget.TextView

/**
 * Created by camerash on 4/26/18.
 * Compound View to switch between Edit Text and Text View
 */
class ToggleEditTextView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : FrameLayout(context, attrs, defStyleAttr) {

    constructor(context: Context) : this(context, null, 0)

    constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)

    var textView: TextView
        private set

    var editText: EditText
        private set

    private var editing = false

    init {
        inflate(getContext(), R.layout.view_toggle_edit_text, this)

        textView = findViewById(R.id.text_view)
        editText = findViewById(R.id.edit_text)

        if (attrs != null) {
            val styled = getContext().obtainStyledAttributes(attrs, R.styleable.ToggleEditTextView)

            initAttributes(styled)

            styled.recycle()
        }
    }

    private fun initAttributes(styled: TypedArray) {
        editing = styled.getBoolean(R.styleable.ToggleEditTextView_tetv_editing, false)
        textView.visibility = if (editing) View.GONE else View.VISIBLE
        editText.visibility = if (editing) View.VISIBLE else View.GONE

        val textViewColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_textViewColor, Color.BLACK)
        setTextViewColor(textViewColor)

        val editTextColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_editTextViewColor, Color.BLACK)
        setEditTextColor(editTextColor)

        val editTextBottomLineColor = styled.getColor(R.styleable.ToggleEditTextView_tetv_editTextBottomLineColor, editTextColor)
        setEditTextBottomLineColor(editTextBottomLineColor)

        val size = styled.getDimension(R.styleable.ToggleEditTextView_android_textSize, TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 18f, context.resources.displayMetrics))
        setTextSize(size)

        val hint = styled.getString(R.styleable.ToggleEditTextView_android_hint)
        if(hint != null) setHint(hint)

        val inputType = styled.getInteger(R.styleable.ToggleEditTextView_android_inputType, InputType.TYPE_CLASS_TEXT)
        setInputType(inputType)

        val minLines = styled.getInteger(R.styleable.ToggleEditTextView_android_minLines, 0)
        setMinLines(minLines)

        val maxLines = styled.getInteger(R.styleable.ToggleEditTextView_android_maxLines, Integer.MAX_VALUE)
        setMaxLines(maxLines)
    }

    private fun generateTransitionSet(editing: Boolean): TransitionSet {
        val transitionSet = TransitionSet()
        val textViewFade = Fade()
        textViewFade.addTarget(textView)
        val editTextFade = Fade()
        editTextFade.addTarget(editText)

        if(editing) textViewFade.startDelay = FADE_DELAY else editTextFade.startDelay = FADE_DELAY
        return transitionSet.addTransition(textViewFade).addTransition(editTextFade)
    }

    fun setEditing(editing: Boolean, animate: Boolean) {
        if (editing != this.editing) {
            this.editing = editing
            if (!this.editing) textView.text = editText.text // Set editText text to textView

            if(animate) TransitionManager.beginDelayedTransition(this, generateTransitionSet(this.editing))
            textView.visibility = if (this.editing) View.GONE else View.VISIBLE
            editText.visibility = if (this.editing) View.VISIBLE else View.GONE
            editText.isEnabled = this.editing
        }
    }

    fun getEditing(): Boolean = this.editing

    fun getText(): String = editText.text.toString()

    fun setText(text: String) {
        textView.text = text
        editText.setText(text)
    }

    fun getHint(): String = editText.hint.toString()

    fun setHint(hint: String) {
        textView.hint = hint
        editText.hint = hint
    }

    fun getTextSize(): Float = editText.textSize

    fun setTextSize(size: Float) {
        textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, size)
        editText.setTextSize(TypedValue.COMPLEX_UNIT_PX, size)
    }

    fun getTextViewColor(): Int = textView.textColors.defaultColor

    fun setTextViewColor(color: Int) {
        textView.setTextColor(color)
    }

    fun getEditTextColor(): Int = editText.textColors.defaultColor

    fun setEditTextColor(color: Int) {
        editText.setTextColor(color)
    }

    fun getEditTextEnabled(): Boolean = editText.isEnabled

    fun setEditTextEnabled(enable: Boolean) {
        editText.isEnabled = enable
    }

    fun getInputType(): Int = editText.inputType

    fun setInputType(type: Int) {
        editText.inputType = type
    }

    fun setMinLines(minLines: Int) {
        textView.minLines = minLines
        editText.minLines = minLines
    }

    fun setMaxLines(maxLines: Int) {
        textView.maxLines = maxLines
        editText.maxLines = maxLines
    }

    fun setEditTextBottomLineColor(color: Int) {
        editText.background.setColorFilter(color, PorterDuff.Mode.SRC_ATOP)
    }

    override fun onSaveInstanceState(): Parcelable {
        val bundle = Bundle()
        bundle.putParcelable(SUPER_STATE_KEY, super.onSaveInstanceState())
        bundle.putString(TEXT_KEY, getText())
        bundle.putBoolean(EDIT_KEY, getEditing())
        return bundle
    }

    override fun onRestoreInstanceState(state: Parcelable) {
        var superState = state
        if (state is Bundle) {
            superState = state.getParcelable(SUPER_STATE_KEY)
            setEditing(state.getBoolean(EDIT_KEY),false)
            setText(state.getString(TEXT_KEY))
        }
        super.onRestoreInstanceState(superState)
    }

    override fun dispatchSaveInstanceState(container: SparseArray<Parcelable>) {
        super.dispatchFreezeSelfOnly(container)
    }

    override fun dispatchRestoreInstanceState(container: SparseArray<Parcelable>) {
        super.dispatchThawSelfOnly(container)
    }

    companion object {
        const val FADE_DELAY = 50L
        const val SUPER_STATE_KEY = "super_state"
        const val TEXT_KEY = "text"
        const val EDIT_KEY = "edit"
    }
}

================================================
FILE: toggleedittextview/src/main/res/drawable/confirm_to_edit_anim.xml
================================================
<animated-vector
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    tools:ignore="NewApi">
    <aapt:attr name="android:drawable">
        <vector
            android:name="vector"
            android:width="48dp"
            android:height="48dp"
            android:viewportWidth="48"
            android:viewportHeight="48">
            <path
                android:name="ic_edit"
                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"
                android:fillColor="#000"
                android:strokeWidth="1"/>
        </vector>
    </aapt:attr>
    <target android:name="ic_edit">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:duration="400"
                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"
                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"
                android:valueType="pathType"
                android:interpolator="@android:anim/overshoot_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>


================================================
FILE: toggleedittextview/src/main/res/drawable/edit_to_confirm_anim.xml
================================================
<animated-vector
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    tools:ignore="NewApi">
    <aapt:attr name="android:drawable">
        <vector
            android:name="vector"
            android:width="48dp"
            android:height="48dp"
            android:viewportWidth="48"
            android:viewportHeight="48">
            <path
                android:name="ic_edit"
                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"
                android:fillColor="#000"
                android:strokeWidth="1"/>
        </vector>
    </aapt:attr>
    <target android:name="ic_edit">
        <aapt:attr name="android:animation">
            <objectAnimator
                android:propertyName="pathData"
                android:duration="400"
                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"
                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"
                android:valueType="pathType"
                android:interpolator="@android:anim/overshoot_interpolator"/>
        </aapt:attr>
    </target>
</animated-vector>


================================================
FILE: toggleedittextview/src/main/res/layout/view_toggle_edit_text.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" >

    <TextView
        android:id="@+id/text_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="visible"
        android:paddingLeft="4dp"
        android:paddingStart="4dp"
        android:paddingRight="4dp"
        android:paddingEnd="4dp"
        android:paddingTop="10dp"
        android:paddingBottom="10dp"
        android:textSize="18sp"
        android:textColor="@android:color/black"/>

    <EditText
        android:id="@+id/edit_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="top"
        android:visibility="gone"
        android:textSize="18sp"
        android:textColor="@android:color/black" />

</merge>

================================================
FILE: toggleedittextview/src/main/res/values/attrs.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="ToggleEditTextView">
        <attr name="tetv_editing" format="boolean" />
        <attr name="tetv_textViewColor" format="color" />
        <attr name="tetv_editTextViewColor" format="color" />
        <attr name="tetv_editTextBottomLineColor" format="color" />
        <attr name="android:textSize"/>
        <attr name="android:hint"/>
        <attr name="android:inputType"/>
        <attr name="android:minLines"/>
        <attr name="android:maxLines"/>
    </declare-styleable>
    <declare-styleable name="ToggleEditButton">
        <attr name="teb_tint" format="color" />
        <attr name="teb_edit" format="boolean" />
        <attr name="teb_animationOffset" format="integer" />
    </declare-styleable>
</resources>

================================================
FILE: toggleedittextview/src/main/res/values/strings.xml
================================================
<resources>
    <string name="app_name">ToggleEditTextView</string>
</resources>
Download .txt
gitextract_kevp66r5/

├── .gitignore
├── .idea/
│   ├── gradle.xml
│   └── runConfigurations.xml
├── .travis.yml
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── sample/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── camerash/
│           │           └── toggleedittextview/
│           │               └── sample/
│           │                   └── MainActivity.kt
│           └── res/
│               ├── drawable/
│               │   └── ic_launcher_background.xml
│               ├── drawable-v24/
│               │   └── ic_launcher_foreground.xml
│               ├── layout/
│               │   └── activity_main.xml
│               ├── mipmap-anydpi-v26/
│               │   ├── ic_launcher.xml
│               │   └── ic_launcher_round.xml
│               └── values/
│                   ├── colors.xml
│                   ├── strings.xml
│                   └── styles.xml
├── settings.gradle
└── toggleedittextview/
    ├── .gitignore
    ├── build.gradle
    ├── proguard-rules.pro
    └── src/
        └── main/
            ├── AndroidManifest.xml
            ├── java/
            │   └── com/
            │       └── camerash/
            │           └── toggleedittextview/
            │               ├── ToggleEditButton.kt
            │               └── ToggleEditTextView.kt
            └── res/
                ├── drawable/
                │   ├── confirm_to_edit_anim.xml
                │   └── edit_to_confirm_anim.xml
                ├── layout/
                │   └── view_toggle_edit_text.xml
                └── values/
                    ├── attrs.xml
                    └── strings.xml
Condensed preview — 37 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (62K chars).
[
  {
    "path": ".gitignore",
    "chars": 2013,
    "preview": "# Created by https://www.gitignore.io/api/androidstudio\n\n### AndroidStudio ###\n# Covers files to be ignored for android "
  },
  {
    "path": ".idea/gradle.xml",
    "chars": 693,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linke"
  },
  {
    "path": ".idea/runConfigurations.xml",
    "chars": 564,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <o"
  },
  {
    "path": ".travis.yml",
    "chars": 764,
    "preview": "language: android\njdk: oraclejdk8\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n    - build-tools-27.0.3\n    "
  },
  {
    "path": "LICENSE",
    "chars": 1065,
    "preview": "MIT License\n\nCopyright (c) 2018 Camerash\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
  },
  {
    "path": "README.md",
    "chars": 4769,
    "preview": "# ToggleEditTextView :pencil:\nEasily switch between EditText and TextView seamlessly.\n\n![Travis CI build status](https:/"
  },
  {
    "path": "build.gradle",
    "chars": 788,
    "preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    e"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 230,
    "preview": "#Thu Apr 26 11:22:30 HKT 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "gradle.properties",
    "chars": 730,
    "preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
  },
  {
    "path": "gradlew",
    "chars": 4971,
    "preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start "
  },
  {
    "path": "gradlew.bat",
    "chars": 2314,
    "preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
  },
  {
    "path": "sample/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "sample/build.gradle",
    "chars": 919,
    "preview": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandr"
  },
  {
    "path": "sample/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "sample/src/main/AndroidManifest.xml",
    "chars": 732,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "sample/src/main/java/com/camerash/toggleedittextview/sample/MainActivity.kt",
    "chars": 496,
    "preview": "package com.camerash.toggleedittextview.sample\n\nimport android.os.Bundle\nimport android.support.v7.app.AppCompatActivity"
  },
  {
    "path": "sample/src/main/res/drawable/ic_launcher_background.xml",
    "chars": 5606,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:wi"
  },
  {
    "path": "sample/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "chars": 1880,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    "
  },
  {
    "path": "sample/src/main/res/layout/activity_main.xml",
    "chars": 4757,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.constraint.ConstraintLayout xmlns:android=\"http://schemas.androi"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 272,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "chars": 272,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "sample/src/main/res/values/colors.xml",
    "chars": 208,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#0277bd</color>\n    <color name=\"color"
  },
  {
    "path": "sample/src/main/res/values/strings.xml",
    "chars": 244,
    "preview": "<resources>\n    <string name=\"app_name\">ToggleEditTextView</string>\n\n    <string name=\"name\">Name</string>\n    <string n"
  },
  {
    "path": "sample/src/main/res/values/styles.xml",
    "chars": 383,
    "preview": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
  },
  {
    "path": "settings.gradle",
    "chars": 41,
    "preview": "include ':sample', ':toggleedittextview'\n"
  },
  {
    "path": "toggleedittextview/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "toggleedittextview/build.gradle",
    "chars": 3729,
    "preview": "apply plugin: 'com.android.library'\napply plugin: 'kotlin-android'\napply plugin: 'com.jfrog.bintray'\napply plugin: 'com."
  },
  {
    "path": "toggleedittextview/proguard-rules.pro",
    "chars": 751,
    "preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
  },
  {
    "path": "toggleedittextview/src/main/AndroidManifest.xml",
    "chars": 55,
    "preview": "<manifest package=\"com.camerash.toggleedittextview\" />\n"
  },
  {
    "path": "toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditButton.kt",
    "chars": 4351,
    "preview": "package com.camerash.toggleedittextview\n\nimport android.content.Context\nimport android.content.res.TypedArray\nimport and"
  },
  {
    "path": "toggleedittextview/src/main/java/com/camerash/toggleedittextview/ToggleEditTextView.kt",
    "chars": 6664,
    "preview": "package com.camerash.toggleedittextview\n\nimport android.content.Context\nimport android.content.res.TypedArray\nimport and"
  },
  {
    "path": "toggleedittextview/src/main/res/drawable/confirm_to_edit_anim.xml",
    "chars": 2057,
    "preview": "<animated-vector\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:android=\"http://schemas.android.com/apk/re"
  },
  {
    "path": "toggleedittextview/src/main/res/drawable/edit_to_confirm_anim.xml",
    "chars": 1793,
    "preview": "<animated-vector\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    xmlns:android=\"http://schemas.android.com/apk/re"
  },
  {
    "path": "toggleedittextview/src/main/res/layout/view_toggle_edit_text.xml",
    "chars": 872,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<merge xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n    <TextVie"
  },
  {
    "path": "toggleedittextview/src/main/res/values/attrs.xml",
    "chars": 809,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <declare-styleable name=\"ToggleEditTextView\">\n        <attr name="
  },
  {
    "path": "toggleedittextview/src/main/res/values/strings.xml",
    "chars": 81,
    "preview": "<resources>\n    <string name=\"app_name\">ToggleEditTextView</string>\n</resources>\n"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the Camerash/ToggleEditTextView GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 37 files (55.3 KB), approximately 16.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!