main 47e82d9246d0 cached
49 files
96.9 KB
25.9k tokens
117 symbols
1 requests
Download .txt
Repository: Commit451/ElasticDragDismissLayout
Branch: main
Commit: 47e82d9246d0
Files: 49
Total size: 96.9 KB

Directory structure:
gitextract_9oxfyu4l/

├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── commit451/
│           │           └── elasticdragdismisslayout/
│           │               └── sample/
│           │                   ├── Cheese.java
│           │                   ├── CheeseAdapter.java
│           │                   ├── CheeseViewHolder.java
│           │                   ├── Cheeses.java
│           │                   ├── ColorUtils.java
│           │                   ├── DetailActivity.java
│           │                   ├── DetailRecyclerViewActivity.java
│           │                   ├── MainActivity.java
│           │                   └── SystemChromeFader.java
│           └── res/
│               ├── drawable/
│               │   ├── ic_arrow_back_24dp.xml
│               │   └── ic_favorite_24dp.xml
│               ├── layout/
│               │   ├── activity_detail.xml
│               │   ├── activity_detail_recyclerview.xml
│               │   ├── activity_main.xml
│               │   ├── item_cheese.xml
│               │   └── viewholder_game.xml
│               ├── menu/
│               │   └── main.xml
│               ├── transition/
│               │   └── about_return_downward.xml
│               └── values/
│                   ├── colors.xml
│                   ├── dimens.xml
│                   ├── ids.xml
│                   ├── strings.xml
│                   └── styles.xml
├── build.gradle
├── elasticdragdismisslayout/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── commit451/
│           │           └── elasticdragdismisslayout/
│           │               ├── ElasticDragDismissCallback.java
│           │               ├── ElasticDragDismissDelegate.java
│           │               ├── ElasticDragDismissFrameLayout.java
│           │               ├── ElasticDragDismissLinearLayout.java
│           │               ├── ElasticDragDismissRelativeLayout.java
│           │               └── Util.java
│           └── res/
│               └── values/
│                   └── attrs_drag_dismissables.xml
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle

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

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

### Android ###

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/

# Gradle files
.gradle/
build/

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

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log


### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml

# Ignore Gradle GUI config
gradle-app.setting

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

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*.DS_Store

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

jdk:
  - oraclejdk8

android:
  components:
    - tools
    - platform-tools

before_install:
  - mkdir "$ANDROID_HOME/licenses" || true
  - echo "d56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
  - yes | sdkmanager tools
  - chmod +x gradlew

script: "./gradlew build"


