{"id":19670323,"url":"https://github.com/yuqirong/flexiblesearchbar","last_synced_at":"2026-04-07T10:31:46.718Z","repository":{"id":96913803,"uuid":"84960514","full_name":"yuqirong/FlexibleSearchBar","owner":"yuqirong","description":"可以伸缩的搜索栏，模仿华为应用市场","archived":false,"fork":false,"pushed_at":"2017-11-18T05:55:18.000Z","size":164,"stargazers_count":185,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-29T00:41:23.721Z","etag":null,"topics":["android","custom-view","searchbar"],"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/yuqirong.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,"zenodo":null}},"created_at":"2017-03-14T14:45:58.000Z","updated_at":"2024-11-16T07:19:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"3351c34e-96db-48aa-9d1b-7819050a4b22","html_url":"https://github.com/yuqirong/FlexibleSearchBar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuqirong/FlexibleSearchBar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuqirong%2FFlexibleSearchBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuqirong%2FFlexibleSearchBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuqirong%2FFlexibleSearchBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuqirong%2FFlexibleSearchBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuqirong","download_url":"https://codeload.github.com/yuqirong/FlexibleSearchBar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuqirong%2FFlexibleSearchBar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31509930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","custom-view","searchbar"],"created_at":"2024-11-11T17:05:45.946Z","updated_at":"2026-04-07T10:31:46.706Z","avatar_url":"https://github.com/yuqirong.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"FlexibleSearchBar\n=================\n\nIntroduction\n------------\n可以伸缩的搜索栏，模仿 [华为应用市场](http://app.hicloud.com/) 。\n\nScreenshot\n----------\n![screenshot](/screenshot/20170701150542.gif)\n\nBlog\n----------\n[《可以伸缩的搜索栏，模仿华为应用市场》](http://yuqirong.me/2017/07/03/%E5%8F%AF%E4%BB%A5%E4%BC%B8%E7%BC%A9%E7%9A%84%E6%90%9C%E7%B4%A2%E6%A0%8F%EF%BC%8C%E6%A8%A1%E4%BB%BF%E5%8D%8E%E4%B8%BA%E5%BA%94%E7%94%A8%E5%B8%82%E5%9C%BA/)\n\nUsage\n-----\n1. 在布局中加入 `SearchBarView`：\n\n\t``` xml\n\t\u003ccom.yuqirong.searchbar.SearchBarView\n\t    android:id=\"@+id/searchbarview\"\n\t    android:layout_width=\"match_parent\"\n\t    android:layout_height=\"40dp\"\n\t    android:layout_margin=\"8dp\"\n\t    app:search_bar_hint_text=\"@string/string_search_text\" /\u003e\n\t```\n\n2. 在代码中使用它，`startOpen()` 为打开搜索栏；反之，`startClose()` 为关闭搜索栏：\n\n\t``` java\n\tSearchBarView searchbarview = (SearchBarView) findViewById(R.id.searchbarview);\n\tsearchbarview.setOnClickListener(new View.OnClickListener() {\n        @Override\n        public void onClick(View view) {\n            // enter search activity\n        }\n    });\n\n\tsearchbarview.startOpen(); // 打开搜索栏\n\t...\n\tsearchbarview.startClose(); // 关闭搜索栏\n\t```\n\nCustom Attributes\n-----------------\n| 属性名          | 格式        | 描述 |\n| ------------- |:-------------:| -----------:|\n| search_bar_color | color\\|reference | 搜索栏背景色 |\n| search_bar_position | enum | 搜索栏的位置（左或右） |\n| search_bar_status | enum | 搜索栏的状态（打开或关闭） |\n| search_bar_duration | integer | 搜索栏打开或关闭的动画时间 |\n| search_bar_hint_text | string\\|reference | 搜索栏的提示文本 |\n| search_bar_hint_text_color | color\\|reference | 提示文本的颜色 |\n| search_bar_hint_text_size | dimension\\|reference | 提示文本的字体大小 |\n| search_bar_icon | reference | 搜索栏的图标 |\n\nContact Me\n----------\n* Email : \u003cyqr271228943@gmail.com\u003e\n* Weibo : [@活得好像一条狗](http://weibo.com/yyyuqirong)\n\nLicense\n-------\n\tCopyright (c) 2017 yuqirong \n\t\n\tLicensed under the Apache License, Version 2.0 (the \"License”);\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\t\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\t\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuqirong%2Fflexiblesearchbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuqirong%2Fflexiblesearchbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuqirong%2Fflexiblesearchbar/lists"}