├── example ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── layout │ │ │ ├── activity_lleft.xml │ │ │ ├── activity_right.xml │ │ │ ├── activity_horizontal.xml │ │ │ ├── layout_item_7.xml │ │ │ ├── right_layout_item_7.xml │ │ │ ├── activity_main.xml │ │ │ ├── layout_item_0.xml │ │ │ ├── right_layout_item_0.xml │ │ │ ├── layout_item_2.xml │ │ │ ├── right_layout_item_2.xml │ │ │ ├── layout_item_6.xml │ │ │ ├── layout_item_3.xml │ │ │ ├── right_layout_item_3.xml │ │ │ ├── layout_item_1.xml │ │ │ ├── layout_item_4.xml │ │ │ ├── right_layout_item_6.xml │ │ │ ├── right_layout_item_1.xml │ │ │ ├── right_layout_item_4.xml │ │ │ ├── layout_item_5.xml │ │ │ ├── right_layout_item_5.xml │ │ │ ├── horizontal_layout_item_0.xml │ │ │ ├── horizontal_layout_item_1.xml │ │ │ ├── horizontal_layout_item_6.xml │ │ │ ├── horizontal_layout_item_4.xml │ │ │ ├── horizontal_layout_item_5.xml │ │ │ ├── horizontal_layout_item_2.xml │ │ │ └── horizontal_layout_item_3.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── drawable │ │ │ ├── ic_delete.xml │ │ │ ├── ic_upload.xml │ │ │ └── ic_launcher_background.xml │ │ └── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── zerobranch │ │ └── example │ │ ├── left │ │ ├── LeftActivity.java │ │ └── LeftAdapter.java │ │ ├── right │ │ ├── RightActivity.java │ │ └── RightAdapter.java │ │ ├── horizontal │ │ ├── HorizontalActivity.java │ │ └── HorizontalAdapter.java │ │ └── MainActivity.java ├── build.gradle └── proguard-rules.pro ├── swipelayout ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ └── values │ │ │ └── attrs.xml │ │ └── java │ │ └── com │ │ └── zerobranch │ │ └── layout │ │ └── SwipeLayout.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── screenshots ├── left.gif ├── right.gif └── horizontal.gif ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── CHANGELOG.md ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── gradlew ├── RUSSIAN_README.md └── README.md /example/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /swipelayout/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':swipelayout', ':example' 2 | -------------------------------------------------------------------------------- /swipelayout/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /screenshots/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/screenshots/left.gif -------------------------------------------------------------------------------- /screenshots/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/screenshots/right.gif -------------------------------------------------------------------------------- /screenshots/horizontal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/screenshots/horizontal.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /.idea 4 | .DS_Store 5 | /build 6 | /captures 7 | .externalNativeBuild 8 | local.properties 9 | -------------------------------------------------------------------------------- /example/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SwipeExample 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerobranch/SwipeLayout/HEAD/example/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Sep 27 12:34:46 MSK 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_lleft.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_right.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_horizontal.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/ic_delete.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /example/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /example/src/main/res/drawable/ic_upload.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /swipelayout/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 26 5 | 6 | defaultConfig { 7 | minSdkVersion 19 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | } 19 | 20 | dependencies { 21 | implementation 'androidx.appcompat:appcompat:1.1.0' 22 | } 23 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## Version 1.3.0 *(2019-11-28)* 4 | Migrate to zerobranch 5 | 6 | 7 | ## Version 1.1.1 *(2019-09-27)* 8 | Migrate to Android X 9 | 10 | 11 | ## Version 1.0.11 *(2019-09-27)* 12 | Added ability to intercept touch 13 | 14 | 15 | ## Version 1.0.10 *(2019-05-10)* 16 | Added ability to disable swipe. 17 | 18 | 19 | ## Version 1.0.9 *(2019-02-26)* 20 | The root package has been renamed. 21 | 22 | 23 | ## Version 1.0.8 *(2018-10-16)* 24 | Added commands to perform a swipe without animation. 25 | 26 | 27 | ## Version 1.0.7 *(2018-10-01)* 28 | Initial release 29 | -------------------------------------------------------------------------------- /example/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | 6 | defaultConfig { 7 | applicationId "mobile.sarproj.com.app" 8 | minSdkVersion 19 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation 'androidx.appcompat:appcompat:1.1.0' 24 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 25 | implementation 'com.github.zerobranch:SwipeLayout:1.3.1' 26 | } 27 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | android.enableJetifier=true 10 | android.useAndroidX=true 11 | org.gradle.jvmargs=-Xmx1536m 12 | # When configured, Gradle will run in incubating parallel mode. 13 | # This option should only be used with decoupled projects. More details, visit 14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 15 | # org.gradle.parallel=true 16 | -------------------------------------------------------------------------------- /example/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /swipelayout/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /swipelayout/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /example/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Arman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/src/main/java/com/zerobranch/example/left/LeftActivity.java: -------------------------------------------------------------------------------- 1 | package com.zerobranch.example.left; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.recyclerview.widget.LinearLayoutManager; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | 9 | import com.zerobranch.example.R; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class LeftActivity extends AppCompatActivity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_lleft); 20 | 21 | final RecyclerView recyclerView = findViewById(R.id.recycler_view); 22 | recyclerView.setAdapter(new LeftAdapter(getItems())); 23 | recyclerView.setLayoutManager(new LinearLayoutManager(this)); 24 | } 25 | 26 | private List getItems() { 27 | List items = new ArrayList<>(); 28 | for (int i = 0; i < 8; i++) { 29 | items.add("item " + i); 30 | } 31 | return items; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/src/main/java/com/zerobranch/example/right/RightActivity.java: -------------------------------------------------------------------------------- 1 | package com.zerobranch.example.right; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.recyclerview.widget.LinearLayoutManager; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | 9 | import com.zerobranch.example.R; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class RightActivity extends AppCompatActivity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_right); 20 | 21 | final RecyclerView recyclerView = findViewById(R.id.recycler_view); 22 | recyclerView.setAdapter(new RightAdapter(getItems())); 23 | recyclerView.setLayoutManager(new LinearLayoutManager(this)); 24 | } 25 | 26 | private List getItems() { 27 | List items = new ArrayList<>(); 28 | for (int i = 0; i < 8; i++) { 29 | items.add("item " + i); 30 | } 31 | return items; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/src/main/res/layout/layout_item_7.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /example/src/main/res/layout/right_layout_item_7.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /example/src/main/java/com/zerobranch/example/horizontal/HorizontalActivity.java: -------------------------------------------------------------------------------- 1 | package com.zerobranch.example.horizontal; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.recyclerview.widget.LinearLayoutManager; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | 9 | import com.zerobranch.example.R; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | public class HorizontalActivity extends AppCompatActivity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_horizontal); 20 | 21 | final RecyclerView recyclerView = findViewById(R.id.recycler_view); 22 | recyclerView.setAdapter(new HorizontalAdapter(getItems())); 23 | recyclerView.setLayoutManager(new LinearLayoutManager(this)); 24 | } 25 | 26 | private List getItems() { 27 | List items = new ArrayList<>(); 28 | for (int i = 0; i < 7; i++) { 29 | items.add("item " + i); 30 | } 31 | return items; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 |