Giter Site home page Giter Site logo

material-dialog-searchview's Introduction

Android Arsenal

Buy Me a Coffee at ko-fi.com

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.

Material-Dialog-SearchView

Material-Dialog-SearchView

material-dialog-searchview's People

Contributors

gkemon avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.