================================================
FILE: LICENSE.txt
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: README.md
================================================
# ElasticDragDismissLayout
Standard ViewGroups which responds to nested scrolls to create drag-dismissable layouts. Original code taken from [Plaid](https://github.com/nickbutcher/plaid) and made backwards compatible.

[![Build Status](https://travis-ci.org/Commit451/ElasticDragDismissLayout.svg?branch=master)](https://travis-ci.org/Commit451/ElasticDragDismissLayout) [![](https://jitpack.io/v/Commit451/ElasticDragDismissLayout.svg)](https://jitpack.io/#Commit451/ElasticDragDismissLayout)

<img src="/art/sample.gif?raw=true" width="200px">

# Gradle Dependency

Add this in your root `build.gradle` file (**not** your module `build.gradle` file):

```gradle
allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}
```

Then, add the library to your project `build.gradle`
```gradle
dependencies {
    implementation 'com.github.Commit451:ElasticDragDismissLayout:1.0.4'
}
```

# Usage
See the sample project for a full example. Within XML:

```xml
<com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/draggable_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    app:dragDismissDistance="112dp"
    app:dragDismissScale="0.95">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="#993F51B5" />

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout>
```
In addition, you will probably want to have your new activity have a theme that allows for transparency. See `styles.xml` for an example.

To allow for dismiss:
```java
mDraggableFrame.addListener(new ElasticDragDismissListener() {
        @Override
        public void onDrag(float elasticOffset, float elasticOffsetPixels, float rawOffset, float rawOffsetPixels) {}

        @Override
        public void onDragDismissed() {
            //if you are targeting 21+ you might want to finish after transition
            finish();
        }
    });
```

# Supported ScrollViews
- ScrollView (if 21+ and android:nestedScrollingEnabled="true")
- RecyclerView
- NestedScrollView (from support v4 library)

# Currently Created Elastic Views
- ElasticDragDismissFrameLayout
- ElasticDragDismissLinearLayout
- ElasticDragDismissRelativeLayout

You can create your own by using the `ElasticDragDismissDelegate` and using one of the created views as a reference.

License
--------

    Copyright 2015 Google, Inc.
    Copyright 2017 Commit 451

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


================================================
FILE: app/.gitignore
================================================
/build


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

android {
    compileSdkVersion 28

    defaultConfig {
        applicationId "com.commit451.elasticdragdismisslayout.sample"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'

    implementation 'com.jakewharton:butterknife:10.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

    implementation 'com.github.bumptech.glide:glide:4.3.1'

    implementation 'com.github.Commit451:Viewtiful:1.0.3'

    implementation project(':elasticdragdismisslayout')
}


================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Jawn\Develop\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}


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

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        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>
        <activity android:name=".DetailActivity" android:theme="@style/AppTheme.Translucent"/>
        <activity android:name=".DetailRecyclerViewActivity" android:theme="@style/AppTheme.Translucent" />
    </application>

</manifest>


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheese.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import java.io.Serializable;

/**
 * A fake model to show usage
 * Created by John on 11/24/15.
 */
public class Cheese implements Serializable {

    int mDrawable;
    String mName;

    public Cheese(int drawable, String name) {
        mDrawable = drawable;
        mName = name;
    }

    public int getDrawable() {
        return mDrawable;
    }

    public String getName() {
        return mName;
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseAdapter.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.Collection;

/**
 * Adapter for the recyclerview, which holds cheeses
 */
public class CheeseAdapter extends RecyclerView.Adapter<CheeseViewHolder> {

    private Listener mListener;
    private ArrayList<Cheese> mValues;
    private final View.OnClickListener mOnClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            int position = (int) v.getTag(R.id.list_position);
            Cheese cheese = getItemAt(position);
            //Communicate to the activity that the item was long pressed
            mListener.onItemClicked(cheese);
        }
    };

    public CheeseAdapter(Context context, Listener listener) {
        mListener = listener;
        mValues = new ArrayList<>();
    }

    public void setData(Collection<Cheese> cheeses) {
        mValues.addAll(cheeses);
        notifyDataSetChanged();
    }

    @Override
    public CheeseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        CheeseViewHolder holder = CheeseViewHolder.newInstance(parent);
        holder.itemView.setOnClickListener(mOnClickListener);
        return holder;
    }

    @Override
    public void onBindViewHolder(final CheeseViewHolder holder, int position) {
        Cheese cheese = getItemAt(position);
        holder.bind(cheese);
        holder.itemView.setTag(R.id.list_position, position);
        holder.itemView.setTag(R.id.list_holder, holder);
    }

    @Override
    public int getItemCount() {
        return mValues.size();
    }

    private Cheese getItemAt(int position) {
        return mValues.get(position);
    }

    public interface Listener {
        void onItemClicked(Cheese cheese);
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseViewHolder.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

/**
 * The view holder related to each Cheese item
 * Created by John on 11/24/15.
 */
public class CheeseViewHolder extends RecyclerView.ViewHolder {

    public static CheeseViewHolder newInstance(ViewGroup parent) {
        View view = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.item_cheese, parent, false);
        return new CheeseViewHolder(view);
    }

    public ImageView image;
    public TextView title;

    public CheeseViewHolder(View view) {
        super(view);
        image = view.findViewById(R.id.image);
        title = view.findViewById(R.id.name);
    }

    public void bind(Cheese cheese) {
        image.setImageResource(cheese.getDrawable());
        title.setText(cheese.getName());
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheeses.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import java.util.Random;

public class Cheeses {

    private static final Random RANDOM = new Random();

    public static int getRandomCheeseDrawable() {
        switch (RANDOM.nextInt(5)) {
            default:
            case 0:
                return R.drawable.cheese_1;
            case 1:
                return R.drawable.cheese_2;
            case 2:
                return R.drawable.cheese_3;
            case 3:
                return R.drawable.cheese_4;
            case 4:
                return R.drawable.cheese_5;
        }
    }

    public static final String[] sCheeseStrings = {
            "Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam", "Abondance", "Ackawi",
            "Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l Pitu", "Airag", "Airedale",
            "Aisy Cendre", "Allgauer Emmentaler", "Alverca", "Ambert", "American Cheese",
            "Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-Bilh", "Anthoriro", "Appenzell",
            "Aragon", "Ardi Gasna", "Ardrahan", "Armenian String", "Aromes au Gene de Marc",
            "Asadero", "Asiago", "Aubisque Pyrenees", "Autun", "Avaxtskyr", "Baby Swiss",
            "Babybel", "Baguette Laonnaise", "Bakers", "Baladi", "Balaton", "Bandal", "Banon",
            "Barry's Bay Cheddar", "Basing", "Basket Cheese", "Bath Cheese", "Bavarian Bergkase",
            "Baylough", "Beaufort", "Beauvoorde", "Beenleigh Blue", "Beer Cheese", "Bel Paese",
            "Bergader", "Bergere Bleue", "Berkswell", "Beyaz Peynir", "Bierkase", "Bishop Kennedy",
            "Blarney", "Bleu d'Auvergne", "Bleu de Gex", "Bleu de Laqueuille",
            "Bleu de Septmoncel", "Bleu Des Causses", "Blue", "Blue Castello", "Blue Rathgore",
            "Blue Vein (Australian)", "Blue Vein Cheeses", "Bocconcini", "Bocconcini (Australian)",
            "Boeren Leidenkaas", "Bonchester", "Bosworth", "Bougon", "Boule Du Roves",
            "Boulette d'Avesnes", "Boursault", "Boursin", "Bouyssou", "Bra", "Braudostur",
            "Breakfast Cheese", "Brebis du Lavort", "Brebis du Lochois", "Brebis du Puyfaucon",
            "Bresse Bleu", "Brick", "Brie", "Brie de Meaux", "Brie de Melun", "Brillat-Savarin",
            "Brin", "Brin d' Amour", "Brin d'Amour", "Brinza (Burduf Brinza)",
            "Briquette de Brebis", "Briquette du Forez", "Broccio", "Broccio Demi-Affine",
            "Brousse du Rove", "Bruder Basil", "Brusselae Kaas (Fromage de Bruxelles)", "Bryndza",
            "Buchette d'Anjou", "Buffalo", "Burgos", "Butte", "Butterkase", "Button (Innes)",
            "Buxton Blue", "Cabecou", "Caboc", "Cabrales", "Cachaille", "Caciocavallo", "Caciotta",
            "Caerphilly", "Cairnsmore", "Calenzana", "Cambazola", "Camembert de Normandie",
            "Canadian Cheddar", "Canestrato", "Cantal", "Caprice des Dieux", "Capricorn Goat",
            "Capriole Banon", "Carre de l'Est", "Casciotta di Urbino", "Cashel Blue", "Castellano",
            "Castelleno", "Castelmagno", "Castelo Branco", "Castigliano", "Cathelain",
            "Celtic Promise", "Cendre d'Olivet", "Cerney", "Chabichou", "Chabichou du Poitou",
            "Chabis de Gatine", "Chaource", "Charolais", "Chaumes", "Cheddar",
            "Cheddar Clothbound", "Cheshire", "Chevres", "Chevrotin des Aravis", "Chontaleno",
            "Civray", "Coeur de Camembert au Calvados", "Coeur de Chevre", "Colby", "Cold Pack",
            "Comte", "Coolea", "Cooleney", "Coquetdale", "Corleggy", "Cornish Pepper",
            "Cotherstone", "Cotija", "Cottage Cheese", "Cottage Cheese (Australian)",
            "Cougar Gold", "Coulommiers", "Coverdale", "Crayeux de Roncq", "Cream Cheese",
            "Cream Havarti", "Crema Agria", "Crema Mexicana", "Creme Fraiche", "Crescenza",
            "Croghan", "Crottin de Chavignol", "Crottin du Chavignol", "Crowdie", "Crowley",
            "Cuajada", "Curd", "Cure Nantais", "Curworthy", "Cwmtawe Pecorino",
            "Cypress Grove Chevre", "Danablu (Danish Blue)", "Danbo", "Danish Fontina",
            "Daralagjazsky", "Dauphin", "Delice des Fiouves", "Denhany Dorset Drum", "Derby",
            "Dessertnyj Belyj", "Devon Blue", "Devon Garland", "Dolcelatte", "Doolin",
            "Doppelrhamstufel", "Dorset Blue Vinney", "Double Gloucester", "Double Worcester",
            "Dreux a la Feuille", "Dry Jack", "Duddleswell", "Dunbarra", "Dunlop", "Dunsyre Blue",
            "Duroblando", "Durrus", "Dutch Mimolette (Commissiekaas)", "Edam", "Edelpilz",
            "Emental Grand Cru", "Emlett", "Emmental", "Epoisses de Bourgogne", "Esbareich",
            "Esrom", "Etorki", "Evansdale Farmhouse Brie", "Evora De L'Alentejo", "Exmoor Blue",
            "Explorateur", "Feta", "Feta (Australian)", "Figue", "Filetta", "Fin-de-Siecle",
            "Finlandia Swiss", "Finn", "Fiore Sardo", "Fleur du Maquis", "Flor de Guia",
            "Flower Marie", "Folded", "Folded cheese with mint", "Fondant de Brebis",
            "Fontainebleau", "Fontal", "Fontina Val d'Aosta", "Formaggio di capra", "Fougerus",
            "Four Herb Gouda", "Fourme d' Ambert", "Fourme de Haute Loire", "Fourme de Montbrison",
            "Fresh Jack", "Fresh Mozzarella", "Fresh Ricotta", "Fresh Truffles", "Fribourgeois",
            "Friesekaas", "Friesian", "Friesla", "Frinault", "Fromage a Raclette", "Fromage Corse",
            "Fromage de Montagne de Savoie", "Fromage Frais", "Fruit Cream Cheese",
            "Frying Cheese", "Fynbo", "Gabriel", "Galette du Paludier", "Galette Lyonnaise",
            "Galloway Goat's Milk Gems", "Gammelost", "Gaperon a l'Ail", "Garrotxa", "Gastanberra",
            "Geitost", "Gippsland Blue", "Gjetost", "Gloucester", "Golden Cross", "Gorgonzola",
            "Gornyaltajski", "Gospel Green", "Gouda", "Goutu", "Gowrie", "Grabetto", "Graddost",
            "Grafton Village Cheddar", "Grana", "Grana Padano", "Grand Vatel",
            "Grataron d' Areches", "Gratte-Paille", "Graviera", "Greuilh", "Greve",
            "Gris de Lille", "Gruyere", "Gubbeen", "Guerbigny", "Halloumi",
            "Halloumy (Australian)", "Haloumi-Style Cheese", "Harbourne Blue", "Havarti",
            "Heidi Gruyere", "Hereford Hop", "Herrgardsost", "Herriot Farmhouse", "Herve",
            "Hipi Iti", "Hubbardston Blue Cow", "Hushallsost", "Iberico", "Idaho Goatster",
            "Idiazabal", "Il Boschetto al Tartufo", "Ile d'Yeu", "Isle of Mull", "Jarlsberg",
            "Jermi Tortes", "Jibneh Arabieh", "Jindi Brie", "Jubilee Blue", "Juustoleipa",
            "Kadchgall", "Kaseri", "Kashta", "Kefalotyri", "Kenafa", "Kernhem", "Kervella Affine",
            "Kikorangi", "King Island Cape Wickham Brie", "King River Gold", "Klosterkaese",
            "Knockalara", "Kugelkase", "L'Aveyronnais", "L'Ecir de l'Aubrac", "La Taupiniere",
            "La Vache Qui Rit", "Laguiole", "Lairobell", "Lajta", "Lanark Blue", "Lancashire",
            "Langres", "Lappi", "Laruns", "Lavistown", "Le Brin", "Le Fium Orbo", "Le Lacandou",
            "Le Roule", "Leafield", "Lebbene", "Leerdammer", "Leicester", "Leyden", "Limburger",
            "Lincolnshire Poacher", "Lingot Saint Bousquet d'Orb", "Liptauer", "Little Rydings",
            "Livarot", "Llanboidy", "Llanglofan Farmhouse", "Loch Arthur Farmhouse",
            "Loddiswell Avondale", "Longhorn", "Lou Palou", "Lou Pevre", "Lyonnais", "Maasdam",
            "Macconais", "Mahoe Aged Gouda", "Mahon", "Malvern", "Mamirolle", "Manchego",
            "Manouri", "Manur", "Marble Cheddar", "Marbled Cheeses", "Maredsous", "Margotin",
            "Maribo", "Maroilles", "Mascares", "Mascarpone", "Mascarpone (Australian)",
            "Mascarpone Torta", "Matocq", "Maytag Blue", "Meira", "Menallack Farmhouse",
            "Menonita", "Meredith Blue", "Mesost", "Metton (Cancoillotte)", "Meyer Vintage Gouda",
            "Mihalic Peynir", "Milleens", "Mimolette", "Mine-Gabhar", "Mini Baby Bells", "Mixte",
            "Molbo", "Monastery Cheeses", "Mondseer", "Mont D'or Lyonnais", "Montasio",
            "Monterey Jack", "Monterey Jack Dry", "Morbier", "Morbier Cru de Montagne",
            "Mothais a la Feuille", "Mozzarella", "Mozzarella (Australian)",
            "Mozzarella di Bufala", "Mozzarella Fresh, in water", "Mozzarella Rolls", "Munster",
            "Murol", "Mycella", "Myzithra", "Naboulsi", "Nantais", "Neufchatel",
            "Neufchatel (Australian)", "Niolo", "Nokkelost", "Northumberland", "Oaxaca",
            "Olde York", "Olivet au Foin", "Olivet Bleu", "Olivet Cendre",
            "Orkney Extra Mature Cheddar", "Orla", "Oschtjepka", "Ossau Fermier", "Ossau-Iraty",
            "Oszczypek", "Oxford Blue", "P'tit Berrichon", "Palet de Babligny", "Paneer", "Panela",
            "Pannerone", "Pant ys Gawn", "Parmesan (Parmigiano)", "Parmigiano Reggiano",
            "Pas de l'Escalette", "Passendale", "Pasteurized Processed", "Pate de Fromage",
            "Patefine Fort", "Pave d'Affinois", "Pave d'Auge", "Pave de Chirac", "Pave du Berry",
            "Pecorino", "Pecorino in Walnut Leaves", "Pecorino Romano", "Peekskill Pyramid",
            "Pelardon des Cevennes", "Pelardon des Corbieres", "Penamellera", "Penbryn",
            "Pencarreg", "Perail de Brebis", "Petit Morin", "Petit Pardou", "Petit-Suisse",
            "Picodon de Chevre", "Picos de Europa", "Piora", "Pithtviers au Foin",
            "Plateau de Herve", "Plymouth Cheese", "Podhalanski", "Poivre d'Ane", "Polkolbin",
            "Pont l'Eveque", "Port Nicholson", "Port-Salut", "Postel", "Pouligny-Saint-Pierre",
            "Pourly", "Prastost", "Pressato", "Prince-Jean", "Processed Cheddar", "Provolone",
            "Provolone (Australian)", "Pyengana Cheddar", "Pyramide", "Quark",
            "Quark (Australian)", "Quartirolo Lombardo", "Quatre-Vents", "Quercy Petit",
            "Queso Blanco", "Queso Blanco con Frutas --Pina y Mango", "Queso de Murcia",
            "Queso del Montsec", "Queso del Tietar", "Queso Fresco", "Queso Fresco (Adobera)",
            "Queso Iberico", "Queso Jalapeno", "Queso Majorero", "Queso Media Luna",
            "Queso Para Frier", "Queso Quesadilla", "Rabacal", "Raclette", "Ragusano", "Raschera",
            "Reblochon", "Red Leicester", "Regal de la Dombes", "Reggianito", "Remedou",
            "Requeson", "Richelieu", "Ricotta", "Ricotta (Australian)", "Ricotta Salata", "Ridder",
            "Rigotte", "Rocamadour", "Rollot", "Romano", "Romans Part Dieu", "Roncal", "Roquefort",
            "Roule", "Rouleau De Beaulieu", "Royalp Tilsit", "Rubens", "Rustinu", "Saaland Pfarr",
            "Saanenkaese", "Saga", "Sage Derby", "Sainte Maure", "Saint-Marcellin",
            "Saint-Nectaire", "Saint-Paulin", "Salers", "Samso", "San Simon", "Sancerre",
            "Sap Sago", "Sardo", "Sardo Egyptian", "Sbrinz", "Scamorza", "Schabzieger", "Schloss",
            "Selles sur Cher", "Selva", "Serat", "Seriously Strong Cheddar", "Serra da Estrela",
            "Sharpam", "Shelburne Cheddar", "Shropshire Blue", "Siraz", "Sirene", "Smoked Gouda",
            "Somerset Brie", "Sonoma Jack", "Sottocenare al Tartufo", "Soumaintrain",
            "Sourire Lozerien", "Spenwood", "Sraffordshire Organic", "St. Agur Blue Cheese",
            "Stilton", "Stinking Bishop", "String", "Sussex Slipcote", "Sveciaost", "Swaledale",
            "Sweet Style Swiss", "Swiss", "Syrian (Armenian String)", "Tala", "Taleggio", "Tamie",
            "Tasmania Highland Chevre Log", "Taupiniere", "Teifi", "Telemea", "Testouri",
            "Tete de Moine", "Tetilla", "Texas Goat Cheese", "Tibet", "Tillamook Cheddar",
            "Tilsit", "Timboon Brie", "Toma", "Tomme Brulee", "Tomme d'Abondance",
            "Tomme de Chevre", "Tomme de Romans", "Tomme de Savoie", "Tomme des Chouans", "Tommes",
            "Torta del Casar", "Toscanello", "Touree de L'Aubier", "Tourmalet",
            "Trappe (Veritable)", "Trois Cornes De Vendee", "Tronchon", "Trou du Cru", "Truffe",
            "Tupi", "Turunmaa", "Tymsboro", "Tyn Grug", "Tyning", "Ubriaco", "Ulloa",
            "Vacherin-Fribourgeois", "Valencay", "Vasterbottenost", "Venaco", "Vendomois",
            "Vieux Corse", "Vignotte", "Vulscombe", "Waimata Farmhouse Blue",
            "Washed Rind Cheese (Australian)", "Waterloo", "Weichkaese", "Wellington",
            "Wensleydale", "White Stilton", "Whitestone Farmhouse", "Wigmore", "Woodside Cabecou",
            "Xanadu", "Xynotyro", "Yarg Cornish", "Yarra Valley Pyramid", "Yorkshire Blue",
            "Zamorano", "Zanetti Grana Padano", "Zanetti Parmigiano Reggiano"
    };

    public static String getRandomCheeseName() {
        return sCheeseStrings[RANDOM.nextInt(sCheeseStrings.length-1)];
    }

    public static Cheese getRandomCheese() {
        return new Cheese(getRandomCheeseDrawable(), getRandomCheeseName());
    }

}

================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/ColorUtils.java
================================================
/*
 * Copyright 2015 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.commit451.elasticdragdismisslayout.sample;

import androidx.annotation.ColorInt;
import androidx.annotation.FloatRange;
import androidx.annotation.IntRange;

/**
 * Utility methods for working with colors.
 */
public class ColorUtils {

    private ColorUtils() {
    }

    /**
     * Set the alpha component of {@code color} to be {@code alpha}.
     */
    public static int modifyAlpha(@ColorInt int color, @IntRange(from = 0, to = 255) int alpha) {
        return (color & 0x00ffffff) | (alpha << 24);
    }

    /**
     * Set the alpha component of {@code color} to be {@code alpha}.
     */
    public static int modifyAlpha(@ColorInt int color,
                                  @FloatRange(from = 0f, to = 1f) float alpha) {
        return modifyAlpha(color, (int) (255f * alpha));
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailActivity.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.transition.TransitionInflater;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import com.commit451.elasticdragdismisslayout.ElasticDragDismissCallback;
import com.commit451.elasticdragdismisslayout.ElasticDragDismissFrameLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Sample detail activity
 */
public class DetailActivity extends AppCompatActivity {

    private static final String KEY_CHEESE = "cheese";

    public static Intent newIntent(Context context, Cheese cheese) {
        Intent intent = new Intent(context, DetailActivity.class);
        intent.putExtra(KEY_CHEESE, cheese);
        return intent;
    }

    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.draggable_frame)
    ElasticDragDismissFrameLayout draggableFrame;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);
        ButterKnife.bind(this);

        Cheese cheese = (Cheese) getIntent().getSerializableExtra(KEY_CHEESE);

        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_24dp);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        toolbar.setTitle(cheese.getName());

        draggableFrame.addListener(new ElasticDragDismissCallback() {
            @Override
            public void onDrag(float elasticOffset, float elasticOffsetPixels, float rawOffset, float rawOffsetPixels) {
            }

            @Override
            public void onDragDismissed() {
                // if we drag dismiss downward then the default reversal of the enter
                // transition would slide content upward which looks weird. So reverse it.
                if (draggableFrame.getTranslationY() > 0 && Build.VERSION.SDK_INT >= 21) {
                    getWindow().setReturnTransition(
                            TransitionInflater.from(DetailActivity.this)
                                    .inflateTransition(R.transition.about_return_downward));
                }
                if (Build.VERSION.SDK_INT >= 21) {
                    finishAfterTransition();
                } else {
                    finish();
                }
            }
        });
        if (Build.VERSION.SDK_INT >= 21) {
            draggableFrame.addListener(new SystemChromeFader(this));
        }
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailRecyclerViewActivity.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.commit451.elasticdragdismisslayout.ElasticDragDismissCallback;
import com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Testing using a RecyclerView
 */
public class DetailRecyclerViewActivity extends AppCompatActivity {

    public static Intent newIntent(Context context) {
        Intent intent = new Intent(context, DetailRecyclerViewActivity.class);
        return intent;
    }

    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.draggable_frame)
    ElasticDragDismissLinearLayout dragLayout;
    @BindView(R.id.recyclerview)
    RecyclerView recyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail_recyclerview);
        ButterKnife.bind(this);
        toolbar.setTitle("Countries");
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_24dp);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

        CountriesAdapter adapter = new CountriesAdapter(this);
        recyclerView.setAdapter(adapter);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        dragLayout.addListener(new ElasticDragDismissCallback() {
            @Override
            public void onDrag(float elasticOffset, float elasticOffsetPixels, float rawOffset, float rawOffsetPixels) {
            }

            @Override
            public void onDragDismissed() {
                // if we drag dismiss downward then the default reversal of the enter
                // transition would slide content upward which looks weird. So reverse it.
                if (dragLayout.getTranslationY() > 0) {
                    //TODO
                    //                            getWindow().setReturnTransition(
                    //                                    TransitionInflater.from(AboutActivity.this)
                    //                                            .inflateTransition(R.transition.about_return_downward));
                }
                if (Build.VERSION.SDK_INT >= 21) {
                    finishAfterTransition();
                } else {
                    finish();
                }
            }
        });
        if (Build.VERSION.SDK_INT >= 21) {
            dragLayout.addListener(new SystemChromeFader(this));
        }
    }

    static class CountriesAdapter extends RecyclerView.Adapter<CountriesViewHolder> {

        String[] countries;

        public CountriesAdapter(Context context) {
            countries = context.getResources().getStringArray(R.array.countries);

        }

        @Override
        public CountriesViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            return CountriesViewHolder.inflate(parent);
        }

        @Override
        public void onBindViewHolder(CountriesViewHolder holder, int position) {
            holder.bind(countries[position]);
        }

        @Override
        public int getItemCount() {
            return countries.length;
        }
    }

    static class CountriesViewHolder extends RecyclerView.ViewHolder {

        public static CountriesViewHolder inflate(ViewGroup parent) {
            View view = LayoutInflater.from(parent.getContext())
                    .inflate(R.layout.viewholder_game, parent, false);
            return new CountriesViewHolder(view);
        }

        @BindView(R.id.text)
        TextView mText;

        public CountriesViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bind(String country) {
            mText.setText(country);
        }
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/MainActivity.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.recyclerview)
    RecyclerView recyclerView;

    CheeseAdapter cheeseAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        toolbar.setTitle("ElasticDragDismissLayout");
        toolbar.inflateMenu(R.menu.main);
        toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                switch (item.getItemId()) {
                    case R.id.action_recyclerview:
                        Intent intent = DetailRecyclerViewActivity.newIntent(MainActivity.this);
                        startActivity(intent);
                        return true;
                }
                return false;
            }
        });
        cheeseAdapter = new CheeseAdapter(MainActivity.this, new CheeseAdapter.Listener() {
            @Override
            public void onItemClicked(Cheese cheese) {
                startActivity(DetailActivity.newIntent(MainActivity.this, cheese));
            }
        });
        recyclerView.setAdapter(cheeseAdapter);
        recyclerView.setLayoutManager(new GridLayoutManager(this, 2));
        load();
    }

    private void load() {
        ArrayList<Cheese> cheeses = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            cheeses.add(Cheeses.getRandomCheese());
        }
        cheeseAdapter.setData(cheeses);
    }
}


================================================
FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/SystemChromeFader.java
================================================
package com.commit451.elasticdragdismisslayout.sample;

import android.annotation.TargetApi;
import android.app.Activity;
import android.graphics.Color;

import com.commit451.elasticdragdismisslayout.ElasticDragDismissCallback;
import com.commit451.viewtiful.Viewtiful;

/**
 * An {@link ElasticDragDismissCallback} which fades system chrome (i.e. status bar and
 * navigation bar) when elastic drags are performed. Consuming classes must provide the
 * implementation for {@link ElasticDragDismissCallback#onDragDismissed()}.
 */
@TargetApi(21)
public class SystemChromeFader extends ElasticDragDismissCallback {

    private final Activity activity;
    private final int statusBarAlpha;
    private final int navBarAlpha;
    private final boolean fadeNavBar;

    public SystemChromeFader(Activity activity) {
        this.activity = activity;
        statusBarAlpha = Color.alpha(activity.getWindow().getStatusBarColor());
        navBarAlpha = Color.alpha(activity.getWindow().getNavigationBarColor());
        fadeNavBar = Viewtiful.isNavigationBarOnBottom(activity);
    }

    @Override
    public void onDrag(float elasticOffset, float elasticOffsetPixels,
                       float rawOffset, float rawOffsetPixels) {
        if (elasticOffsetPixels > 0) {
            // dragging downward, fade the status bar in proportion
            activity.getWindow().setStatusBarColor(ColorUtils.modifyAlpha(activity.getWindow()
                    .getStatusBarColor(), (int) ((1f - rawOffset) * statusBarAlpha)));
        } else if (elasticOffsetPixels == 0) {
            // reset
            activity.getWindow().setStatusBarColor(ColorUtils.modifyAlpha(
                    activity.getWindow().getStatusBarColor(), statusBarAlpha));
            activity.getWindow().setNavigationBarColor(ColorUtils.modifyAlpha(
                    activity.getWindow().getNavigationBarColor(), navBarAlpha));
        } else if (fadeNavBar) {
            // dragging upward, fade the navigation bar in proportion
            activity.getWindow().setNavigationBarColor(
                    ColorUtils.modifyAlpha(activity.getWindow().getNavigationBarColor(),
                            (int) ((1f - rawOffset) * navBarAlpha)));
        }
    }

    public void onDragDismissed() {
        activity.finishAfterTransition();
    }
}

================================================
FILE: app/src/main/res/drawable/ic_arrow_back_24dp.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>


================================================
FILE: app/src/main/res/drawable/ic_favorite_24dp.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
</vector>


================================================
FILE: app/src/main/res/layout/activity_detail.xml
================================================
<com.commit451.elasticdragdismisslayout.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/draggable_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@android:color/white"
    app:dragDismissDistance="@dimen/drag_dismiss_distance"
    app:dragDismissScale="0.95"
    app:dragDismissEnableBottomDrag="true">

    <View
        android:id="@+id/libs_list_background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/white" />

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary" />

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="?attr/actionBarSize">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="16dp"
                android:textColor="@android:color/black"
                android:textSize="22sp"
                android:text="@string/cheese_ipsum" />


        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</com.commit451.elasticdragdismisslayout.ElasticDragDismissFrameLayout>


================================================
FILE: app/src/main/res/layout/activity_detail_recyclerview.xml
================================================
<com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/draggable_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    app:dragDismissDistance="@dimen/drag_dismiss_distance"
    app:dragDismissScale="0.95">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="#993F51B5" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout>


================================================
FILE: app/src/main/res/layout/activity_main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recyclerview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

</LinearLayout>


================================================
FILE: app/src/main/res/layout/item_cheese.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             xmlns:tools="http://schemas.android.com/tools"
             android:layout_width="match_parent"
             android:layout_height="180dp"
             android:foreground="?selectableItemBackground">

    <ImageView
        android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@null"
        android:scaleType="centerCrop"
        tools:src="@drawable/cheese_1" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="#99a8a8a8">

        <TextView
            android:id="@+id/name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:padding="8dp" />
    </LinearLayout>
</FrameLayout>

================================================
FILE: app/src/main/res/layout/viewholder_game.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="180dp">

    <ImageView
        android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@null"
        android:scaleType="centerCrop"
        tools:src="@mipmap/ic_launcher"/>

    <TextView
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:singleLine="true"
        android:ellipsize="end"
        android:layout_gravity="bottom"
        android:background="#99000000"
        android:padding="16dp"
        tools:text="Hello"/>

</FrameLayout>

================================================
FILE: app/src/main/res/menu/main.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<menu
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <item
        android:id="@+id/action_recyclerview"
        app:showAsAction="never"
        android:title="@string/recyclerview"/>

</menu>

================================================
FILE: app/src/main/res/transition/about_return_downward.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2015 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<transitionSet
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:transitionOrdering="together"
    android:interpolator="@android:interpolator/fast_out_linear_in">

    <slide
        android:slideEdge="bottom"
        android:duration="400">
        <targets>
            <target android:excludeId="@android:id/navigationBarBackground" />
            <target android:excludeId="@android:id/statusBarBackground" />
        </targets>
    </slide>

    <fade
        android:startDelay="200"
        android:duration="200">
        <targets>
            <target android:targetId="@id/libs_list_background" />
        </targets>
    </fade>

    <fade android:duration="400">
        <targets>
            <target android:targetId="@android:id/navigationBarBackground" />
            <target android:targetId="@android:id/statusBarBackground" />
        </targets>
    </fade>

</transitionSet>


================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#3F51B5</color>
    <color name="colorPrimaryDark">#303F9F</color>
    <color name="colorAccent">#FF4081</color>

    <color name="scrim">#99323232</color>
</resources>


================================================
FILE: app/src/main/res/values/dimens.xml
================================================
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>

    <dimen name="drag_dismiss_distance">112dp</dimen> <!-- 2 * ?android:actionBarSize -->

    <dimen name="detail_backdrop_height">256dp</dimen>
    <dimen name="card_margin">16dp</dimen>
    <dimen name="fab_margin">16dp</dimen>
</resources>


================================================
FILE: app/src/main/res/values/ids.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="list_position" type="id"/>
    <item name="list_holder" type="id"/>
</resources>

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

    <string name="cheese_ipsum">Jarlsberg lancashire edam. Dolcelatte hard cheese brie st. agur blue
    cheese caerphilly bavarian bergkase cheese and biscuits mascarpone. Cheeseburger swiss bavarian
    bergkase cream cheese fromage frais cheesy feet port-salut airedale. St. agur blue cheese rubber
    cheese caerphilly cheddar cheesecake cream cheese manchego lancashire. Roquefort squirty cheese
    the big cheese.</string>
    <string name="recyclerview">RecyclerView Example</string>
    <string-array name="countries">
        <item>Afghanistan</item>
        <item>Albania</item>
        <item>Algeria</item>
        <item>American Samoa</item>
        <item>Andorra</item>
        <item>Angola</item>
        <item>Anguilla</item>
        <item>Antarctica</item>
        <item>Antigua and Barbuda</item>
        <item>Argentina</item>
        <item>Armenia</item>
        <item>Aruba</item>
        <item>Australia</item>
        <item>Austria</item>
        <item>Azerbaijan</item>
        <item>Bahamas</item>
        <item>Bahrain</item>
        <item>Bangladesh</item>
        <item>Barbados</item>
        <item>Belarus</item>
        <item>Belgium</item>
        <item>Belize</item>
        <item>Benin</item>
        <item>Bermuda</item>
        <item>Bhutan</item>
        <item>Bolivia</item>
        <item>Bosnia and Herzegovina</item>
        <item>Botswana</item>
        <item>Brazil</item>
        <item>British Indian Ocean Territory</item>
        <item>British Virgin Islands</item>
        <item>Brunei</item>
        <item>Bulgaria</item>
        <item>Burkina Faso</item>
        <item>Burundi</item>
        <item>Cambodia</item>
        <item>Cameroon</item>
        <item>Canada</item>
        <item>Cape Verde</item>
        <item>Cayman Islands</item>
        <item>Central African Republic</item>
        <item>Chad</item>
        <item>Chile</item>
        <item>China</item>
        <item>Christmas Island</item>
        <item>Cocos Islands</item>
        <item>Colombia</item>
        <item>Comoros</item>
        <item>Cook Islands</item>
        <item>Costa Rica</item>
        <item>Croatia</item>
        <item>Cuba</item>
        <item>Cyprus</item>
        <item>Czech Republic</item>
        <item>Democratic Republic of the Congo</item>
        <item>Denmark</item>
        <item>Djibouti</item>
        <item>Dominica</item>
        <item>Dominican Republic</item>
        <item>East Timor</item>
        <item>Ecuador</item>
        <item>Egypt</item>
        <item>El Salvador</item>
        <item>Equatorial Guinea</item>
        <item>Eritrea</item>
        <item>Estonia</item>
        <item>Ethiopia</item>
        <item>Falkland Islands</item>
        <item>Faroe Islands</item>
        <item>Fiji</item>
        <item>Finland</item>
        <item>France</item>
        <item>French Polynesia</item>
        <item>Gabon</item>
        <item>Gambia</item>
        <item>Georgia</item>
        <item>Germany</item>
        <item>Ghana</item>
        <item>Gibraltar</item>
        <item>Greece</item>
        <item>Greenland</item>
        <item>Grenada</item>
        <item>Guam</item>
        <item>Guatemala</item>
        <item>Guinea</item>
        <item>Guinea-Bissau</item>
        <item>Guyana</item>
        <item>Haiti</item>
        <item>Honduras</item>
        <item>Hong Kong</item>
        <item>Hungary</item>
        <item>Iceland</item>
        <item>India</item>
        <item>Indonesia</item>
        <item>Iran</item>
        <item>Iraq</item>
        <item>Ireland</item>
        <item>Isle of Man</item>
        <item>Israel</item>
        <item>Italy</item>
        <item>Ivory Coast</item>
        <item>Jamaica</item>
        <item>Japan</item>
        <item>Jersey</item>
        <item>Jordan</item>
        <item>Kazakhstan</item>
        <item>Kenya</item>
        <item>Kiribati</item>
        <item>Kuwait</item>
        <item>Kyrgyzstan</item>
        <item>Laos</item>
        <item>Latvia</item>
        <item>Lebanon</item>
        <item>Lesotho</item>
        <item>Liberia</item>
        <item>Libya</item>
        <item>Liechtenstein</item>
        <item>Lithuania</item>
        <item>Luxembourg</item>
        <item>Macao</item>
        <item>Macedonia</item>
        <item>Madagascar</item>
        <item>Malawi</item>
        <item>Malaysia</item>
        <item>Maldives</item>
        <item>Mali</item>
        <item>Malta</item>
        <item>Marshall Islands</item>
        <item>Mauritania</item>
        <item>Mauritius</item>
        <item>Mayotte</item>
        <item>Mexico</item>
        <item>Micronesia</item>
        <item>Moldova</item>
        <item>Monaco</item>
        <item>Mongolia</item>
        <item>Montenegro</item>
        <item>Montserrat</item>
        <item>Morocco</item>
        <item>Mozambique</item>
        <item>Myanmar</item>
        <item>Namibia</item>
        <item>Nauru</item>
        <item>Nepal</item>
        <item>Netherlands</item>
        <item>Netherlands Antilles</item>
        <item>New Caledonia</item>
        <item>New Zealand</item>
        <item>Nicaragua</item>
        <item>Niger</item>
        <item>Nigeria</item>
        <item>Niue</item>
        <item>North Korea</item>
        <item>Northern Mariana Islands</item>
        <item>Norway</item>
        <item>Oman</item>
        <item>Pakistan</item>
        <item>Palau</item>
        <item>Panama</item>
        <item>Papua New Guinea</item>
        <item>Paraguay</item>
        <item>Peru</item>
        <item>Philippines</item>
        <item>Pitcairn</item>
        <item>Poland</item>
        <item>Portugal</item>
        <item>Puerto Rico</item>
        <item>Qatar</item>
        <item>Republic of the Congo</item>
        <item>Romania</item>
        <item>Russia</item>
        <item>Rwanda</item>
        <item>Saint Barthelemy</item>
        <item>Saint Helena</item>
        <item>Saint Kitts and Nevis</item>
        <item>Saint Lucia</item>
        <item>Saint Martin</item>
        <item>Saint Pierre and Miquelon</item>
        <item>Saint Vincent and the Grenadines</item>
        <item>Samoa</item>
        <item>San Marino</item>
        <item>Sao Tome and Principe</item>
        <item>Saudi Arabia</item>
        <item>Senegal</item>
        <item>Serbia</item>
        <item>Seychelles</item>
        <item>Sierra Leone</item>
        <item>Singapore</item>
        <item>Slovakia</item>
        <item>Slovenia</item>
        <item>Solomon Islands</item>
        <item>Somalia</item>
        <item>South Africa</item>
        <item>South Georgia and the South Sandwich Islands</item>
        <item>South Korea</item>
        <item>Spain</item>
        <item>Sri Lanka</item>
        <item>Sudan</item>
        <item>Suriname</item>
        <item>Svalbard and Jan Mayen</item>
        <item>Swaziland</item>
        <item>Sweden</item>
        <item>Switzerland</item>
        <item>Syria</item>
        <item>Taiwan</item>
        <item>Tajikistan</item>
        <item>Tanzania</item>
        <item>Thailand</item>
        <item>Togo</item>
        <item>Tokelau</item>
        <item>Tonga</item>
        <item>Trinidad and Tobago</item>
        <item>Tunisia</item>
        <item>Turkey</item>
        <item>Turkmenistan</item>
        <item>Turks and Caicos Islands</item>
        <item>Tuvalu</item>
        <item>U.S. Virgin Islands</item>
        <item>Uganda</item>
        <item>Ukraine</item>
        <item>United Arab Emirates</item>
        <item>United Kingdom</item>
        <item>United States</item>
        <item>Uruguay</item>
        <item>Uzbekistan</item>
        <item>Vanuatu</item>
        <item>Vatican</item>
        <item>Venezuela</item>
        <item>Vietnam</item>
        <item>Wallis and Futuna</item>
        <item>Western Sahara</item>
        <item>Yemen</item>
        <item>Zambia</item>
        <item>Zimbabwe</item>
    </string-array>
