MaterialSearchView Library

Android has a built in SearchView component but it doesn’t feel much like Material Design. This has even been asked on StackOverflow because developers are having trouble recreating the same MaterialSearchView that appears in many of Google’s applications. However, thanks to one of my good friends Maurício, you can now implement this great component in your own projects!

The MaterialSearchView library that he wrote provides a Material Design overlay for your screen that includes an EditText for searching, along with a ListView to show some items, typically recent or suggested searches. It supports both text input and voice input searches. Let’s take a look at the sample:

MaterialSearchView

You’ll notice three really great things about this sample:

  1. A beautiful open and close animation.
  2. The ListView is prepopulated with recent searches.
  3. The ListView automatically updates to show the filtered and suggested searches based on user input.

The MaterialSearchView is supported with a min SDK of 14. For information on how to include it in your next project, as well as more details on the functionality of the library, please see the linked repository above.

Adam McNeilly

Adam McNeilly
Adam is a Google Developer Expert for Android. He's been developing apps since 2015, and travels the world to present and learn from other Android engineers.

Interface Naming Conventions

Many engineers will tell you that one of the most complicated responsibilities of our job is naming things. Variables, classes, functions...… Continue reading