{"id":13644297,"url":"https://github.com/onlynight/LSearchView","last_synced_at":"2025-04-21T07:30:46.142Z","repository":{"id":80726191,"uuid":"72910046","full_name":"onlynight/LSearchView","owner":"onlynight","description":"Android L design circle wave animation search view","archived":false,"fork":false,"pushed_at":"2017-04-13T16:46:02.000Z","size":2279,"stargazers_count":52,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T16:44:13.409Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onlynight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-05T06:47:08.000Z","updated_at":"2023-05-30T02:53:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd859a9f-5206-4839-82e7-efaa9c23ccc8","html_url":"https://github.com/onlynight/LSearchView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlynight%2FLSearchView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlynight%2FLSearchView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlynight%2FLSearchView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlynight%2FLSearchView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onlynight","download_url":"https://codeload.github.com/onlynight/LSearchView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014570,"owners_count":21360975,"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:00.858Z","updated_at":"2025-04-21T07:30:44.411Z","avatar_url":"https://github.com/onlynight.png","language":"Java","readme":"LSearchView\n===========\n\nThis is an Android L design search view. It support reveal animation, let's review.\n\n# Update\n\n- 2016.11.17 update\n\n    I develop another library about ripple animation, it's a ripple animation layout you can use if anywhere you want(it is above android 4.0). Later i will develop a file explore use Material Design, and i will add some useful function to the ```LSearchView``` library.You can see the ```RippleEverywhere``` here https://github.com/onlynight/RippleEverywhere.\n\n# Preview\n\n## eg.1 HiQianBei\nThis is an Chinese local app, so you can't install it from google play.It just use for demo.\nIf you want to try it, you can download here: http://www.wandoujia.com/apps/com.superlity.hiqianbei\n\n![hiqianbei_demo](./images/hiqianbei_demo.gif)\n\n## eg.2 LSearchView\nThis is the LSearchView demo, you can see the source code in this the ```demo``` module.\n\n![LSearchView_Demo](./images/lsearchview_demo.gif)\n\n# build.gradle\nIn your project root path ```build.gradle``` file, add this:\n\n```groovy\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url \"https://jitpack.io\" }\n\t}\n}\n```\n\nAnd in your module path ```build.gradle``` file, add this:\n\n```groovy\ndependencies {\n        compile 'com.github.onlynight:LSearchView:1.0.0'\n}\n```\n\n# Sample Code\n\nlayout file:\n\n```xml\n\u003ccom.github.onlynight.library.lsearchview.LSearchView\n    android:id=\"@+id/searchView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:padding=\"8dp\"\n    app:anim_origin_x=\"23dp\"\n    app:anim_origin_y=\"23dp\"\n    app:anim_time=\"500\"\n    app:back_btn_icon=\"@drawable/ic_back\"\n    app:search_bar_height=\"48dp\"\n    app:search_bg_color=\"#aa000000\"\n    app:search_btn_icon=\"@drawable/ic_search\"\n    app:search_hint=\"search something\"\u003e\n\n    \u003cListView\n        android:id=\"@+id/listView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"4dp\"\n        android:background=\"@drawable/l_search_view_bg\"/\u003e\n\n\u003c/com.github.onlynight.library.lsearchview.LSearchView\u003e\n```\n\ncontroller java code:\n\n```java\nsearchView = (LSearchView) findViewById(R.id.searchView);\n\nsearchView.getSearchButton().setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View view) {\n        searchView.setSearching(true);\n        searchView.postDelayed(new Runnable() {\n            @Override\n            public void run() {\n                searchView.setSearching(false);\n            }\n        }, 1000);\n    }\n});\nsearchView.getBackButton().setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View view) {\n        onBackSearch();\n    }\n});\n\nprivate void onBackSearch(){\n    searchView.hideWithAnim();\n    adapter.clear();\n    adapter.notifyDataSetChanged();\n}\n```\n\n# XML property explain\n\n```xml\n\u003cdeclare-styleable name=\"LSearchView\"\u003e\n\n    \u003c!-- search bar height;\n    the default is 48dp;--\u003e\n    \u003cattr name=\"search_bar_height\" format=\"dimension\"/\u003e\n\n    \u003c!-- back button padding;\n    back button size = search_bar_height - search_button_padding*2;\n    the default is 12dp;--\u003e\n    \u003cattr name=\"back_button_padding\" format=\"dimension\"/\u003e\n\n    \u003c!-- search button padding;\n    search button size = search_bar_height - search_button_padding*2;\n    the default is 12dp;--\u003e\n    \u003cattr name=\"search_button_padding\" format=\"dimension\"/\u003e\n\n    \u003c!-- edit text view hint text;\n    no default;--\u003e\n    \u003cattr name=\"search_hint\" format=\"string\"/\u003e\n\n    \u003c!-- search view background color;\n    the default is 0xaa000000;--\u003e\n    \u003cattr name=\"search_bg_color\" format=\"color\"/\u003e\n\n    \u003c!-- search view animation duration time;\n    no default value;--\u003e\n    \u003cattr name=\"anim_time\" format=\"integer\"/\u003e\n\n    \u003c!-- search view reveal animation start x from right;\n    the default is 23dp;--\u003e\n    \u003cattr name=\"anim_origin_x\" format=\"dimension\"/\u003e\n\n    \u003c!-- search view reveal animation start y from top;\n    the default is 23dp--\u003e\n    \u003cattr name=\"anim_origin_y\" format=\"dimension\"/\u003e\n\n    \u003c!-- search bar back button icon res;\n    the default is R.darwable.ic_back;--\u003e\n    \u003cattr name=\"back_btn_icon\" format=\"reference\"/\u003e\n\n    \u003c!-- search bar search button icon res;\n    the default is R.darwable.ic_search;--\u003e\n    \u003cattr name=\"search_btn_icon\" format=\"reference\"/\u003e\n\u003c/declare-styleable\u003e\n```\n\n# API explain\n\n```java\n/**\n * Set the searching state and change search button to progress bar.\n * If you mean to use it, first when you start search you should call\n * setSearching(true), and when you end your search you should call\n * setSearching(false).\n * @param searching is the searching state\n * @return\n */\npublic void setSearching(boolean searching);\n\n/**\n * You can get the back button use this method.\n * @return\n */\npublic LinearLayout getBackButton();\n\n/**\n * You can get the search button use this method.\n * @return\n */\npublic LinearLayout getSearchButton();\n\n/**\n * You can get the search edittext view use this method.\n * @return\n */\npublic EditText getSearchEdit();\n\n/**\n * Call this method to show the view.\n * When initial the LSearchView it's invisible,\n * you must call this method to show it.\n */\npublic void showWithAnim();\n\n/**\n * Call this mehod to hide the view with animation.\n */\npublic void hideWithAnim();\n```\n\n# THANKS\n\n[nineoldandroids]\n\n[CircularReveal]\n\n# License\n\n```\nCopyright 2016 onlynight\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[nineoldandroids]: https://github.com/JakeWharton/NineOldAndroids\n[CircularReveal]: https://github.com/ozodrukh/CircularReveal\n","funding_links":[],"categories":["SearchView"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlynight%2FLSearchView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonlynight%2FLSearchView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlynight%2FLSearchView/lists"}