</resources>


================================================
FILE: app/src/main/res/values/styles.xml
================================================
<resources xmlns:tools="http://schemas.android.com/tools">

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:windowAllowEnterTransitionOverlap" tools:targetApi="lollipop">true</item>
        <item name="android:windowAllowReturnTransitionOverlap" tools:targetApi="lollipop">true</item>
        <item name="android:windowSharedElementsUseOverlay" tools:targetApi="lollipop">false</item>
    </style>

    <style name="AppTheme.Translucent">
        <!-- using a semi-transparent window background for the drag-back gesture -->
        <item name="android:windowBackground">@color/scrim</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowIsFloating">false</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="lollipop">true</item>
    </style>

    <style name="Widget.CardContent" parent="android:Widget">
        <item name="android:paddingLeft">16dp</item>
        <item name="android:paddingRight">16dp</item>
        <item name="android:paddingTop">24dp</item>
        <item name="android:paddingBottom">24dp</item>
        <item name="android:orientation">vertical</item>
    </style>

</resources>


================================================
FILE: build.gradle
================================================
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://jitpack.io" }
    }
}

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


================================================
FILE: elasticdragdismisslayout/.gitignore
================================================
/build


================================================
FILE: elasticdragdismisslayout/build.gradle
================================================
apply plugin: 'com.android.library'

android {
    compileSdkVersion 28

    defaultConfig {
        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 {
    api 'androidx.legacy:legacy-support-v4:1.0.0'
}

apply from: 'https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.0.0/gradle-android-javadocs.gradle'



================================================
FILE: elasticdragdismisslayout/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Jawn\Develop\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}


================================================
FILE: elasticdragdismisslayout/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.commit451.elasticdragdismisslayout">

</manifest>


================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissCallback.java
================================================
package com.commit451.elasticdragdismisslayout;

/**
 * Callbacks for listening for drag events on ElasticLayouts
 */
public abstract class ElasticDragDismissCallback {

    /**
     * Called for each drag event.
     *
     * @param elasticOffset       Indicating the drag offset with elasticity applied i.e. may
     *                            exceed 1.
     * @param elasticOffsetPixels The elastically scaled drag distance in pixels.
     * @param rawOffset           Value from [0, 1] indicating the raw drag offset i.e.
     *                            without elasticity applied. A value of 1 indicates that the
     *                            dismiss distance has been reached.
     * @param rawOffsetPixels     The raw distance the user has dragged
     */
    public void onDrag(float elasticOffset, float elasticOffsetPixels,
                       float rawOffset, float rawOffsetPixels) {
    }

    /**
     * Called when dragging is released and has exceeded the threshold dismiss distance.
     */
    public void onDragDismissed() {
    }

}

================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissDelegate.java
================================================
package com.commit451.elasticdragdismisslayout;

import android.content.Context;
import android.content.res.TypedArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;

import androidx.interpolator.view.animation.FastOutSlowInInterpolator;

import java.util.ArrayList;
import java.util.List;

/**
 * Defer all the things to this class, so that we can create the layouts easily. Use this
 * to create your own ViewGroups
 */
public class ElasticDragDismissDelegate {

    //copied from View in API 21
    private static final int SCROLL_AXIS_VERTICAL = 1 << 1;

    private static final long DRAG_DURATION_BUFFER = 150L;

    // configurable attribs
    private float dragDismissDistance = Float.MAX_VALUE;
    private float dragDismissFraction = -1f;
    private float dragDismissScale = 1f;
    private boolean shouldScale = false;
    private float dragElacticity = 0.8f;
    private long scrollStartTimestamp;

    private boolean enableScaleX = true;

    private boolean enableBottomDrag = false;

    // state
    private float totalDrag;
    private boolean draggingDown = false;
    private boolean draggingUp = false;

    private List<ElasticDragDismissCallback> callbacks;
    private ViewGroup mViewGroup;

    public ElasticDragDismissDelegate(ViewGroup viewGroup) {
        mViewGroup = viewGroup;
    }

    public void init(Context context, TypedArray a) {
        Util.checkParent(mViewGroup, a);

        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_dragDismissDistance)) {
            dragDismissDistance = a.getDimensionPixelSize(R.styleable
                    .ElasticDragDismissFrameLayout_dragDismissDistance, 0);
        } else if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_dragDismissFraction)) {
            dragDismissFraction = a.getFloat(R.styleable
                    .ElasticDragDismissFrameLayout_dragDismissFraction, dragDismissFraction);
        }
        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_dragDismissScale)) {
            dragDismissScale = a.getFloat(R.styleable
                    .ElasticDragDismissFrameLayout_dragDismissScale, dragDismissScale);
            shouldScale = dragDismissScale != 1f;
        }
        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_dragElasticity)) {
            dragElacticity = a.getFloat(R.styleable.ElasticDragDismissFrameLayout_dragElasticity,
                    dragElacticity);
        }
        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_enableScaleX)) {
            enableScaleX = a.getBoolean(R.styleable.ElasticDragDismissFrameLayout_enableScaleX, true);
        }
        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_dragDismissEnableBottomDrag)) {
            enableBottomDrag = a.getBoolean(R.styleable.ElasticDragDismissFrameLayout_dragDismissEnableBottomDrag, true);
        }
    }

    public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) {
        scrollStartTimestamp = System.currentTimeMillis();
        return (nestedScrollAxes & SCROLL_AXIS_VERTICAL) != 0;
    }

    public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) {
        // if we're in a drag gesture and the user reverses up the we should take those events
        if (draggingDown && dy > 0 || draggingUp && dy < 0) {
            dragScale(dy);
            consumed[1] = dy;

        }
    }

    public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
        dragScale(dyUnconsumed);
    }

    public void onStopNestedScroll(View child) {
        // if the drag is too fast it probably was not an intentional drag but a fling, don't dismiss
        final long dragTime = System.currentTimeMillis() - scrollStartTimestamp;
        if (Math.abs(totalDrag) >= dragDismissDistance && dragTime > DRAG_DURATION_BUFFER) {
            dispatchDismissCallback();
        } else { // settle back to natural position
            ViewPropertyAnimator animator = mViewGroup.animate()
                    .translationY(0f)
                    .scaleY(1f)
                    .setDuration(200L)
                    .setInterpolator(new FastOutSlowInInterpolator())
                    .setListener(null);
            if (enableScaleX) {
                animator.scaleX(1f);
            }

            animator.start();

            totalDrag = 0;
            draggingDown = draggingUp = false;
            dispatchDragCallback(0f, 0f, 0f, 0f);
        }
    }

    private void dragScale(int scroll) {
        boolean draggingUp = enableBottomDrag && this.draggingUp;
        if (scroll == 0) return;
        if (draggingUp || scroll < 0)
            totalDrag += scroll;

        // track the direction & set the pivot point for scaling
        // don't double track i.e. if start dragging down and then reverse, keep tracking as
        // dragging down until they reach the 'natural' position
        if (scroll < 0 && !draggingUp && !draggingDown) {
            draggingDown = true;
            if (shouldScale) mViewGroup.setPivotY(mViewGroup.getHeight());
        } else if (scroll > 0 && !draggingDown && !draggingUp) {
            this.draggingUp = true;
            if (shouldScale) mViewGroup.setPivotY(0f);
        }
        // how far have we dragged relative to the distance to perform a dismiss
        // (0–1 where 1 = dismiss distance). Decreasing logarithmically as we approach the limit
        float dragFraction = (float) Math.log10(1 + (Math.abs(totalDrag) / dragDismissDistance));

        // calculate the desired translation given the drag fraction
        float dragTo = dragFraction * dragDismissDistance * dragElacticity;

        if (draggingUp) {
            // as we use the absolute magnitude when calculating the drag fraction, need to
            // re-apply the drag direction
            dragTo *= -1;
        }
        mViewGroup.setTranslationY(dragTo);

        if (shouldScale) {
            final float scale = 1 - ((1 - dragDismissScale) * dragFraction);
            if (enableScaleX) {
                mViewGroup.setScaleX(scale);
            }
            mViewGroup.setScaleY(scale);
        }

        // if we've reversed direction and gone past the settle point then clear the flags to
        // allow the list to get the scroll events & reset any transforms
        if ((draggingDown && totalDrag >= 0)
                || (draggingUp && totalDrag <= 0)) {
            totalDrag = dragTo = dragFraction = 0;
            draggingDown = this.draggingUp = false;
            mViewGroup.setTranslationY(0f);
            if (enableScaleX) {
                mViewGroup.setScaleX(1f);
            }
            mViewGroup.setScaleY(1f);
        }
        dispatchDragCallback(dragFraction, dragTo,
                Math.min(1f, Math.abs(totalDrag) / dragDismissDistance), totalDrag);
    }

    public void onSizeChanged(int w, int h, int oldw, int oldh) {
        if (dragDismissFraction > 0f) {
            dragDismissDistance = h * dragDismissFraction;
        }
    }

    private void dispatchDragCallback(float elasticOffset, float elasticOffsetPixels,
                                      float rawOffset, float rawOffsetPixels) {
        if (callbacks != null && !callbacks.isEmpty()) {
            for (ElasticDragDismissCallback callback : callbacks) {
                callback.onDrag(elasticOffset, elasticOffsetPixels,
                        rawOffset, rawOffsetPixels);
            }
        }
    }

    private void dispatchDismissCallback() {
        if (callbacks != null && !callbacks.isEmpty()) {
            for (ElasticDragDismissCallback callback : callbacks) {
                callback.onDragDismissed();
            }
        }
    }

    public void addListener(ElasticDragDismissCallback listener) {
        if (callbacks == null) {
            callbacks = new ArrayList<>();
        }
        callbacks.add(listener);
    }

    public void removeListener(ElasticDragDismissCallback listener) {
        if (callbacks != null && callbacks.size() > 0) {
            callbacks.remove(listener);
        }
    }
}


================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissFrameLayout.java
================================================
/*
 * Copyright 2015 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.commit451.elasticdragdismisslayout;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;

import androidx.core.view.NestedScrollingParent;

/**
 * A {@link FrameLayout} which responds to nested scrolls to create drag-dismissable layouts.
 * Applies an elasticity factor to reduce movement as you approach the given dismiss distance.
 * Optionally also scales down content during drag.
 */
public class ElasticDragDismissFrameLayout extends FrameLayout implements NestedScrollingParent {

    private ElasticDragDismissDelegate delegate;

    public ElasticDragDismissFrameLayout(Context context) {
        this(context, null, 0);
    }

    public ElasticDragDismissFrameLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ElasticDragDismissFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }

    @TargetApi(21)
    public ElasticDragDismissFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init(context, attrs);
    }

    private void init(Context context, AttributeSet attrs) {
        final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ElasticDragDismissFrameLayout, 0, 0);
        delegate = new ElasticDragDismissDelegate(this);
        delegate.init(context, a);
        a.recycle();
    }

    @Override
    public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) {
        return delegate.onStartNestedScroll(child, target, nestedScrollAxes);
    }

    @Override
    public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) {
        delegate.onNestedPreScroll(target, dx, dy, consumed);
    }

    @Override
    public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
        delegate.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
    }

    @Override
    public void onStopNestedScroll(View child) {
        delegate.onStopNestedScroll(child);
    }

    @Override
    public void onNestedScrollAccepted(View child, View target, int nestedScrollAxes) {
    }

    @Override
    public boolean onNestedFling(View target, float velocityX, float velocityY, boolean consumed) {
        return false;
    }

    @Override
    public boolean onNestedPreFling(View target, float velocityX, float velocityY) {
        return false;
    }

    @Override
    public int getNestedScrollAxes() {
        return 0;
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        delegate.onSizeChanged(w, h, oldw, oldh);
    }

    public void addListener(ElasticDragDismissCallback listener) {
        delegate.addListener(listener);
    }

    public void removeListener(ElasticDragDismissCallback listener) {
        delegate.removeListener(listener);
    }
}


================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissLinearLayout.java
================================================
package com.commit451.elasticdragdismisslayout;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;
import androidx.core.view.NestedScrollingParent;

/**
 * Like {@link ElasticDragDismissFrameLayout} but its parent is a {@link android.widget.LinearLayout}
 */
public class ElasticDragDismissLinearLayout extends LinearLayout implements NestedScrollingParent {

    private ElasticDragDismissDelegate delegate;

    public ElasticDragDismissLinearLayout(Context context) {
        this(context, null, 0);
    }

    public ElasticDragDismissLinearLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ElasticDragDismissLinearLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }

    @TargetApi(21)
    public ElasticDragDismissLinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init(context, attrs);
    }

    private void init(Context context, AttributeSet attrs) {
        final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ElasticDragDismissFrameLayout, 0, 0);
        delegate = new ElasticDragDismissDelegate(this);
        delegate.init(context, a);
        a.recycle();
    }

    @Override
    public boolean onStartNestedScroll(@NonNull View child, @NonNull View target, int nestedScrollAxes) {
        return delegate.onStartNestedScroll(child, target, nestedScrollAxes);
    }

    @Override
    public void onNestedPreScroll(@NonNull View target, int dx, int dy, @NonNull int[] consumed) {
        delegate.onNestedPreScroll(target, dx, dy, consumed);
    }

    @Override
    public void onNestedScroll(@NonNull View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
        delegate.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
    }

    @Override
    public void onStopNestedScroll(@NonNull View child) {
        delegate.onStopNestedScroll(child);
    }

    @Override
    public void onNestedScrollAccepted(@NonNull View child, @NonNull View target, int nestedScrollAxes) {
    }

    @Override
    public boolean onNestedFling(@NonNull View target, float velocityX, float velocityY, boolean consumed) {
        return false;
    }

    @Override
    public boolean onNestedPreFling(@NonNull View target, float velocityX, float velocityY) {
        return false;
    }

    @Override
    public int getNestedScrollAxes() {
        return 0;
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        delegate.onSizeChanged(w, h, oldw, oldh);
    }

    public void addListener(ElasticDragDismissCallback listener) {
        delegate.addListener(listener);
    }

    public void removeListener(ElasticDragDismissCallback listener) {
        delegate.removeListener(listener);
    }
}


================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissRelativeLayout.java
================================================
package com.commit451.elasticdragdismisslayout;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;

import androidx.annotation.NonNull;
import androidx.core.view.NestedScrollingParent;

/**
 * Like {@link ElasticDragDismissFrameLayout} but its parent is a {@link android.widget.RelativeLayout}
 */
public class ElasticDragDismissRelativeLayout extends RelativeLayout implements NestedScrollingParent {

    private ElasticDragDismissDelegate delegate;

    public ElasticDragDismissRelativeLayout(Context context) {
        this(context, null, 0);
    }

    public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }

    @TargetApi(21)
    public ElasticDragDismissRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init(context, attrs);
    }

    private void init(Context context, AttributeSet attrs) {
        final TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ElasticDragDismissFrameLayout, 0, 0);
        delegate = new ElasticDragDismissDelegate(this);
        delegate.init(context, a);
        a.recycle();
    }

    @Override
    public boolean onStartNestedScroll(@NonNull View child, @NonNull View target, int nestedScrollAxes) {
        return delegate.onStartNestedScroll(child, target, nestedScrollAxes);
    }

    @Override
    public void onNestedPreScroll(@NonNull View target, int dx, int dy, @NonNull int[] consumed) {
        delegate.onNestedPreScroll(target, dx, dy, consumed);
    }

    @Override
    public void onNestedScroll(@NonNull View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
        delegate.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
    }

    @Override
    public void onStopNestedScroll(@NonNull View child) {
        delegate.onStopNestedScroll(child);
    }

    @Override
    public void onNestedScrollAccepted(@NonNull View child, @NonNull View target, int nestedScrollAxes) {
    }

    @Override
    public boolean onNestedFling(@NonNull View target, float velocityX, float velocityY, boolean consumed) {
        return false;
    }

    @Override
    public boolean onNestedPreFling(@NonNull View target, float velocityX, float velocityY) {
        return false;
    }

    @Override
    public int getNestedScrollAxes() {
        return 0;
    }

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        delegate.onSizeChanged(w, h, oldw, oldh);
    }

    public void addListener(ElasticDragDismissCallback listener) {
        delegate.addListener(listener);
    }

    public void removeListener(ElasticDragDismissCallback listener) {
        delegate.removeListener(listener);
    }
}


