• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

TakeoffAndroid/MaterialDialogSearchView: MaterialDialogSearchView is a custom im ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

TakeoffAndroid/MaterialDialogSearchView

开源软件地址(OpenSource Url):

https://github.com/TakeoffAndroid/MaterialDialogSearchView

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource 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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap