https://github.com/fanmixco/xamarin-materialsearchview
Cute library to implement SearchView in a Material Design Approach for Xamarin.Android, based on Miguel Catalan's version.
https://github.com/fanmixco/xamarin-materialsearchview
android material-design material-search-view nuget nuget-package xamarin xamarin-android xamarin-android-binding xamarin-library
Last synced: 3 months ago
JSON representation
Cute library to implement SearchView in a Material Design Approach for Xamarin.Android, based on Miguel Catalan's version.
- Host: GitHub
- URL: https://github.com/fanmixco/xamarin-materialsearchview
- Owner: FANMixco
- License: apache-2.0
- Created: 2020-08-07T10:25:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-19T07:05:05.000Z (over 1 year ago)
- Last Synced: 2025-04-19T16:15:01.554Z (about 1 year ago)
- Topics: android, material-design, material-search-view, nuget, nuget-package, xamarin, xamarin-android, xamarin-android-binding, xamarin-library
- Language: C#
- Homepage: https://fanmixco.github.io/Xamarin-MaterialSearchView/
- Size: 133 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Xamarin-MaterialSearchView
Cute library to implement SearchView in a Material Design Approach for Xamarin.Android, based on Miguel Catalan's version.

## Get it
|Latest Release|Downloads|
|:------------:|:------------:|
|[](https://www.nuget.org/packages/Xamarin-MaterialSearchView/)|[](https://www.nuget.org/packages/Xamarin-MaterialSearchView/)|
### **Basic example:**
**XML:**
**Layout:**
```xml
```
**search_container.xml**
```xml
```
**Menu:**
**menu_search.xml**
```xml
```
**C#:**
```csharp
public partial class YourClassActivity : AppCompatActivity
{
private MaterialSearchView SearchView;
protected override void OnCreate(Bundle savedInstanceState)
{
SearchView = FindViewById(Resource.Id.search_view);
SearchView.SetOnQueryTextListener(new MaterialSearchViewListener(this));
//Optional to enable voice search
//SearchView.SetVoiceSearch(true);
}
public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_search, menu);
SearchView.SetMenuItem(menu.FindItem(Resource.Id.action_search));
return true;
}
}
public partial class YourClassActivity
{
public class MaterialSearchViewListener : Java.Lang.Object, MaterialSearchView.IOnQueryTextListener
{
public bool OnQueryTextChange(string p0)
{
return true;
}
public bool OnQueryTextSubmit(string p0)
{
return true;
}
}
}
```
# Help me
Pull requests are more than welcome, help me and others improve this awesome library.
The code is based on the Krishnakapil original concept.
# License
Copyright 2015-2020 Miguel Catalan Bañuls and Federico Navarrete
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
### Follow me at:
| LinkedIn |YouTube|Amazon|Goodreads|Instagram|Cyber Prophets|Sharing Your Stories|
|:----------|:------------:|:------------:|:------------:|:------------:|:------------:|:------------:|
|[](https://bit.ly/lfanmixco)|[](https://youtube.com/c/FedericoNavarrete)|[](https://www.amazon.com/Federico-Navarrete/e/B08NJTXQRV)|[](https://www.goodreads.com/author/show/21125413.Federico_Navarrete)|[](https://www.instagram.com/federico_the_consultant)|[](https://redcircle.com/shows/cyber-prophets)|[](https://redcircle.com/shows/sharing-your-stories)|