================================================
FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/Util.java
================================================
package com.commit451.elasticdragdismisslayout;

import android.content.res.TypedArray;
import android.os.Build;
import android.view.ViewGroup;
import android.widget.ScrollView;

import androidx.core.widget.NestedScrollView;

class Util {

    static void checkParent(ViewGroup viewGroup, TypedArray a) {
        boolean checkParent = true;
        if (a.hasValue(R.styleable.ElasticDragDismissFrameLayout_ignoreNestedScrollWarnings)) {
            checkParent = a.getBoolean(R.styleable.ElasticDragDismissFrameLayout_ignoreNestedScrollWarnings, false);
        }
        if (!checkParent) {
            return;
        }
        if (viewGroup.getParent() instanceof NestedScrollView) {
            if (!((NestedScrollView) viewGroup.getParent()).isNestedScrollingEnabled()) {
                throw new IllegalStateException("You need to set nestedScrollingEnabled on the NestedScrollView");
            }
        } else if (viewGroup.getParent() instanceof ScrollView) {
            if (Build.VERSION.SDK_INT >= 21) {
                if (!((ScrollView) viewGroup.getParent()).isNestedScrollingEnabled()) {
                    throw new IllegalStateException("You need to set nestedScrollingEnabled on the ScrollView");

                }
            }
        }
    }
}


================================================
FILE: elasticdragdismisslayout/src/main/res/values/attrs_drag_dismissables.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2015 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<resources>

    <declare-styleable name="ElasticDragDismissFrameLayout">
        <attr name="dragDismissDistance" format="dimension" />
        <attr name="dragDismissFraction" format="float" />
        <attr name="dragDismissScale" format="float" />
        <attr name="dragDismissEnableBottomDrag" format="boolean" />
        <attr name="dragElasticity" format="float" />
        <attr name="ignoreNestedScrollWarnings" format="boolean" />
        <attr name="enableScaleX" format="boolean" />
    </declare-styleable>

</resources>


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Mon Jun 24 18:18:05 JST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-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.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# 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

android.useAndroidX=true
android.enableJetifier=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: settings.gradle
================================================
include ':app', ':elasticdragdismisslayout'
Download .txt
gitextract_9oxfyu4l/

