{"id":17132989,"url":"https://github.com/agraphie/materialsearchview","last_synced_at":"2025-04-13T07:56:33.330Z","repository":{"id":57744207,"uuid":"92947691","full_name":"Agraphie/MaterialSearchView","owner":"Agraphie","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-30T13:52:12.000Z","size":7107,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T07:56:26.672Z","etag":null,"topics":["android","animation","circularreveal","material-design","material-search-bar","searchview","toolbar"],"latest_commit_sha":null,"homepage":null,"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/Agraphie.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":"2017-05-31T13:20:59.000Z","updated_at":"2022-03-29T23:08:43.000Z","dependencies_parsed_at":"2022-08-30T10:51:34.267Z","dependency_job_id":null,"html_url":"https://github.com/Agraphie/MaterialSearchView","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agraphie%2FMaterialSearchView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agraphie%2FMaterialSearchView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agraphie%2FMaterialSearchView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agraphie%2FMaterialSearchView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agraphie","download_url":"https://codeload.github.com/Agraphie/MaterialSearchView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681489,"owners_count":21144700,"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","animation","circularreveal","material-design","material-search-bar","searchview","toolbar"],"created_at":"2024-10-14T19:29:04.670Z","updated_at":"2025-04-13T07:56:33.302Z","avatar_url":"https://github.com/Agraphie.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MaterialSearchView\nThis is a library which wraps a `SearchView` to reveal itself in a circular fashion, just like in the PlayStore.\n\n![](/art/example_1.gif)\n![](/art/example_2.gif)\n\nAt its core you can get a `RecyclerView` for the search results and attach your favourite adapter and get the \n`SearchView` to style it like you prefer.\n\n# Usage\nFirst include the dependency in your build.gradle\n```\ncompile 'de.clemenskeppler:MaterialSearchView:1.0.4'\n```\n\nSimply include the class `MaterialSearchView` in your XML layout where you define your toolbar.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cRelativeLayout\n  xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  xmlns:tools=\"http://schemas.android.com/tools\"\n  android:layout_width=\"match_parent\"\n  android:layout_height=\"match_parent\"\n  android:orientation=\"vertical\"\n  tools:context=\"de.clemenskeppler.materialsearchview.sample.MainActivity\"\u003e\n\n  \u003cinclude layout=\"@layout/toolbar\"/\u003e\n\n  \u003cde.clemenskeppler.materialsearchview.MaterialSearchView\n    android:id=\"@+id/materialSearchView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:layout_centerHorizontal=\"true\"\n    android:visibility=\"gone\"/\u003e\n\n  \u003cTextView\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:layout_centerInParent=\"true\"\n    android:text=\"Hello World!\"/\u003e\n\n\u003c/RelativeLayout\u003e\n```\n\nFor showing the `SearchView` simple call `MaterialSearchView.show()` whenever you desire. E.g.\n\n```Java\npublic class MainActivity extends AppCompatActivity {\n\n  MaterialSearchView materialSearchView;\n  SearchView searchView;\n  RecyclerView results;\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n    setSupportActionBar(toolbar);\n    materialSearchView = (MaterialSearchView) findViewById(R.id.materialSearchView);\n    searchView = materialSearchView.getSearchView();\n    results = materialSearchView.getSearchResults();\n  }\n\n  @Override\n  public boolean onCreateOptionsMenu(Menu menu) {\n    getMenuInflater().inflate(R.menu.menu_main, menu);\n    return true;\n  }\n\n  @Override\n  public boolean onOptionsItemSelected(MenuItem item) {\n    if (item.getItemId() == R.id.action_filter_search) {\n      materialSearchView.show();\n      return true;\n    } else {\n      return super.onOptionsItemSelected(item);\n    }\n  }\n}\n```\n\nFurthermore, you can define\n several XML attributes to change its behaviour.\n \n | Attribute                   | Default         | Description                                                                                            |\n |-----------------------------|-----------------|--------------------------------------------------------------------------------------------------------|\n | hasOverflow                 | false           | Specify if the overflow menu is visible the menu where MaterialSearchView is included                  |\n | searchIconPositionFromRight | 0               | The position of the search icon (i.e. magnifying glass) starting from 0 not counting the overflow menu |\n | searchBarHeight             | Same as toolbar | The height of the searchbar/searchview                                                                 |\n | cancelOnOutsideTouch        | true            | Close the search menu and results on an outside click (similar to `Dialog`)                            |\n | circularAnimationTime       | 300             | The animation time in ms for the circular reveal and hide                                              |\n | hideOnKeyboardClose         | true            | Close the search dialog when the softkey keyboard is minimsed                                          |\n \n \n # Limitations\n On API 16 - 17 the circular reveal and hide animations do not look like a circle but like a square. Hopefully this \n can be fixed in later releases somehow.\n \n # Attributions\n Thanks for Nathan Schwermann for his CircularReveal backport (https://gist.github.com/schwiz/e566f248723bb1754972) and Miguel Catalan Bañuls\n for his original idea (https://github.com/MiguelCatalan/MaterialSearchView), as well as Ozodrukh for his circular \n reveal (https://github.com/ozodrukh/CircularReveal).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagraphie%2Fmaterialsearchview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagraphie%2Fmaterialsearchview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagraphie%2Fmaterialsearchview/lists"}