{"id":13645562,"url":"https://github.com/Yellow5A5/ClearScreenHelper","last_synced_at":"2025-04-21T14:31:39.858Z","repository":{"id":96669135,"uuid":"72131117","full_name":"Yellow5A5/ClearScreenHelper","owner":"Yellow5A5","description":"The ClearScreenHelper can help you clear screen by sliding mode easily.","archived":false,"fork":false,"pushed_at":"2017-02-12T14:32:57.000Z","size":5551,"stargazers_count":307,"open_issues_count":1,"forks_count":39,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-09T18:43:03.219Z","etag":null,"topics":[],"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/Yellow5A5.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-27T17:19:37.000Z","updated_at":"2024-05-17T03:39:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"63a63c1c-7de0-415d-9a40-95eef84991d9","html_url":"https://github.com/Yellow5A5/ClearScreenHelper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yellow5A5%2FClearScreenHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yellow5A5%2FClearScreenHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yellow5A5%2FClearScreenHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yellow5A5%2FClearScreenHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yellow5A5","download_url":"https://codeload.github.com/Yellow5A5/ClearScreenHelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070173,"owners_count":21369839,"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":[],"created_at":"2024-08-02T01:02:37.311Z","updated_at":"2025-04-21T14:31:39.171Z","avatar_url":"https://github.com/Yellow5A5.png","language":"Java","readme":"# ClearScreenHelper\n\n［[中文](https://github.com/Yellow5A5/ClearScreenHelper/blob/master/README_CN.md)］［[English](#)］\n\nIn our daily work, we may need to clean the UI from screen occasionally. The main way is through a Event of Button-Click, \nbut some application can clean the UI by sliding the screen. In my mind, cleaning the screen by sliding-mode will be more favored by the user. The ClearScreenHelper will make this feature easily to implement. I hope it will be helpful to you.\n\n## Import\n\nStep 1. Add the JitPack repository to your build file\n\n```\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n```\n\nStep 2. Add the dependency\n\n```\n\tdependencies {\n\t        compile 'com.github.Yellow5A5:ClearScreenHelper:1.0.2'\n\t}\n```\n\n## Introduction\n\nClearScreenHelper has the following advantages:\n\n\u003e * **Minimal changes to the original code**\n\u003e * **Dynamic settings the UI which need to be removed**\n\u003e * **Simple and Convenient in maintenance**\n\nDemo Show here:\n\n\u003cimg src=\"image/demo_image1.gif\" width=300\u003e\u003c/img\u003e\n\u003cimg src=\"image/demo_image2.gif\" width=300\u003e\u003c/img\u003e\n\n## Usage\n\n### First Mode(Recomment)\n\n#### Step 1: replace outermost layout in xml\n\n| Original Layout | Replace To   | \n| :------:   | :-----:  |\n| RelativeLayout | RelativeRootView |\n| LinearLayout| LinearRootView|\n| FrameLayout | FrameRootView|\n\neg.\n\n* **Original Layout：**\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRelativeLayout \n\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/sample_clear_root_layout\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    tools:context=\"yellow5a5.sample.SampleFirActivity\"\u003e\n\n    \u003cRelativeLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        .......\n        .......\n        .......\n```\n\n* **After Be Replaced：**\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cyellow5a5.clearscreenhelper.View.RelativeRootView\n\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/sample_clear_root_layout\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    tools:context=\"yellow5a5.sample.SampleFirActivity\"\u003e\n\n    \u003cRelativeLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        .......\n        .......\n        .......\n```\n\n\n\n#### Step 2: Init in Java.\n\n```java\nmClearRootLayout = (RelativeRootView) findViewById(R.id.sample_clear_root_layout);\nmClearScreenHelper = new ClearScreenHelper(this, mClearRootLayout);\nmClearScreenHelper.bind(mLeftBottomBtn, mRightBottomBtn, mRightTopTextV, mFansTextV, mInfoTextV);\n\n//Add the callback if you want.\nmClearScreenHelper.setIClearEvent(new IClearEvent() {\n    @Override\n    public void onClearEnd() {\n        Toast.makeText(SampleFirActivity.this, \"Clear End...\", Toast.LENGTH_SHORT).show();\n    }\n\n    @Override\n    public void onRecovery() {\n        Toast.makeText(SampleFirActivity.this, \"Recovery Now...\", Toast.LENGTH_SHORT).show();\n    }\n});\n```\n\n\n### Second Mode（Not recommended for use.）\n\n* Not recommended for use beacause we must move from side of screen in this mode, and it will cover the event of touch. \n\n\n```java\nmClearScreenHelper = new ClearScreenHelper(this);\nmClearScreenHelper.bind(mLeftBottomBtn, mRightBottomBtn, mRightTopTextV, mFansTextV, mInfoTextV);\n\n//Add the callback if you want.\nmClearScreenHelper.setIClearEvent(new IClearEvent() {\n    @Override\n    public void onClearEnd() {\n        Toast.makeText(SampleFirActivity.this, \"Clear End...\", Toast.LENGTH_SHORT).show();\n    }\n\n    @Override\n    public void onRecovery() {\n        Toast.makeText(SampleFirActivity.this, \"Recovery Now...\", Toast.LENGTH_SHORT).show();\n    }\n}\n```\n\n\n\n## License\n\n    Copyright 2016 Yellow5A5\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","funding_links":[],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYellow5A5%2FClearScreenHelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYellow5A5%2FClearScreenHelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYellow5A5%2FClearScreenHelper/lists"}