├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── commit451/
│           │           └── elasticdragdismisslayout/
│           │               └── sample/
│           │                   ├── Cheese.java
│           │                   ├── CheeseAdapter.java
│           │                   ├── CheeseViewHolder.java
│           │                   ├── Cheeses.java
│           │                   ├── ColorUtils.java
│           │                   ├── DetailActivity.java
│           │                   ├── DetailRecyclerViewActivity.java
│           │                   ├── MainActivity.java
│           │                   └── SystemChromeFader.java
│           └── res/
│               ├── drawable/
│               │   ├── ic_arrow_back_24dp.xml
│               │   └── ic_favorite_24dp.xml
│               ├── layout/
│               │   ├── activity_detail.xml
│               │   ├── activity_detail_recyclerview.xml
│               │   ├── activity_main.xml
│               │   ├── item_cheese.xml
│               │   └── viewholder_game.xml
│               ├── menu/
│               │   └── main.xml
│               ├── transition/
│               │   └── about_return_downward.xml
│               └── values/
│                   ├── colors.xml
│                   ├── dimens.xml
│                   ├── ids.xml
│                   ├── strings.xml
│                   └── styles.xml
├── build.gradle
├── elasticdragdismisslayout/
│   ├── .gitignore
│   ├── build.gradle
│   ├── proguard-rules.pro
│   └── src/
│       └── main/
│           ├── AndroidManifest.xml
│           ├── java/
│           │   └── com/
│           │       └── commit451/
│           │           └── elasticdragdismisslayout/
│           │               ├── ElasticDragDismissCallback.java
│           │               ├── ElasticDragDismissDelegate.java
│           │               ├── ElasticDragDismissFrameLayout.java
│           │               ├── ElasticDragDismissLinearLayout.java
│           │               ├── ElasticDragDismissRelativeLayout.java
│           │               └── Util.java
│           └── res/
│               └── values/
│                   └── attrs_drag_dismissables.xml
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
Download .txt
SYMBOL INDEX (117 symbols across 15 files)

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheese.java
  class Cheese (line 9) | public class Cheese implements Serializable {
    method Cheese (line 14) | public Cheese(int drawable, String name) {
    method getDrawable (line 19) | public int getDrawable() {
    method getName (line 23) | public String getName() {

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseAdapter.java
  class CheeseAdapter (line 15) | public class CheeseAdapter extends RecyclerView.Adapter<CheeseViewHolder> {
    method onClick (line 20) | @Override
    method CheeseAdapter (line 29) | public CheeseAdapter(Context context, Listener listener) {
    method setData (line 34) | public void setData(Collection<Cheese> cheeses) {
    method onCreateViewHolder (line 39) | @Override
    method onBindViewHolder (line 46) | @Override
    method getItemCount (line 54) | @Override
    method getItemAt (line 59) | private Cheese getItemAt(int position) {
    type Listener (line 63) | public interface Listener {
      method onItemClicked (line 64) | void onItemClicked(Cheese cheese);

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseViewHolder.java
  class CheeseViewHolder (line 15) | public class CheeseViewHolder extends RecyclerView.ViewHolder {
    method newInstance (line 17) | public static CheeseViewHolder newInstance(ViewGroup parent) {
    method CheeseViewHolder (line 26) | public CheeseViewHolder(View view) {
    method bind (line 32) | public void bind(Cheese cheese) {

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheeses.java
  class Cheeses (line 5) | public class Cheeses {
    method getRandomCheeseDrawable (line 9) | public static int getRandomCheeseDrawable() {
    method getRandomCheeseName (line 158) | public static String getRandomCheeseName() {
    method getRandomCheese (line 162) | public static Cheese getRandomCheese() {

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/ColorUtils.java
  class ColorUtils (line 26) | public class ColorUtils {
    method ColorUtils (line 28) | private ColorUtils() {
    method modifyAlpha (line 34) | public static int modifyAlpha(@ColorInt int color, @IntRange(from = 0,...
    method modifyAlpha (line 41) | public static int modifyAlpha(@ColorInt int color,

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailActivity.java
  class DetailActivity (line 22) | public class DetailActivity extends AppCompatActivity {
    method newIntent (line 26) | public static Intent newIntent(Context context, Cheese cheese) {
    method onCreate (line 37) | @Override

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailRecyclerViewActivity.java
  class DetailRecyclerViewActivity (line 26) | public class DetailRecyclerViewActivity extends AppCompatActivity {
    method newIntent (line 28) | public static Intent newIntent(Context context) {
    method onCreate (line 40) | @Override
    class CountriesAdapter (line 84) | static class CountriesAdapter extends RecyclerView.Adapter<CountriesVi...
      method CountriesAdapter (line 88) | public CountriesAdapter(Context context) {
      method onCreateViewHolder (line 93) | @Override
      method onBindViewHolder (line 98) | @Override
      method getItemCount (line 103) | @Override
    class CountriesViewHolder (line 109) | static class CountriesViewHolder extends RecyclerView.ViewHolder {
      method inflate (line 111) | public static CountriesViewHolder inflate(ViewGroup parent) {
      method CountriesViewHolder (line 120) | public CountriesViewHolder(View view) {
      method bind (line 125) | public void bind(String country) {

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/MainActivity.java
  class MainActivity (line 17) | public class MainActivity extends AppCompatActivity {
    method onCreate (line 26) | @Override
    method load (line 56) | private void load() {

FILE: app/src/main/java/com/commit451/elasticdragdismisslayout/sample/SystemChromeFader.java
  class SystemChromeFader (line 15) | @TargetApi(21)
    method SystemChromeFader (line 23) | public SystemChromeFader(Activity activity) {
    method onDrag (line 30) | @Override
    method onDragDismissed (line 51) | public void onDragDismissed() {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissCallback.java
  class ElasticDragDismissCallback (line 6) | public abstract class ElasticDragDismissCallback {
    method onDrag (line 19) | public void onDrag(float elasticOffset, float elasticOffsetPixels,
    method onDragDismissed (line 26) | public void onDragDismissed() {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissDelegate.java
  class ElasticDragDismissDelegate (line 18) | public class ElasticDragDismissDelegate {
    method ElasticDragDismissDelegate (line 45) | public ElasticDragDismissDelegate(ViewGroup viewGroup) {
    method init (line 49) | public void init(Context context, TypedArray a) {
    method onStartNestedScroll (line 76) | public boolean onStartNestedScroll(View child, View target, int nested...
    method onNestedPreScroll (line 81) | public void onNestedPreScroll(View target, int dx, int dy, int[] consu...
    method onNestedScroll (line 90) | public void onNestedScroll(View target, int dxConsumed, int dyConsumed...
    method onStopNestedScroll (line 94) | public void onStopNestedScroll(View child) {
    method dragScale (line 118) | private void dragScale(int scroll) {
    method onSizeChanged (line 172) | public void onSizeChanged(int w, int h, int oldw, int oldh) {
    method dispatchDragCallback (line 178) | private void dispatchDragCallback(float elasticOffset, float elasticOf...
    method dispatchDismissCallback (line 188) | private void dispatchDismissCallback() {
    method addListener (line 196) | public void addListener(ElasticDragDismissCallback listener) {
    method removeListener (line 203) | public void removeListener(ElasticDragDismissCallback listener) {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissFrameLayout.java
  class ElasticDragDismissFrameLayout (line 33) | public class ElasticDragDismissFrameLayout extends FrameLayout implement...
    method ElasticDragDismissFrameLayout (line 37) | public ElasticDragDismissFrameLayout(Context context) {
    method ElasticDragDismissFrameLayout (line 41) | public ElasticDragDismissFrameLayout(Context context, AttributeSet att...
    method ElasticDragDismissFrameLayout (line 45) | public ElasticDragDismissFrameLayout(Context context, AttributeSet att...
    method ElasticDragDismissFrameLayout (line 50) | @TargetApi(21)
    method init (line 56) | private void init(Context context, AttributeSet attrs) {
    method onStartNestedScroll (line 63) | @Override
    method onNestedPreScroll (line 68) | @Override
    method onNestedScroll (line 73) | @Override
    method onStopNestedScroll (line 78) | @Override
    method onNestedScrollAccepted (line 83) | @Override
    method onNestedFling (line 87) | @Override
    method onNestedPreFling (line 92) | @Override
    method getNestedScrollAxes (line 97) | @Override
    method onSizeChanged (line 102) | @Override
    method addListener (line 108) | public void addListener(ElasticDragDismissCallback listener) {
    method removeListener (line 112) | public void removeListener(ElasticDragDismissCallback listener) {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissLinearLayout.java
  class ElasticDragDismissLinearLayout (line 16) | public class ElasticDragDismissLinearLayout extends LinearLayout impleme...
    method ElasticDragDismissLinearLayout (line 20) | public ElasticDragDismissLinearLayout(Context context) {
    method ElasticDragDismissLinearLayout (line 24) | public ElasticDragDismissLinearLayout(Context context, AttributeSet at...
    method ElasticDragDismissLinearLayout (line 28) | public ElasticDragDismissLinearLayout(Context context, AttributeSet at...
    method ElasticDragDismissLinearLayout (line 33) | @TargetApi(21)
    method init (line 39) | private void init(Context context, AttributeSet attrs) {
    method onStartNestedScroll (line 46) | @Override
    method onNestedPreScroll (line 51) | @Override
    method onNestedScroll (line 56) | @Override
    method onStopNestedScroll (line 61) | @Override
    method onNestedScrollAccepted (line 66) | @Override
    method onNestedFling (line 70) | @Override
    method onNestedPreFling (line 75) | @Override
    method getNestedScrollAxes (line 80) | @Override
    method onSizeChanged (line 85) | @Override
    method addListener (line 91) | public void addListener(ElasticDragDismissCallback listener) {
    method removeListener (line 95) | public void removeListener(ElasticDragDismissCallback listener) {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissRelativeLayout.java
  class ElasticDragDismissRelativeLayout (line 16) | public class ElasticDragDismissRelativeLayout extends RelativeLayout imp...
    method ElasticDragDismissRelativeLayout (line 20) | public ElasticDragDismissRelativeLayout(Context context) {
    method ElasticDragDismissRelativeLayout (line 24) | public ElasticDragDismissRelativeLayout(Context context, AttributeSet ...
    method ElasticDragDismissRelativeLayout (line 28) | public ElasticDragDismissRelativeLayout(Context context, AttributeSet ...
    method ElasticDragDismissRelativeLayout (line 33) | @TargetApi(21)
    method init (line 39) | private void init(Context context, AttributeSet attrs) {
    method onStartNestedScroll (line 46) | @Override
    method onNestedPreScroll (line 51) | @Override
    method onNestedScroll (line 56) | @Override
    method onStopNestedScroll (line 61) | @Override
    method onNestedScrollAccepted (line 66) | @Override
    method onNestedFling (line 70) | @Override
    method onNestedPreFling (line 75) | @Override
    method getNestedScrollAxes (line 80) | @Override
    method onSizeChanged (line 85) | @Override
    method addListener (line 91) | public void addListener(ElasticDragDismissCallback listener) {
    method removeListener (line 95) | public void removeListener(ElasticDragDismissCallback listener) {

FILE: elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/Util.java
  class Util (line 10) | class Util {
    method checkParent (line 12) | static void checkParent(ViewGroup viewGroup, TypedArray a) {
Condensed preview — 49 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (108K chars).
[
  {
    "path": ".gitignore",
    "chars": 1343,
    "preview": "# Created by https://www.gitignore.io\n\n### Android ###\n\n# Files for the Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# G"
  },
  {
    "path": ".travis.yml",
    "chars": 372,
    "preview": "language: android\n\njdk:\n  - oraclejdk8\n\nandroid:\n  components:\n    - tools\n    - platform-tools\n\nbefore_install:\n  - mkd"
  },
  {
    "path": "LICENSE.txt",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "README.md",
    "chars": 3450,
    "preview": "# ElasticDragDismissLayout\nStandard ViewGroups which responds to nested scrolls to create drag-dismissable layouts. Orig"
  },
  {
    "path": "app/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "chars": 1193,
    "preview": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 28\n\n    defaultConfig {\n        applicationId \""
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 664,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 997,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package="
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheese.java",
    "chars": 471,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport java.io.Serializable;\n\n/**\n * A fake model to show usage\n"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseAdapter.java",
    "chars": 1929,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.content.Context;\nimport android.view.View;\nimport"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/CheeseViewHolder.java",
    "chars": 1018,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.view.LayoutInflater;\nimport android.view.View;\nim"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/Cheeses.java",
    "chars": 12870,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport java.util.Random;\n\npublic class Cheeses {\n\n    private st"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/ColorUtils.java",
    "chars": 1409,
    "preview": "/*\n * Copyright 2015 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailActivity.java",
    "chars": 2753,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.content.Context;\nimport android.content.Intent;\ni"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/DetailRecyclerViewActivity.java",
    "chars": 4377,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.content.Context;\nimport android.content.Intent;\ni"
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/MainActivity.java",
    "chars": 2092,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport "
  },
  {
    "path": "app/src/main/java/com/commit451/elasticdragdismisslayout/sample/SystemChromeFader.java",
    "chars": 2324,
    "preview": "package com.commit451.elasticdragdismisslayout.sample;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity"
  },
  {
    "path": "app/src/main/res/drawable/ic_arrow_back_24dp.xml",
    "chars": 352,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "app/src/main/res/drawable/ic_favorite_24dp.xml",
    "chars": 469,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\""
  },
  {
    "path": "app/src/main/res/layout/activity_detail.xml",
    "chars": 1758,
    "preview": "<com.commit451.elasticdragdismisslayout.ElasticDragDismissFrameLayout xmlns:android=\"http://schemas.android.com/apk/res/"
  },
  {
    "path": "app/src/main/res/layout/activity_detail_recyclerview.xml",
    "chars": 897,
    "preview": "<com.commit451.elasticdragdismisslayout.ElasticDragDismissLinearLayout xmlns:android=\"http://schemas.android.com/apk/res"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "chars": 673,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/item_cheese.xml",
    "chars": 1048,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n         "
  },
  {
    "path": "app/src/main/res/layout/viewholder_game.xml",
    "chars": 889,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    x"
  },
  {
    "path": "app/src/main/res/menu/main.xml",
    "chars": 310,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:ap"
  },
  {
    "path": "app/src/main/res/transition/about_return_downward.xml",
    "chars": 1542,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2015 Google Inc.\n\n  Licensed under the Apache License, Version 2"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "chars": 251,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#3F51B5</color>\n    <color name=\"color"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "chars": 443,
    "preview": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"activity_horizontal"
  },
  {
    "path": "app/src/main/res/values/ids.xml",
    "chars": 147,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <item name=\"list_position\" type=\"id\"/>\n    <item name=\"list_holde"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "chars": 7995,
    "preview": "<resources>\n    <string name=\"app_name\">ElasticDragDismissLayout</string>\n\n    <string name=\"cheese_ipsum\">Jarlsberg lan"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "chars": 1685,
    "preview": "<resources xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <!-- Base application theme. -->\n    <style name=\"AppThe"
  },
  {
    "path": "build.gradle",
    "chars": 413,
    "preview": "buildscript {\n    repositories {\n        jcenter()\n        google()\n    }\n    dependencies {\n        classpath 'com.andr"
  },
  {
    "path": "elasticdragdismisslayout/.gitignore",
    "chars": 7,
    "preview": "/build\n"
  },
  {
    "path": "elasticdragdismisslayout/build.gradle",
    "chars": 620,
    "preview": "apply plugin: 'com.android.library'\n\nandroid {\n    compileSdkVersion 28\n\n    defaultConfig {\n        minSdkVersion 14\n  "
  },
  {
    "path": "elasticdragdismisslayout/proguard-rules.pro",
    "chars": 664,
    "preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in C:"
  },
  {
    "path": "elasticdragdismisslayout/src/main/AndroidManifest.xml",
    "chars": 136,
    "preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.commit451.elasticdragdismisslayout"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissCallback.java",
    "chars": 1063,
    "preview": "package com.commit451.elasticdragdismisslayout;\n\n/**\n * Callbacks for listening for drag events on ElasticLayouts\n */\npu"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissDelegate.java",
    "chars": 8165,
    "preview": "package com.commit451.elasticdragdismisslayout;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\n"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissFrameLayout.java",
    "chars": 3802,
    "preview": "/*\n * Copyright 2015 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissLinearLayout.java",
    "chars": 3199,
    "preview": "package com.commit451.elasticdragdismisslayout;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nim"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/ElasticDragDismissRelativeLayout.java",
    "chars": 3215,
    "preview": "package com.commit451.elasticdragdismisslayout;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nim"
  },
  {
    "path": "elasticdragdismisslayout/src/main/java/com/commit451/elasticdragdismisslayout/Util.java",
    "chars": 1271,
    "preview": "package com.commit451.elasticdragdismisslayout;\n\nimport android.content.res.TypedArray;\nimport android.os.Build;\nimport "
  },
  {
    "path": "elasticdragdismisslayout/src/main/res/values/attrs_drag_dismissables.xml",
    "chars": 1160,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2015 Google Inc.\n\n  Licensed under the Apache License, Version 2"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 232,
    "preview": "#Mon Jun 24 18:18:05 JST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
  },
  {
    "path": "gradle.properties",
    "chars": 910,
    "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": "settings.gradle",
    "chars": 44,
    "preview": "include ':app', ':elasticdragdismisslayout'\n"
  }
]

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

About this extraction

This page contains the full source code of the Commit451/ElasticDragDismissLayout GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 49 files (96.9 KB), approximately 25.9k tokens, and a symbol index with 117 extracted functions, classes, methods, constants, and types. 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!