MaterialDialogSearchView


Source link: https://github.com/TakeoffAndroid/MaterialDialogSearchView

MaterialDialogSearchView

MaterialDialogSearchView is a custom implementation of a Toolbar SearchView in a material design. It is an alternate approach using Material dialogs as SearchView similar to the applications seen on nowadays with this type of SearchView's in the apps like Google play, Google card's,etc.

What made me to do this repo?

This repo is truely made on the inspiration of Google play's SearchView and StackOverflow question of mine http://stackoverflow.com/questions/30521615/implementing-google-play-and-maps-like-search-bar-android

How to use?

Regarding the usage, it is simple to go without using any third party libraries. The class files used in this repo is limited to

MainActivity.java

This is the main class and it comprises of Custom dialog and then several logics to filter out the users suggestion in EditText.

SearchAdapter.java

It is nothing but a adapter class extends BaseAdapter which in turn used to display the list items (i.e Country's Text and icon used in this repo) in a ListView.

Utils.java

It is an Utility class which is used to adjust the height of ListView based on the count of child items.

SharedPreference.java

SharedPrefernce class is used to store and retrieve recently searched values (i.e selected or clicked values from the suggestions list.)

Note:


 1. This is completely a custom implementation of mine.  Though this solution may be simple, but very effective implementing MaterialSearchView's and it will not affect any part of the coding cycle. You can use this view in activity, fragment or wherever you want. Happy coding!

2. Voice search will not work. It is just displayed for the UI purpose. EditText data will be cleared once if you click mic icon. 

Licensing

About licensing it is free to go. You can do whatever you want with this code. I really appreciate all of your feedbacks and pull requests to improve this repo.

Resources

This repo enables you to show videos instead of usual profile picture for chat heads. Inspired from Facebook's Video profile picture, I decided to replicate its implementation to show videos in profile picture and to create chat heads for the same.

A multi-functional FAB component with customizable options.

BlurKit is an extraordinarily easy to use utility to get live blurring just like on iOS.

A Kotlin library for Android allowing writing asynchronous code in synchronous style using async/await approach.

WeatherView is an Android Library that helps you make a cool weather animation for your app.

Triad is a tiny Android library which enables use of the Model-View-Presenter pattern in an easy way. It uses custom Views to replace the dreaded Fragments, and introduces Presenter classes to separate business logic from view logic. Since the Presenters are plain Java objects, tests for these classes can run blazingly fast on a local JVM.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes