{"id":15031624,"url":"https://github.com/liuguangqiang/swipeback","last_synced_at":"2025-04-08T09:04:27.835Z","repository":{"id":17983964,"uuid":"20989803","full_name":"liuguangqiang/SwipeBack","owner":"liuguangqiang","description":"SwipeBack is an android library that can finish a activity by using gesture.","archived":false,"fork":false,"pushed_at":"2022-05-16T09:33:00.000Z","size":7028,"stargazers_count":1739,"open_issues_count":44,"forks_count":310,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-08T09:04:24.449Z","etag":null,"topics":["android","gesture","java","swipeback"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liuguangqiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-19T06:15:36.000Z","updated_at":"2025-03-26T02:16:04.000Z","dependencies_parsed_at":"2022-08-09T03:30:19.719Z","dependency_job_id":null,"html_url":"https://github.com/liuguangqiang/SwipeBack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuguangqiang%2FSwipeBack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuguangqiang%2FSwipeBack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuguangqiang%2FSwipeBack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuguangqiang%2FSwipeBack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuguangqiang","download_url":"https://codeload.github.com/liuguangqiang/SwipeBack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","gesture","java","swipeback"],"created_at":"2024-09-24T20:16:12.549Z","updated_at":"2025-04-08T09:04:27.803Z","avatar_url":"https://github.com/liuguangqiang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"SwipeBack [![Build Status](https://travis-ci.org/liuguangqiang/SwipeBack.png?branch=master)](https://travis-ci.org/liuguangqiang/SwipeBack)\n===========\n\nSwipeBack is a android library that can finish a activity by using gesture.\n\nYou can set the swipe direction,such as left,top,right and bottom.\n\n## Screenshots\n![image](Images/swipeback_demo.gif)\n\n![image](Images/swipeback.gif)\n\n## Sample Download\n[Sample Download](https://github.com/liuguangqiang/SwipeBack/raw/master/Images/apks/swipe_back_demo_v1.0.apk)\n\n![image](Images/download.png)\n\n## Usage\n\n### Gradle\n```\ndependencies {\n   \tcompile 'com.github.liuguangqiang.swipeback:library:1.0.2@aar'\n}\n```\n\n### Maven\n```\n\u003cdependency\u003e\n  \t\u003cgroupId\u003ecom.github.liuguangqiang.swipeback\u003c/groupId\u003e\n  \t\u003cartifactId\u003elibrary\u003c/artifactId\u003e\n  \t\u003cversion\u003e1.0.2\u003c/version\u003e\n  \t\u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n### SwipeBackActivity\nSwipeBackActivity is a base activity for using this library more easier.This Activity will help us to show a shadow.\n\n![image](Images/swipe_back_activity.gif)\n\n```\npublic class CommonActivity extends SwipeBackActivity {\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_common);\n        setDragEdge(SwipeBackLayout.DragEdge.LEFT);\n    }\n\n}\n```\n\n### Layout and activity theme.\nSwipeBackLayout must contains only one direct child.\n\n```\n\u003ccom.liuguangqiang.swipeback.SwipeBackLayout\n\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/swipeBackLayout\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\t\n\t\u003c!-- SwipeBackLayout must contains only one direct child --\u003e\n\n\u003c/com.liuguangqiang.swipeback.SwipeBackLayout\u003e\n```\n\n```\n \u003cstyle name=\"Theme.Swipe.Back\" parent=\"Theme.AppCompat.Light.DarkActionBar\"\u003e\n        \u003citem name=\"android:windowIsTranslucent\"\u003etrue\u003c/item\u003e\n        \u003citem name=\"android:windowBackground\"\u003e@android:color/transparent\u003c/item\u003e\n        \u003citem name=\"windowActionBar\"\u003efalse\u003c/item\u003e\n        \u003citem name=\"android:windowNoTitle\"\u003etrue\u003c/item\u003e\n \u003c/style\u003e\n```\n\n### Swipe Direction\nYou can set  DragEdge to change the swipe direction.\n\n```\n public enum DragEdge {\n      \tLEFT,\n      \t\n        TOP,\n        \n        RIGHT,\n        \n        BOTTOM\n    }\n```\n\n### Support Views\nSwipeBackLayout must contains only one direct child.\n\nSuch as:\n\n* LinearLayout,\n* RelativeLayout,\n* ListView,\n* ViewPager\n* WebView\n\n## License\n\n    Copyright 2015 Eric Liu\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuguangqiang%2Fswipeback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuguangqiang%2Fswipeback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuguangqiang%2Fswipeback/lists"}